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
Question about scanning through directory and compress all stata filesHello, I just wanted to ask if I might run into any issues running the code below. We have some tera…
Age-adjusted P values for differences between categorical or continuous variablesHi, I have a table of baseline characteristics of a cohort in which I have compared the differences…
variable with multiple conditionsHello. I'm attempting to create a new variable (metabolic syndrome) based on meeting at least three…
Problems with simple adjusted logistic regression on small sample-size (n=13)Hi I am trying to make a simple logistic regression adjusted for one potential confounder ("Antibtio…
Sample Size AUC/AUROCHi all, I'm working on a study that will evaluate several score to predict the same outcome (surviv…
Subscribe to:
Post Comments (Atom)
0 Response to Single imputation
Post a Comment