Hi everybody,I'm a beginner in R so this question it could may simple for u
(I hope it).I need to study the interaction between 4 independent variables
(x1, x2, x3, x4) and a dependent variable (y). So I've used a list of
regression models (using the "lm" function)
as:REGR.LIN<-lm(y~0+x1+x2+x3+x4)now I want to understand which could be the
best model to use, using the "stepAIC" function :stepAIC(REGR.LIN, scope =
list(lower=.~ 1, upper = .~(x1+x2+x3+x4)^4), , scale=4,k=2,
step=1000)However, the point is that with this script I obtain:Start: 
AIC=3.240195e+19y ~ 0 + x1 + x2 + x3 + x4.....Step:  AIC=2.771929e+19y ~ x1
+ x2 + x3 + x4 + x1:x3 + x1:x4 + x2:x4 + x2:x3 + x1:x2 +     x3:x4 +
x1:x2:x3 + x1:x2:x4 + x2:x3:x4 + x1:x3:x4 + x1:x2:x3:x4 -     1There's a way
to obtain all the other not linear combination (for example x1^4 : x2^4,
x1^3 : x3^4 ...)????(I can have it when I write in the "lm" function all the
variables, but I'm finding a way to obtain the same result in the stepAIC
function, without changing anything in the lm function)Thank u!



--
View this message in context: 
http://r.789695.n4.nabble.com/stepAIC-with-lm-tp4685992.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to