[R] forcing a variable in a model

Jenny Dawson jennydawson1122 at hotmail.com
Thu Oct 13 00:33:53 CEST 2005


I am interested in using polymars in R.  I will be inputting 10 X variables 
and my outcome Y variable.  I want to make sure my final model includes X1 
and any additional variables (X2-X10) chosen with the data adaptive 
regression technique.  Is this possible with polymars?

In addition, if I use the step() finction after a lm() function, can I force 
one variable to be in the final model?  I tried using the scope argument in 
the step() command, but had no luck.  I set my upper equal to my full model 
and was not sure how I tell R that my lower model must have X1 in the model.


Thank you in advance,
Jenny




More information about the R-help mailing list