survey <- MU284.complex.surveys[[1]]
rescaled.bootstrap.weights(survey.data = survey,
survey.design = ~ CL,
weights='sample_weight',
idvar='LABEL',
num.reps = 2)
if (FALSE) {
bootweights <- rescaled.bootstrap.weights(
# formula describing survey design:
# psu and strata
survey.design = ~ psu +
stratum(stratum_analysis),
num.reps=10000,
# column with respondent ids
idvar='caseid',
# column with sampling weight
weights='wwgt',
# survey dataset
survey.data=mw.ego)
}
Run the code above in your browser using DataLab