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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1349 views
  • 0 likes
  • 2 in conversation