[R] forward model selection
Stefano
stecalza at tiscalinet.it
Fri Mar 23 18:51:06 CET 2001
Dear all,
I want to select a linear model by means of a forward selection procedure, adding only the main terms, that is x1+x2+x3+...xn.
Is there a fast way to specify all the main terms without writing each one?
For example:
linear <- step(lm(resp~1,data=dati),scope=(upper="all main effects",lower=~1),direction="forward")
Thanks,
Stefano
*******************************
Stefano Calza
Istituto di Statistica Medica e Biometria
Università degli Studi di Milano
Via G. Venezian, 1
20133 Milano
tel. +39 02/2361302, 02/70600908
fax 02/2362930
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list