mcmc

Reply
Contributor
Posts: 40

mcmc

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;

 

 

SAS Super FREQ
Posts: 3,415

Re: mcmc

Ask a Question
Discussion stats
  • 1 reply
  • 124 views
  • 0 likes
  • 2 in conversation