[R-sig-eco] Multiple regression

Mario José Marques mariojosebr at yahoo.com.br
Fri Jan 4 20:32:47 CET 2013


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

-- 
...................................................
Mario José Marques
Master student in Ecology
Institute of Biology, Dept. Plant Biology, Ecology Lab.
State University of Campinas - UNICAMP
Campinas, São Paulo, Brazil



More information about the R-sig-ecology mailing list