block_boot_sample: Block Bootstrap

View source: R/BMisc.R

block_boot_sampleR Documentation

Block Bootstrap

Description

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

Usage

block_boot_sample(data, idname)

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


data("LaborSupply", package = "plm")
bbs <- block_boot_sample(LaborSupply, "id")
nrow(bbs)
head(bbs$id)


bcallaway11/BMisc documentation built on Feb. 4, 2025, 10:43 p.m.