Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
docfermi
Calcite | Level 5
proc genmod data = eyestudy;
 class carrot id;
 model lenses = carrot/ dist = poisson link = log;
 repeated subject = id/ type = unstr;
 estimate 'Beta' carrot 1 -1/ exp;
run;

above was copied from below:

https://stats.idre.ucla.edu/sas/faq/how-can-i-estimate-relative-risk-in-sas-using-proc-genmod-for-co...

 

Above statement allows exp(beta) and exp(confidence intervals).

But I don't understand, the part of estimate statement, 1 -1.  Is it because carrot is binary variable?  If the variable has more than 2 categories or continuous, how estimate statement will be different.  I would very much appreciate your help!

 

2 REPLIES 2
docfermi
Calcite | Level 5
proc genmod data = eyestudy;
 class carrot id;
 model lenses = carrot/ dist = poisson link = log;
 repeated subject = id/ type = unstr;
 estimate 'Beta' carrot 1 -1/ exp;
run;

above was copied from below:

https://stats.idre.ucla.edu/sas/faq/how-can-i-estimate-relative-risk-in-sas-using-proc-genmod-for-co...

 

Above statement allows exp(beta) and exp(confidence intervals).

But I don't understand, the part of estimate statement, 1 -1.  Is it because carrot is binary variable?  If the variable has more than 2 categories or continuous, how estimate statement will be different.  I would very much appreciate your help!

 

Sun

SAS_Rob
SAS Employee

Yes, it is because it has two levels.  The number of coefficients will correspond with the number of levels and the ordering of the levels.

 

There are a number of good examples and explanations of estimate/contrast statements found here:

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

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 1547 views
  • 0 likes
  • 2 in conversation