block.boot.resample {prodest} | R Documentation |
Cluster Bootstrap Resampling
Description
Function to generate R vectors of resampled IDs. It works reshuffling the row number of the original data - which is stored in the input idvar
along with the relative IDs. The output is a list (N_ix1xR), where N_i is a random number depending on the reshuffle.
Usage
block.boot.resample(idvar, R)
Arguments
idvar |
Vector of IDs to be resampled. |
R |
Number of samples to be computed. |
Details
block.boot.resample()
accepts two inputs: a vector of IDs - i.e., the vector of panel identifier - and the number of resamplings. For each resampling, it reshuffles the IDs and outputs a vector whose row number is newly-created 'bootstrap' ID, while the value of each cell is the relative row to be reshuffled. This way, each individual can be sampled multiple times, keeping all her number of observations, without generating duplicates.
Author(s)
Gabriele Rovigatti