Help using Base SAS procedures

Proc Genmod output parameters

Posts: 0

Proc Genmod output parameters

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?
Occasional Contributor
Posts: 8

Re: Proc Genmod output parameters

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 ...
ods output close;
Posts: 0

Re: Proc Genmod output parameters

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?
Posts: 0

Re: Proc Genmod output parameters

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?
Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation