Hi,
I encountered a trouble when I wanted to use PROC MIANALYZE with poisson regression with robust error variance, which was performed by PROC GENMOD + repeated statement (see link ESTIMATE RELATIVE RISK IN SAS USING PROC GENMOD)
According to the example on SAS website (Reading Generalized Linear Model Results), I need three dataset to make MIANALYZE work. They are datasets for parameter estimates, parameter information and covariance matrix. Because my procedure is for poisson regression with repeated statement, I output three tables "GEEEmpPEst", "ParmInfo" and "CovB" for the three datasets needed.
The issue is, the approach works when I have only one predictor but does not work if I had multiple predictors. The error info says "CovB" was not created, which basically means it does not generate the CovB dataset. I tried to get table "GEERCov" and "GEENCov" and none of them exist.
My question is, how can I get a covariance matrix from a model with more than one predictor using poisson regression with robust error variance, to apply to the MIANALYZE procedure?
Thank you!
In general, unless you are using the TEST statement or the MULT option, it is not necessary to include the COVB= and PARMINFO= data sets in Proc MIANALYZE. Thus if you provide just the PARMS(CLASSVAR=LEVEL)= data set then you should be good to go.
proc genmod data=outmi;
by _imputation_;
class a id;
model y=a x/d=bin link=log;
repeated subject=id;
ods output geeemppest=parms;
run;
proc mianalyze parms(classvar=level)=parms;
class a;
modeleffects intercept a x;
run;
In general, unless you are using the TEST statement or the MULT option, it is not necessary to include the COVB= and PARMINFO= data sets in Proc MIANALYZE. Thus if you provide just the PARMS(CLASSVAR=LEVEL)= data set then you should be good to go.
proc genmod data=outmi;
by _imputation_;
class a id;
model y=a x/d=bin link=log;
repeated subject=id;
ods output geeemppest=parms;
run;
proc mianalyze parms(classvar=level)=parms;
class a;
modeleffects intercept a x;
run;
Thank you Rob!
Actually, I also found that if I requested the GEE covariance matrix by adding "ecovb" after the repeated statement, then I am able to get the GEE empirical covariance matrix "GEERCov".
Thank you again for your advice!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.