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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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