brr: Generate replicates of a dataset using Balanced Repeated...

View source: R/brr.R

brrR Documentation

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
)

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

Value

a list containing all the BRR replicates of 'data'

Note

PISA uses the BRR Fay method with k = 0.5.

References

OECD (2015). Pisa Data Analysis Manual. Adams, R., & Wu, M. (2002). PISA 2000 Technical Report. Paris: Organisation 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


tmatta/lsasim documentation built on Aug. 25, 2023, 5:50 p.m.