Learn R Programming

prodest (version 1.0.2)

block.boot.resample: Cluster Bootstrap Resampling

Description

Generate row indices for an individual-level block bootstrap of panel data. All observations belonging to a sampled individual are kept together.

Usage

block.boot.resample(idvar, R)

Value

A list of length R. Each element is a one-column integer matrix of resampled row positions with bootstrap panel identifiers stored as row names.

Arguments

idvar

One-column vector, matrix or data frame of panel identifiers. Numeric, character and factor labels are accepted.

R

Positive integer giving the number of bootstrap samples.

Author

Gabriele Rovigatti

Details

For every replication, the function samples the distinct panel identifiers with replacement. It returns a list of one-column integer matrices. Matrix values are row positions in the original data, while row names are newly generated sequential identifiers for the resampled panels. Consequently, a source panel may be selected more than once without merging its copies.