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()
Variance of each single residualHi Statlist, I am struggling into constructing the residuals' specific variance for the following m…
How to extract a country specific value for each country in a panel data setI have a panel date set wich consists of 49 countries and want to extract fed funds rate for each co…
covariance structure in mixed modelDear all, I've been having problems selecting the correct covariance structure and for my mixed mod…
How to save graphs from loop in particular folderHow to save graphs from loop in a particular folder. I have my out foder: global MY_OUT "C:\Users…
Unobserved Componenet Model and State Space ModelDear All I am try trying to construct an index, using Unobserved Component Model (UCM) and State Sp…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple imputation and conditional()
Post a Comment