Hi everyone,
I have a question regarding mcmc imputation. From what I understand, the 1st step should be the imputation phase with proc mi data= ........
then the 2nd should be the analysis phase: e.g proc glm.......
and the 3rd is the pooling phase with proc mianalyze ......
My Question: I used mcmc in the 1st step and would like to include more than one variable in the 2nd step since I have more than one variable to impute:
The problem is that only the last model statement is used: ( WARNING: Only the last MODEL statement is used.)
If I can only model one variable at a time, how can I combine those together in the end.??
Here is the code:
proc mi data=cohort1 nimpute=20 out=cohort_MCMC_1
seed=2017
round= 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
min= 14 1 0 0 0 0 0 0 0 0 0 0 30 1 0 0 0 0 0 0 0 0 0 0 0 1200 1200 1200 1200
max= 45 20 10 20 1 1 1 1 1 1 1 1 42 9 1 1 1 1 1 10 10 10 10 10 10 5500 5000 5000 5000 ;
mcmc impute=monotone ;
var x1 x2 x3 x4 -------- x20 ;
run ;
/**************************************************************************************/
proc glm /* or mixed */ data=cohort_MCMC_1 ;
class x1 x2 x3 ------x10;
model x1= x1------x5;
model x2= x2-----x7;
model x3= x6-------x15 ;
model x4= x4------x20;
by _imputation_;
ods output ParameterEstimates=gm_mcmc;
run;
This appears to be a duplicate of https://communities.sas.com/t5/SAS-Statistical-Procedures/Multiple-imputation/m-p/316822
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.