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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.