BookmarkSubscribeRSS Feed
RobertWF1
Quartz | Level 8

I'm working on a regression model where Y is inpatient counts distributed according to the zero-inflated negative binomial pdf. 

 

We'd like to fix the trend coefficient on the Y count in the prior 12 month period so that mean(Y_post) = 0.70*mean(Y_pre).

 

Having discovered the offset trick for forcing coefficients in proc genmod here, how would I construct the offset knowing it's a GLM and not a linear regression?

 

Do I first need to take a natural log transform of the trend constant since E(Y_post)=exp(beta0 + trend*Y_pre + beta1*x1 + beta2*x2 + ...) for the ZINB distribution?

 

Or does SAS handle the log transforms for me and I simply code as follows? 

 

%let trend = 0.70;
data analysis_data; set analysis_data; y_pre_trend = &trend*y_pre; run; proc genmod data=analysis_data; model y_post = x1 x2 x3 / offset=y_pre_trend dist=zinb;
zeromodel; run;
3 REPLIES 3
RobertWF1
Quartz | Level 8
Found SAS Usage Note 22800: Restricting model parameters that seems to support the above interpretation:

https://support.sas.com/kb/22/800.html
RobertWF1
Quartz | Level 8
Thanks - this is an interesting read, but unfortunately only applies to linear regression models.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 854 views
  • 2 likes
  • 2 in conversation