2
$\begingroup$

I am running a linear regression with a quadratic regressor of this form:

$$Y_t= \alpha + \beta_0 X_t + \beta_1 X^2_t + \gamma W_t + \eta_t.$$

Since my $X$ variable measures the difference between the rainfall of a given year and the long-term rainfall average, it can take both positive and negative values. I was wondering whether I should enter the quadratic term as it is (therefore containing only positive values) or manually replace the squared values with their negative for the negative X values.

$\endgroup$
3
  • $\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, 2016 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, 2016 at 1:14
  • 1
    $\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, 2016 at 1:37

2 Answers 2

3
$\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.

$\endgroup$
3
$\begingroup$

When introducing 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 coefficients. Then, there is no need to change the signs of your data or their squares.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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