Hello everybody, I'm using SAS Studio and I'm a beginner, but I have the following problem.
The option CLASS in PROC MIANALYZE after the PROC PHREG doesn't work: where am I doing wrong?
If I run the following code:
PROC MI DATA=data NIMPUTE=10 out=out_data seed=54321;
mcmc plots=trace plots=acf ;
VAR hpcr cystatin_c;
RUN;
PROC PHREG DATA=out_data;
CLASS sex (REF=FIRST) ipertensione (REF='No') diabete (REF='No')
ipercolesterolemia (REF='No') cvd (REF='No') q_fumo (REF='No') ALBUMINURIA (REF='< 3.4') / PARAM=REF;
MODEL GIORNI*morto_vivo2(0) = ALBUMINURIA sex age ipertensione diabete ipercolesterolemia q_fumo cvd gfr p_ac_urico colesterolo c_ldl hpcr cystatin_c/ RISKLIMIT COVB;
BY _imputation_;
OUTPUT OUT=mi ParameterEstimates=a_mvn CovB=mxcovb;
RUN;
QUIT;
PROC MIANALYZE PARMS(CLASSVAR=full)=a_mvn COVB(effectvar=rowcol)=mxcovb;
CLASS ALBUMINURIA;
MODELEFFECTS ALBUMINURIA sex age ipertensione diabete ipercolesterolemia q_fumo cvd gfr p_ac_urico colesterolo c_ldl hpcr cystatin_c;
RUN;
The LOG follows:
So, if I change my code in this way:
PROC PHREG DATA=OUT_INCIPE NOPRINT;
CLASS sex (REF=FIRST) ipertensione (REF='No') diabete (REF='No')
ipercolesterolemia (REF='No') cvd (REF='No') q_fumo (REF='No') ALBUMINURIA (REF='< 3.4') / PARAM=REF;
MODEL GIORNI*morto_vivo2(0) = ALBUMINURIA sex age ipertensione diabete ipercolesterolemia q_fumo cvd gfr p_ac_urico colesterolo c_ldl hpcr cystatin_c/ RISKLIMIT COVB;
BY _imputation_;
OUTPUT OUT=a_mvn;
RUN;
QUIT;
PROC MIANALYZE DATA=a_mvn;
MODELEFFECTS ALBUMINURIA sex age ipertensione diabete ipercolesterolemia q_fumo cvd gfr p_ac_urico colesterolo c_ldl hpcr cystatin_c;
RUN;
I receive this message in the LOG file right after the PROC MIANALYZE:
Hi, Paola.
You're trying to pass a table of parameter estimates to proc mianalyze.
You can get the parameter estimates from PHREG as ODS output. Try changing your OUTPUT statement as follows:
ods output parameterEstimates = a_mvn;
Ray
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.