cal_2_sim: The cal_2_sim() function to calibrate (poststratify or rake)...

View source: R/cal_2_sim.R

cal_2_simR Documentation

The cal_2_sim() function to calibrate (poststratify or rake) an outcome onto simulted poststrata totals

Description

The cal_2_sim() function to calibrate (poststratify or rake) an outcome onto simulted poststrata totals

Usage

cal_2_sim(des_2be_cal, df_or_list_sim, form_outcome, form_poststrat, type_cal)

Arguments

des_2be_cal

is a ?survey.design object created by ?survey::svydesign

df_or_list_sim

1 simulation of single data.frame (for joint) or single list of data.frames (for marginals)

form_outcome

a formula of the outcome, whose total we want an improved MCS estimate of

form_poststrat

single formula of joint poststrata or list of formulas for marginal poststrata

type_cal

either mcsp or mcsr (MCS by poststratification or raking)

Value

a list of data.frames with c("total","SE") as columns


statsccpr/MultCal2Sim documentation built on Sept. 3, 2022, 12:39 p.m.