Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
AndrewBronson
Calcite | Level 5

I am looking to run a regression analysis but only get positive coefficients just based on the scenario of my calculation negative coefficients are nonsensical.  I am currently using PROC REG with a LSMEANS but I dont know if this is the only way to run it.  I have tried to use RESTRICT and BOUNDS but neither have worked. 

 

Thanks in advance

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Well, here's the problem. If you have multiple X variables in your regression, and they are correlated with one another, you can get slopes that seem to have the wrong sign. This is a consequence of including variables that are correlated with one another.

 

You can try removing variables from the model, or use PROC PLS instead of PROC REG, which is less susceptible to this problem.

--
Paige Miller
AndrewBronson
Calcite | Level 5

Yes I figured the multicollinearity is likely a problem.  I will try the PROC PLS.  Thank you for the suggestion

stanmarciano
Fluorite | Level 6

If you have a very sound theoretical backing for your coefficients to be positive, then you could use bayesian regression method and set the prior distributions from positive distributions: 

 

Here are some helpful links for bayesian regression:

 

1) Basic setup of model using proc Genmod: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect...

 

1a) How to change priors: 

https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect...

 

Alternatively (This might be the best proc to use in your case):

Proc MCMC is another possible solution:

3) Proc MCMC linear regression: https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_mcmc_sect00...

 

Here note that I am assuming that you have very solid theoretical backing for your Beta coefficients to be positive. This is a very strong assumption and has to be based on evidence from prior literature or some other source. 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2658 views
  • 2 likes
  • 3 in conversation