Skip to content
Prev 3467 / 7420 Next

Multiple regression

Hi all,

I have a doubt with multiple regression. I have this model:

y ~ x + w + z

but the response y to z is humped. I check this by plot and run:

lm(y ~ z + I(z^2) # better r-square that lm(y ~ z)

I'd like use this response with quadratic term in multiple regression. I
think that if I use like this:

lm(y ~ x + w + z + I(z^2))

the model statistic is not correct because, for instance, x response
with w, z, and I(z^2) constant and not response of z corrected by z^2.

How can I do this with lm.

Kind regards,

Mario