# Regression with a quadratic term of a variable that has both negative and positive values

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.

• 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) – Glen_b Jul 28 '16 at 1:37