blockBootSample: Block Bootstrap

Description Usage Arguments Value Examples

View source: R/BMisc.R

Description

make draws of all observations with the same id in a panel data context. This is useful for bootstrapping with panel data.

Usage

1

Arguments

data

data.frame from which you want to bootstrap

idname

column in data which contains an individual identifier

Value

data.frame bootstrapped from the original dataset; this data.frame will contain new ids

Examples

1
2
3
4
data(LaborSupply, package="plm")
bbs <- blockBootSample(LaborSupply, "id")
nrow(bbs)
head(bbs$id)

BMisc documentation built on Dec. 11, 2021, 9:24 a.m.