In econometrics economic theory often predicts a particular sign for a
slope variable. One often gets wrong signs on variables but the
coefficients as estimated, in such cases are usually both
statistically and economically insignificant. In such cases one
generally re-estimates the equation with
(1) You can easily force the slope to take on a *particular* value,
positive or negative, by using offset(). However just to constrain
the value of the slope to be less than or equal to 0 you'd have to
do a constrained optimization of the sum of squares. Not hard to
do, but probably (almost su
om: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Jeff Newmiller
Sent: Wednesday, 1 June 2011 11:38 AM
To: J S; r-help@r-project.org
Subject: Re: [R] Forcing a negative slope in linear regression?
If you force the slope, it is no longer a regression, so no. It
If you force the slope, it is no longer a regression, so no. It is best to add
those other dependent variables to the regression and evaluate whether their
presence causes the fit to improve and yield signs of coefficients that match
what you expect.
-
Dear forum members,
How can I force a negative slope in a linear regression even though the
slope might be positive?
I will need it for the purpose of determining the trend due reasons other
than biological because the biological (genetic) trend is not positive for
these data.
Thanks. Juli
5 matches
Mail list logo