boot_vector_create is a function that creates an matrix of bootstrap resampling weights using either a multinomial distribution of mimic a non-parametric bootstrap or a Dirichlet distribution.

boot_vector_create(data, seed = NULL, continuous = TRUE, cluster_id = NULL)

Arguments

data

The input data, which can be either a data.frame or tibble

seed

A seed for the random number generator to ensure reproducibility of bootstrap replications.

continuous

Use continuous bootstrap weights from a Dirichlet versus discrete weights from a multinomial

cluster_id

If specified, identifies unit of clustering and performs group-based bootstrap in which all individuals in a cluster receive the same bootstrap weight.

Value

An matrix of bootstrap resampling weights with n rows and nboot columns

Author

M. Alan Brookhart