I'm wondering if there's a way to force all non-intercept coefficients to be positive/negative in proc reg. If I use:
model depvar=indvar;
RESTRICT indvar<0;
Then I always get a syntax error. Looks like Proc reg only supports e开发者_开发知识库quations and not inequalities? I'm just wondering if there's any way to achieve this.
Direct from the source: Can I apply an inequality constraint to the parameters in PROC REG?
In short: no, but you can with PROC NLIN (nonlinear regression) with the BOUNDS statement.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论