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 bootsrows and columns for each coefficient in the seqg model. Use summaryto provide summary statistics, such as mean and quantiles.

Examples

# \donttest{
data(ploughs)
form <- 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
s1 <- sequential_g(form, ploughs)

out.boots <- boots_g(s1)

summary(out.boots)
#> 
#> Summary of bootstrapped coefficients: 
#> 
#>                          Estimate Std. Err.  t value    2.5 %  97.5 %
#> (Intercept)              13.49540   4.59812  2.93498  4.50606 22.5845
#> plow                     -4.44703   1.81704 -2.44741 -8.17948 -1.0408
#> agricultural_suitability  4.27938   2.50275  1.70987 -0.71519  9.0480
#> tropical_climate         -2.94928   2.37061 -1.24410 -7.54445  1.8279
#> large_animals            -0.87980   4.08572 -0.21534 -8.90898  7.0103
#> rugged                   -0.36974   0.50283 -0.73532 -1.30592  0.6396
#> 
# }