BookmarkSubscribeRSS Feed
awardell
Obsidian | Level 7

Hello,

 

Say I have a dataset on penguins, some of which are red, some of which are blue, some green. I reduce the dataset to only the blue penguins, as they are the penguins of interest. 

Of the penguins which are blue, some proceed to choose to have baby penguins, some do not. 

 

These blue penguins each fall into 1 of 4 exposure groups indicated by the exposure_group variable. 

 

I want to model the binary outcome, babies, which is an indicator (1= babies, 0= not). Additionally, my model should contain the continuous covariates age and height, and a categorical covariate, sex. 

 

I am trying to use a log binomial model: 

proc genmod data=blue_penguins descending;
class exposure_group(ref=1) sex(ref=1);

model  babies= exposure_group sex height age / DIST=bin link=log; 

estimate ???

run;

I need to achieve the relative risk of each of  the exposure groups vs the reference exposure group to proceed to have babies, adjusted for the covariates. 

 

How can I do this programmatically? 

 

Any help would be greatly appreciated. 

2 REPLIES 2
Ksharp
Super User
You can get relative risk by PROC FREQ.

proc freq data=have;
table a*b/relrisk ;
run;
StatDave
SAS Super FREQ

The log-linked binomial model is often a problem to fit since the log link doesn't not ensure that predicted values are valid means (between 0 and 1 for the binomial distribution). It is better to a regular logistic model and then use the NLMEANS macro as illustrated in this note.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 777 views
  • 3 likes
  • 3 in conversation