[R] refering to variable names in lm where the variable name is in another variable
dan.oshea at dnr.state.mn.us
Sun Dec 30 18:49:26 CET 2007
I am trying to refer to a variable name in a lm regression where the variable name is in another variable, but it does seem to work. Here is an example:
#error in model frame....:variable lengths differ().
I also get the error if i just refer to variable x1 as nam in the lm. any suggestions. I am trying to set up a for loop that will perform an all subsets regression and calculate the AIC for each.
More information about the R-help