BookmarkSubscribeRSS Feed
j4copo
Fluorite | Level 6

How can I run proc genmod keepimg fixed some parameter value

3 REPLIES 3
SteveDenham
Jade | Level 19

This sounds really kludgy, but the only way I see to do this is to preprocess the data.  Plug the fixed value in and subtract it from the dependent variable. This may require using the correct link function. I don't see any other way in GENMOD.  The other alternative I can think of would be to do something in NLMIXED that was the equivalent of the GENMOD fitting, and use the BOUNDS statement.

Steve Denham

Message was edited by: Steve Denham

MattFlynn
Calcite | Level 5

see the offset statement:for quick and easy "fixing" of parameters to a desired value.

An example here

http://www.nesug.org/proceedings/nesug07/sa/sa08.pdf

 

ata freq_data;

set input;

claim_freq=claim_count / exposure;

offset_factor=1;

if driver_age_group =3 then offset_factor=1.05;

if driver_age_group =4 then offset_factor=1.25;

logoffset=log(offset_factor);

if driver_age_group in (1,2) then driver_age_group_new= driver_age_group;

else driver_age_group_new =9;

run;

proc genmod data=freq_data;

class driver_age_group_new type;

model claim_freq = driver_age_group_new type

/ dist=poisson link=log offset= logoffset;

run;

Best regards,

-Matt

SteveDenham
Jade | Level 19

Matt, how does this fix the parameter value?  I can see that it scales it for various age groups, but I was under the impression that the OP wanted a fixed single value, something like:

model y = x1--x10/dist=poi;

with, for example, the contribution of x1, x2, and x3 being constant.

Steve Denham

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
  • 824 views
  • 0 likes
  • 3 in conversation