boot_CIV: bootstrapped CIV (recommended).

Description Usage Arguments Value Examples

View source: R/CIVMR_function.R

Description

This function generate a bootstrapped CIV w/wo correction. Specifically, for a bootstrap sample we can generate civ solution u. The boostrap corrected solution u is obtained as the global solution u - ( bootrapped average u - global u).

Usage

1
boot_CIV(MR.data, n_boots = 10)

Arguments

MR.data:

a data frame containing G,X,Z,Y.

n_boots:

number of bootstrap samples.

Value

boots.u: bootstrapped CIV solution u (without correction).

boots.cor.u: bootstrap corrected solution of u. (suggested)

Examples

1
2
3
4
data(simulation)
boot.civ <- boot_CIV(simulation)
#plot the bootstrap corrected solution u.
plot(boot.civ$boots.cor.u)

LaiJiang/CIVMR documentation built on July 16, 2020, 12:45 a.m.