BookmarkSubscribeRSS Feed
slegleye
Fluorite | Level 6

Dear users and experts.

 

I have a ordered categorical SES variable, ranked 0 ("disadvantaged") to 4 ("very privileged"). I use it as such in Modified Poisson regression using PROC GENMOD, to get Risk Ratios (RR).

I would like to compute one model with : SES as categorical (classic !) and with a trend test (in the same model) like : 

PROC GENMOD data=pop ; 

class sex SES (ref='4') /param=glm ; 

model tobacco(ref='0')=sex age SES /dist=POISSON link=log ; 

repeated subject =id/type=unstr ; 

estimate "linear approx. of SES" SES   2  1  0  -1  -2  /divisor=1 ; 

estimate "linear approx. of SES" SES   2  1  0  -1  -2  /divisor=10 ; 

run ;

 

I consider SES=4 (the "very privileged") as a reference and there seems to be a linear trend test : the beta coefficients for SES are, relative to the reference : 

SES=4  => beta4= 0 by construction  

SES=3  => beta3= -0.1219   (giving a risk ratio RR(3/4)=exp(-0.1219)=0.885)                

SES=2  =>betat2= -0.0958   (giving a RR(2/4)=0.909)

SES=1  =>beta1= -0.2166    (giving a RR(1/4)=0.805)

SES=0  => beta1= -0.3827   (giving RR(0 vs 4)=0.6820)

 

If I take the exponential of the betas, I get the Risk Ratios (no problem so far).  

 

The restults for the estimates are :

DIVISOR=1 : beta_d_1= -0.8602

DIVISOR=10 : beta_d_10= -0.0860.

This is correct as far as I understand the documentation.

But if  DIVISOR=1 was correct, that is if there was a slope of beta_d_1=-0.8602 then the RR(0 vs 4) would be approximately exp(-0.8602)^4=0.4231, which is far away from the "truth" RR(0/4)=0.682.

On the opposite, the result for DIVISOR=10 is : RR(0/4)=exp(0.0860)^4=0.71, that is very close to the "truth".

 

In addition, when I compute various estimates obtain with various values of divisor= , the DIVISOR=10 provides betas and RR that minimize the quadratic differences between betas obtained from the classic estimation and those obtained from the estimate statement. In short : the command 

"   estimate "linear approx. of SES" SES   2  1  0  -1  -2  /divisor=10 ;    " provides the best linear approximation of the effect of SES. 

 

Why is it so ? Why are the estimated linear RR obtained with divisor=1 so far away from the "truth" and why are those obtained with Divisor=10 so close ? Why divisor=10 seems the best ?

 

Thank you in advance.

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello,

 

I have moved this post to 'Statistical Procedures' board.

 

Koen

sbxkoenk
SAS Super FREQ

Hello,

 

Where did you get or have read that information?

 

To me,

DIVISOR=value-list

just specifies a list of values by which to divide the coefficients so that fractional coefficients can be entered as integer numerators.

Nothing more, nothing less.

 

Koen

 

sbxkoenk
SAS Super FREQ

Maybe you can find more info in below blogs :

 

The magical ESTIMATE (and CONTRAST) statements

By Chris Daman on SAS Learning Post April 23, 2012

https://blogs.sas.com/content/sastraining/2012/04/23/the-magical-estimate-and-contrast-statements/

 

"Easy button" for ESTIMATE statements

By Chris Daman on SAS Learning Post April 25, 2012

https://blogs.sas.com/content/sastraining/2012/04/25/easy-button-for-estimate-statements/

 

ESTIMATE Statements - the final installment

By Chris Daman on SAS Learning Post May 2, 2012

https://blogs.sas.com/content/sastraining/2012/05/02/estimate-statements-the-final-installment/

 

How to write CONTRAST and ESTIMATE statements in SAS regression procedures?

By Rick Wicklin on The DO Loop June 6, 2016

https://blogs.sas.com/content/iml/2016/06/06/write-contrast-estimate-statements-sas-regression-proce...

 

Usage Note 24447: Examples of writing CONTRAST and ESTIMATE statements

https://support.sas.com/kb/24/447.html

 

Usage Note 67024: Using the ESTIMATE or CONTRAST statement or Margins macro to assess continuous variable effects in interactions and splines

67024 - Using the ESTIMATE or CONTRAST statement or Margins macro to assess continuous variable effe...

 

Good luck,

Koen

slegleye
Fluorite | Level 6

Dear all. 

 

Thank you for the info. However, it does not answer my question. 

 

Here is the exact SAS code and output. AGE and sex are binary (17 and 18 years old ; boy vs girl) .

 

proc genmod data=mod ; where _imputation_=1 ;
ods output estimates=estimates ;
class id SES(ref='4') Sex age/param=ref ;
model binge3(ref='0')=sex age SES /dist=poisson link=log;
repeated subject=id/type=unstr ;
estimate '0 vs 4 direct' SES 1 0 0 0 -1 ;
estimate 'linear Div=10' SES 2 1 0 -1 -2 /divisor=10 e ;
estimate 'linear Div=1' SES 2 1 0 -1 -2 /divisor=1 e ;
run ;

The Contrast table is here : 

LabelRR=exp(L BetaLower CLUpper CLL Beta Lower CLUpper CLPr > ChiSq
0 vs 4 direct0.6820.56610.8216-0.3827-0.569-0.1965<.0001
linear Div=100.91760.88270.9539-0.086-0.1248-0.0472<.0001
linear Div=10.42310.28710.6236-0.8602-1.248-0.4723<.0001

 

Coefficients for Contrast linear Div=10
Prm1Prm2Prm3Prm4Prm5Prm6Prm7
0000.20.10-0.1

Coefficients for Contrast linear Div=1
Prm1Prm2Prm3Prm4Prm5Prm6Prm7
000210-1

 

The result for Linear Div=1 offers me what I expect (approximately): according to the Contrast table results, the corresponding RR for being SES=0 vs SES=4 is exp(-0.086)^4=0.71. On the opposite the result for Linear Div=1 gives RR (SES=0 vs 4)= exp(-0.8602)^4=0.423, far from the "true" RR that is 0.682, based on the direct exponential of the beta coefficient exp(-0.3827). Why Div=10 gives a more accurate result ?

 

Best, 

sbxkoenk
SAS Super FREQ

I am sorry.
I have no clue.

 

This paper is partially devoted to usage of the DIVISOR= option after forward slash ( / ) on ESTIMATE statement.

I have read it diagonally, but could not find the answer to your question.

SAS Global Forum 2010
Paper 269-2010
Practicalities of Using ESTIMATE and CONTRAST Statements
David J. Pasta, ICON Clinical Research, San Francisco, CA
https://support.sas.com/resources/papers/proceedings10/269-2010.pdf

 

As I have moved your post to the most appropriate board for it

, I am confident someone will come up with the right answer.

 

Thanks,

Koen

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 774 views
  • 1 like
  • 2 in conversation