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.
Hello,
I have moved this post to 'Statistical Procedures' board.
Koen
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
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
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
Good luck,
Koen
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 :
Label | RR=exp(L Beta | Lower CL | Upper CL | L Beta | Lower CL | Upper CL | Pr > ChiSq |
0 vs 4 direct | 0.682 | 0.5661 | 0.8216 | -0.3827 | -0.569 | -0.1965 | <.0001 |
linear Div=10 | 0.9176 | 0.8827 | 0.9539 | -0.086 | -0.1248 | -0.0472 | <.0001 |
linear Div=1 | 0.4231 | 0.2871 | 0.6236 | -0.8602 | -1.248 | -0.4723 | <.0001 |
Prm1 | Prm2 | Prm3 | Prm4 | Prm5 | Prm6 | Prm7 |
0 | 0 | 0 | 0.2 | 0.1 | 0 | -0.1 |
Prm1 | Prm2 | Prm3 | Prm4 | Prm5 | Prm6 | Prm7 |
0 | 0 | 0 | 2 | 1 | 0 | -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,
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.