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
- /
- SAS Programming
- /
- General Programming
- /
- HELP - Regression urgent!

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

04-06-2012 01:18 PM

I am using a regression model to forecast a dependent variable.

The thing is that I want to set a contraint all the estimated coefficients to be > 0.

Backward stepwise regression is to be applied.

proc reg: there is the "restrict" option but it does not allow >, < .

Please help

Thank you in advance

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

04-06-2012 04:05 PM

Hello -

From: http://support.sas.com/kb/22/636.html

Q: Can I apply an inequality constraint (for example, B1>0) to the parameters in PROC REG?

A: The RESTRICT statement in PROC REG allows only equality constraints. However, you can use the BOUNDS statement in PROC NLIN to apply inequality constraints.

Example:

proc nlin data=sashelp.class ;

parms b0=0 b1=0 b2=0; ** you need to supply appropriate starting values;

bounds b0 b1 b2 >= 0;

model weight = b0+b1*age+b2*height;

output out=result p=predict;

run;

Thanks,

Udo

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

04-06-2012 06:59 PM

Thanks for the immediate reply but I am not sure whether proc nlin can help me here.

The thing is that I need to apply a "backward stepwise regression" and to obtain a p-value for each covariate coefficient, so as everyone will be significant at a% significance level.

Proc nlin:

(a) gives a p value for the entire model and not for the estimates

(b) I do not thing it executes a stepwise regression.

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

04-07-2012 03:42 PM

I don't think it would be a good idea to do variable selection and impose bounds at the same time. NLIN, as suggested by , would likely allow you to eliminate many covariates, as they would be clamped to zero. You can also gage parameter importance by looking at the confidence limits of the positive estimates.

PG

PG

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

04-08-2012 03:24 AM

Thank you for your reply,

As I said before there are some restrictions in NLIN (e.g. (a) gives a p value for the entire model and not for the estimates, (b) I do not thing it executes a stepwise regression) that make it unusable for me.

I am considering using GLMSELECT but I am not sure whether it fits in my case.

Its hard for me to believe that none has came up with a similar problem in the past.

There must me a solution.

Can't we make PROC REG to accept such a constraint?

Is there any substitute to REG? Btw, I am using 9.3 base version.

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

07-18-2013 01:17 PM

Hello,

I am having the same problem as you did with the restrictions "<" & ">" on estimated coefficients, e.g. Coef X1 >= Coef X2. Actually I am as surprised as you were, tassr82, that no one came up with this particular problem in the past..

How did you solve your problem ? Neither PROC REG, nor GLM & GLMSELECT accept the BOUNDS Statement. And it has to be a linear regression with continuous variables.

Maybe someone else has a clue ??

Thanks in advance for your help !

PS: I am also using SAS 9.3.

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

07-19-2013 08:08 AM

Part of the reason that I think no one has come up with it is that the selection methods (stepwise, etc.) coefficients and standard errors are biased to begin with, so that placing a bound or restricting the values impies (to me at least) that even the tenuous theoretical basis for selection using these methods is violated. Any development would involve simulating the situation, and it would become apparent that the selection was just not working well.

See 's comment above for a method that would address variable selection under this restriction.

Steve Denham