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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.