BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I need to fit a gamma glm using PROC GENMOD and then output the parameters such that I can forecast within a microsimulation model. Tech support tells me that PROC GENMOD is the only procedure which allows you to use the gamma family of models. However, given that the gamma family requires a class statement, I can't output the parameters or use PROC SCORE. Is there any way to work around this such that I can output parameters?
3 REPLIES 3
Robert
Fluorite | Level 6
Try using this ODS statement before your GENMOD step. It should create a temporary dataset named PARAMS.

ods output ParameterEstimates=params;
proc genmod;
... model, class, other statements ...
run;
ods output close;
deleted_user
Not applicable
Thanks very much Robert!

Is there any easy way to use these parameters to project the response for a new data set, without having to manually pass the parameters and some random responses through the link function?
deleted_user
Not applicable
I got around this issue by creating a dataset with the explanatory vars you need for the projection. For example say you have data for years 1 to 5 and you want to project to years 6 to 10. Then I'd construct the dataset so that it had

data A
year outcome
1 value
2 value
3 value
4 value
5 value
6 .
7 .
8 .
9 .
10 .

then you run your proc genmod and output the results into new dataset.

Hope that helps you out.

BTW I posted a query today relating to how to get the prediction interval. Have you had any experience with that?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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