I have deduced my final model using proc genmod procedure in SAS. My dependent variable is binary; and I have categorical variables as predictors in my final model. I am interested in understanding which category of a variable is driving the whole effect, and was wondering if it is possible to use LSMEANS statement in genmod. When I try using the LSMEANS statement, I get the following error:
The model does not have a GLM parameterization. This parameterization is required for
the TEST, LSMEANS, LSMESTIMATE, and SLICE statement. These statements are ignored.
Could someone please let me know the feasibility of using this procedure when we have a binary dependent variable? Thanks.
Best regards,
Abby
Hi Abby,
Which version of SAS/STAT are you using, as the answer may depend on that?
Can you share your PROC GENMOD code? It should be easy to change the CLASS statement to glm parameterization, which will open up all of these options. Something like:
CLASS <your list of class variables here> / PARAM=GLM;
A quick check showed that the GLM parameterization is the default. I only got the error you mentioned when I specified PARAM=REF.
An alternative approach, which works with the REF parameterization, would be to use PROC GLIMMIX.
Steve Denham
Hi there,
Is it possible that when changing from param=ref to param=glm the model experiences convergence issues? Here's my original code:
proc genmod data=in.final;
class link_id agec (param=ref ref='1') sexf (param=ref ref='1') eth_f (param=ref ref='1')
year (param=ref ref=last) poly_meds_anyF (param=ref ref="0") Cluster (param=ref ref=last)
imd_local_quintile_f(param=ref ref=last) lang_F (param=ref ref='E');
model total_cons=sexf agec eth_f Cluster countltcs Cluster*countltcs imd_local_quintile_f poly_meds_anyF year lang_F /dist=negbin;
repeated subject=link_id / type=AR(1) covb corrw;
store out=catcont;
run;
Here's the param=glm code:
proc genmod data=in.final;
class link_id agec sexf eth_f year poly_meds_anyF Cluster imd_local_quintile_f lang_F/param=glm;
model total_cons=sexf agec eth_f Cluster countltcs Cluster*countltcs imd_local_quintile_f poly_meds_anyF year lang_F /dist=negbin;
repeated subject=link_id / type=AR(1) covb corrw;
store out=catcont;
run;
Thanks very much,
Marina
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.