My current linear model is: fit<-lm(ES~Area+Anear+Dist+DistSC+Elevation)
I have been asked to further this by:
Fit a linear model for ES using the five explanatory variables and include up to quadratic terms and first order interactions (i.e. allow Area^2 and Area*Elevation, but don't allow Area^3 or Area*Elevation*Dist).
From my research I can do +I(Area^2)
and +(Area*Elevation)
but this would make a huge list.
Assuming I am understanding the question correctly I would be adding 5 squared terms and 10 * terms giving 20 total. Or do I not need all of these?
Is that really the most efficient way of going about it?
EDIT:
Note that I am planning on carrying out a stepwise regression for the null model and the full model after. I am seemingly having trouble with this when using poly.