Hi Listers,
I am interested in conducting a multiple imputation on a dataset looking at healthy behaviours. I would like to impute missing data using mi impute chained.
In one question, they were asked if they smoked (smoking). If they answered yes, they were also asked how many cigarettes per day (CPD). For the latter variable, I therefore have some missing data but for some participants this information is missing as they do not smoke so I would not want to impute any value for them.
I explored the possibility of using the conditional sub-command so that
mi impute chained (pmm, knn(3) conditional (if smoking==1)) cpd ///
(logit, augment) smoking... = regular variables, add(50)
However, I get an error message saying 'No complete observations outside conditional sample; imputation variable contains only missing values outside the conditional sample'.
This is true but is there any workaround to deal with it either using the -conditional()- option or a different approach?
Thanks in advance!
Related Posts with Multiple imputation and conditional()
xtreg how to see estimated coefficient for each obserevationDear Stata users, I'm using xtreg and need to generate a variable to give the estimated coefficient …
Plotting adjusted means as a bar graphHi, I am trying to plot the adjusted means (in the form of a bar graph as both predictors are categ…
Difference in N of obs. in Cox modelHi, I have a problem regarding the difference in the number of observations between the Cox model a…
List of values of variable by patient-IDDear stata-community, I would like to have a list of how many patients that has a certain age, but o…
New package on SSC: esteta - estimate long-run effects using historical instrumentsWith thanks to Kit Baum for maintaining the SSC archive, I hereby announce the availability of the p…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple imputation and conditional()
Post a Comment