1
$\begingroup$

I am running a linear regression with a quadratic regressor of this form: Y= X + X^2 + W + error

My X variable is a measure of difference (rainfall for the year of Y - long term rainfall average), it therefore can take both positive and negative values. I was wondering whether I should enter the quadratic term as is (therefore containing only positive values) or whether I should manually replace the square values with their negative for the X that are negative.

Thank you in advance for your answer!

$\endgroup$
  • $\begingroup$ Why would you seek to negate the squared terms when the variable is negative? What's that for? (also possibly relevant -- why did you include a quadratic term?) $\endgroup$ – Glen_b Jul 27 '16 at 23:42
  • $\begingroup$ I need to include a quadratic term because I expect the effect to be non-linear (the variable may play a role especially at very high positive values or very low negative values). I was wondering whether to replace the quadratic value by its negative when the base value is negative because conceptually a value of -5 and a value of +5 represent very different situations while they yield the same quadratic value of +25. From the answers below it seems that this is not an issue and that the coefficients can be interpreted as if the polynomial was fit to a variable including only positive values. $\endgroup$ – Sara S Jul 28 '16 at 1:14
  • $\begingroup$ I'm not sure I see the difficulty with positive and negative $x$ yielding the same $x^2$, since they have different $x$ -- the combined effect is different for +ve and -ve; I asked in case there was particular theory that gives different behavior for the -ve side. If you think about a relationship being curved in a parabolicish way, then you probably just want a quadratic. If you want to have more complicated things than a simple quadratic then unless theory provides a specific functional form you should probably consider moving to a different framework than that (e.g. natural cubic splines) $\endgroup$ – Glen_b Jul 28 '16 at 1:37
1
$\begingroup$

When you introduce a quadratic term in a regression, you are just adjusting a parabola to your data, and a parabola can take positive and negative values depending on the coeficients. Then, there is no need to change signs of your data or their squares.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

If you are using software like SPSS or Minitab, then specify that you want to do a quadratic regression and leave the X values as they are. The software can give the X and X^2 terms negative coefficients to fit the curve through negative Y values.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.