case_resampling {robust2sls}R Documentation

Uses nonparametric case resampling for standard errors of parameters and gauge

Description

Uses nonparametric case resampling for standard errors of parameters and gauge

Usage

case_resampling(robust2sls_object, R, coef = NULL, m = NULL, parallel = FALSE)

Arguments

robust2sls_object

An object of class "robust2sls".

R

An integer specifying the number of resamples.

coef

A numeric or character vector specifying which structural coefficient estimates should be recorded across bootstrap replications. NULL means all coefficients are recorded.

m

A single numeric or vector of integers specifying for which iterations the bootstrap statistics should be calculated. NULL means they are calculated for all iterations that were also done in the original robust2sls_object. Character "convergence" means all bootstrap samples are run until they converge and the statistics of the first convergent iteration is recorded.

parallel

A logical value indicating whether to run the bootstrap sampling in parallel or sequentially. See Details.

Details

Argument parallel allows for parallel computing using the foreach package, so the user has to register a parallel backend before invoking this command.

Argument coef is useful if the model includes many controls whose parameters are not of interest. This can reduce the memory space needed to store the bootstrap results.

Value

case_resampling returns an object of class "r2sls_boot". This is a list with three named elements. $boot stores the bootstrap results as a data frame. The columns record the different test statistics, the iteration m, and the number of the resample, r. The values corresponding to the original data is stored as r = 0. $resamples is a list of length R that stores the indices for each specific resample. $original stores the original robust2sls_object based on which the bootstrapping was done.


[Package robust2sls version 0.2.2 Index]