BookmarkSubscribeRSS Feed
Abby
Calcite | Level 5

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

2 REPLIES 2
SteveDenham
Jade | Level 19

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

msb1
Calcite | Level 5

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

sas-innovate-2024.png

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.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 4268 views
  • 0 likes
  • 3 in conversation