user3036922 user3036922 - 1 year ago 64
R Question

Imputation for complex survey design (nhanesIII)

I would like to impute data for a complex survey design. I have replicate weights (about 50) and a sampling weight. Although I found an example of how to do imputations in R (see below), it has a place for sampling weight (

, see a line with “designs” below”) but there is no place for replicate weights. Could you please help me figure it out how to impute data using replicate weights?



impdata <- imputationList(c("set1","set2","set3","set4","set5"),
dbtype="SQLite", dbname="~/nhanes/imp.db")

designs <- svydesign(id=~SDPPSU6, strat=~SDPSTRA6,
weight=~WTPFQX6, data=impdata, nest=TRUE)

Answer Source

you need to use svrepdesign not svydesign for replication-backed designs, and you no longer need to specify the id= or strat= parameters, since that information should be contained in the replication weights. the two closest examples to multiply-imputed nhanes on should be


but svrepdesign has a bunch of other parameters that you need to confirm you are using correctly by matching some cdc-published statistic. good luck!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download