turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Force a variable's coefficient during logistic reg...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-26-2014 12:38 PM

I want to do a logistic regression y (0 or 1) over a list of variables x1, x2, x3, x4. Now I want to fix x1's coefficient to be 2.5 and regress against x2-x4. How can I do it?

proc genmod data = mmm descending;

model y = x1 x2 x3 x4 /d=b;

run;

Now I want to fix x1's coefficient to be 2.5 such as:

proc genmod data = mmm descending;

model y = x1(coefficient to be fixed as 2.5) x2 x3 x4 /d=b;

run;

Is that doable? Thanks.

Jian

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-26-2014 02:40 PM

Please check estimation method for proc genmod.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-26-2014 04:18 PM

Hi there - I moved your post from the general support community space to the SAS Statistical procedures community so users can see your question there. Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-26-2014 04:52 PM

Use the offset option. This forces the coefficient to be 1. So, you first create a variable that is 2.5*x1, and use this.

data mmm; set mmm;

x1_25 = x1*2.5;

proc genmod data=mmm descending;

model y = x2 x3 x4 x5 / offset=x1_25 dist=b;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-03-2014 02:08 PM

Oh, that is sweet. I would have had some sort of data step where I subtracted off some horrible looking backtransformed from the logit value from the dependent.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-03-2014 03:32 PM

I agree. The drawback of the OFFSET= hack is that it only permits one variable, so isn't as versatile as the RESTRICT statement in PROC REG. Regardless. it's sooo clever!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-03-2014 03:59 PM

If you want b1=2.5 and b2=5.0, one could do:

data mmm; set mmm;

offset = 2.5*x1 + 5*x2;

run;

proc genmod data=mmm descending;

model y = x3 x4 x5 / offset=offset dist=b;

run;

And so on...