Learn R Programming

lsasim (version 2.1.6)

brr: Generate replicates of a dataset using Balanced Repeated Replication

Description

Generate replicates of a dataset using Balanced Repeated Replication

Usage

brr(
  data,
  k = 0,
  pseudo_strata = ceiling(nrow(data)/2),
  reps = NULL,
  max_reps = 80,
  weight_cols = "none",
  id_col = 1,
  drop = TRUE
)

Value

a list containing all the BRR replicates of data

Arguments

data

dataset

k

deflating weight factor. \(0 \leq k \leq 1\).

pseudo_strata

number of pseudo-strata

reps

number of replicates

max_reps

maximum number of replicates (only functional if reps = NULL)

weight_cols

vector of weight columns

id_col

number of column in dataset containing subject IDs. Set 0 to use the row names as ID

drop

if TRUE, the observation that will not be part of the subsample is dropped from the dataset. Otherwise, it stays in the dataset but a new weight column is created to differentiate the selected observations

References

OECD (2015). Pisa Data Analysis Manual. Adams, R., & Wu, M. (2002). PISA 2000 Technical Report. Paris: Organization for Economic Co-operation and Development (OECD). Rust, K. F., & Rao, J. N. K. (1996). Variance estimation for complex surveys using replication techniques. Statistical methods in medical research, 5(3), 283-310.

See Also

jackknife()