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.
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.