BookmarkSubscribeRSS Feed
mconover
Quartz | Level 8

Hello,

I apologize if the answer to this question is obvious but I'm having trouble finding a clear answer to my question.  I am using PROC GENMOD to estimate some incidence rates (adjusted for age distributions) for different regions, using the ESTIMATE statement. However, I am uncertain which variables to include in my CLASS statement.  Since I have region coded using dummy variables for the different levels, I know that doesn't need to be in the CLASS statement.  But if I am adjusting for age, age^2 and age^-1, do I put them in my CLASS statement?  When I leave the age terms out of the CLASS statement, my incidence rates seem too high.

If possible, please explain to me how the CLASS statement functions when estimating adjusted rates.  Doesn't it essentially make dummy variables across the levels of all of the variables included in the CLASS statement?  What I don't understand is why this is needed to estimate the incidence rates.

Thank you for your help.

Coding below -->

PROC GENMOD DATA=work.Merge_CountPT_AgeRegion1;

  CLASS age agesq ageneg1;

  MODEL cases = age agesq ageneg1 region2 region3 region4 region5

  / DIST=poi LINK=log offset=LOG_PT SCALE=deviance;

  ESTIMATE "IR: Region 1" int 1 region2 0 region3 0 region4 0 region5 0;

  ESTIMATE "IR: Region 2" int 1 region2 1 region3 0 region4 0 region5 0;

  ESTIMATE "IR: Region 3" int 1 region2 0 region3 1 region4 0 region5 0;

  ESTIMATE "IR: Region 4" int 1 region2 0 region3 0 region4 1 region5 0;

  ESTIMATE "IR: Region 5" int 1 region2 0 region3 0 region4 0 region5 1;

RUN;

2 REPLIES 2
SteveDenham
Jade | Level 19

Take a look at the write-up for the ESTIMATE statement under Shared Concepts and Topics of the SAS/STAT documentation, as well as in the GENMOD.documentation.

The CLASS statement will generate dummy codes, and there are at least 8 different ways these can be generated using the PARAM= option.  It is critical to know which is being used in estimate statements.

I am curious as to why you have dummy variables precoded for region, when it is a classic candidate for a CLASS variable, and then use age, agesq and ageneg1 as continuous covariates.  The five estimate statements could be replaced with a single LSMEANS statement.

Steve Denham

PaigeMiller
Diamond | Level 26

Agreeing with , the original poster seems to be using the CLASS statement opposite of the way it was intended to be used here. Region is CLASS, Age is not.

--
Paige Miller

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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