Re: [R] Forcing a negative slope in linear regression?

2011-06-01 Thread John C Frain
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

Re: [R] Forcing a negative slope in linear regression?

2011-05-31 Thread Rolf Turner
(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

Re: [R] Forcing a negative slope in linear regression?

2011-05-31 Thread Bill.Venables
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

Re: [R] Forcing a negative slope in linear regression?

2011-05-31 Thread Jeff Newmiller
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. -

[R] Forcing a negative slope in linear regression?

2011-05-31 Thread J S
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