Compute bootstrap covariance of estimates
Usage
calculate_covariance(
data,
ids_by_analysis = NULL,
bootstrap_ids = NULL,
bootstrap_results = NULL,
estimation_function,
estimation_arguments,
rng_seed,
control = monitored_analysis_control()
)Arguments
- data
A
data.framecontaining the data to be analyzed. A column named.idindicates which observations correspond to each individual.- ids_by_analysis
A
listcontaining the IDs that were enrolled before each analysis occurred- bootstrap_ids
A
listof IDs resampled at earlier analyses: this is NULL in the first analysis- bootstrap_results
A numeric matrix of estimates: the bootstrap estimates for each analysis is stored in the corresponding column.
- estimation_function
A function whose arguments include a data.frame named
data- estimation_arguments
A
listof any additional arguments needed byestimation_function- rng_seed
A numeric scalar for seeding the L'Ecuyer pseudorandom number generator
- control
A
listof computing arguments. See monitored_analysis_control for details about the default computing arguments.
Value
A list containing the covariance matrix of estimates, a matrix
of bootstrap estimates, and a list of the
IDs of individuals in each bootstrap replicate at each analysis.
See also
calculate_covariance() for computing the covariance matrix
of estimators across analyses, and monitored_analysis_control for
details about the default computing arguments.