Skip to contents

Performs a simple bootstrap of a fitted DirectEffects model by re-estimating the model with bootstrap samples.

Usage

boots_g(seqg, boots = 1000)

Arguments

seqg

A fitted sequential_g estimate, computed by sequential_g.

boots

The number of bootstrap replicates. Defaults to 1000.

Value

An object of type seqgboots which is a matrix with boots rows and columns for each coefficient in the seqg model. Use summary to provide summary statistics, such as mean and quantiles.

Examples

data(ploughs)
s1 <- sequential_g(women_politics ~ plow +
 agricultural_suitability + tropical_climate + large_animals + rugged |
 years_civil_conflict + years_interstate_conflict  + oil_pc +
 european_descent + communist_dummy + polity2_2000 |
 centered_ln_inc + centered_ln_incsq, ploughs)

out.boots <- boots_g(s1, boots = 100)

summary(out.boots)
#> 
#> Summary of bootstrapped coefficients: 
#> 
#>                          Estimate Std. Err.  t value    2.5 %  97.5 %
#> (Intercept)              14.02959   4.70395  2.98251  5.02279 23.1829
#> plow                     -4.04895   1.88171 -2.15174 -7.64853 -0.6127
#> agricultural_suitability  4.32654   2.23892  1.93243 -0.28430  8.7664
#> tropical_climate         -2.87187   2.50310 -1.14732 -8.73663  1.3647
#> large_animals            -1.88143   4.26803 -0.44082 -9.83607  7.0296
#> rugged                   -0.33396   0.48342 -0.69083 -1.19738  0.6599
#>