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()
nonest outside xtregThe -xtreg- command has an undocumented -nonest- option which permits the use of cluster() when the …
Date format using month and yearHi, I am trying to make a new variable called "date" using the month and year in my dataset. The var…
Repeated time values within panel when trying to create new variableHi, I am trying to create a variable called "fempstat" which measures an individual's employment sta…
Plotting heterogenous (interaction) effect in event study plotI have the following dataset,
Code:
* Example generated by -dataex-. For more info, type help data…
Generalized Leontief variable cost functionDear All,
I am having difficulty to estimate in Stata a generalized Leontief variable cost function…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple imputation and conditional()
Post a Comment