Hi experts,
I try to use Stata to conduct single imputation for three variables. Two are continuous and one is binary. I chose single imputation because previous literature suggests so.
I intend to use mi impute to conduct single imputation, because I cannot find any online resource on using Stata to do single imputation. All are about multiple imputation.
I read that we need to impute multiple variables simultaneously, so I chose mi impute chained, because this is the only version of mi impute that seems to me to allow for imputing continuous and binary variables simultaneously. So my question is I want to know if the syntax I wrote as below is correct or not.
mi set wide
mi register imputed var1 var2 var3 // var1 and var2 are continuous; var3 is binary
set seed 181123
#delimit ;
mi impute chained (pmm,knn(5)) var1 var2 (logit) var3 = depvar indepvars, add(1);
#delimit cr
Two potential issues:
Am I correct in using add(1) in mi impute if my intention is to use mi impute to do single imputation? Or should I first produce, say 20 datasets (add(20)), and then take the average of them on var1, var2, and var3?
Am I correct in relying on mi impute chained in performing single imputation for continuous and categorical variables simultaneously?
I know my question is awkward. Many thanks in advance for any advice!
Related Posts with Single imputation
Inquiry about randomization (block size 4, 1:1 allocation)Hello, I'm conducting Stata command for randomization with the following details: Treatment group …
Multilevel analysis for longitudinal effectsDear Community, I am working with the European Working Conditions Survey and I would like to calcul…
For-loops are killing me!I created a postfile and now trying to display the results from that postfile. There are two variabl…
Show estimates for identical variables next to each other (e.g. via esttab)I have several models with (three-way) interactions terms, some of them are manually coded. I am sea…
New v17 features in Mata?This thread initiated recently by Joseph Coveney calls attention to one of the new date functions in…
Subscribe to:
Post Comments (Atom)
0 Response to Single imputation
Post a Comment