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?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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