Displaying 1 result from an estimated 1 matches for "mpfd".
Did you mean:
mfd
2009 Jul 30
1
creating subsets within lm()
Dear All,
the lm() function has the possibility to create a subset of the
possible explaining variables that you have. However, in the help
there is no example how to use this subset option. I tried the
following:
model<-lm(dependent.data$MPFD~.,data=explaining.data,subset=c(1,0,0,0,0,0,0,0,1,1,0,0))
MPFD is the dependent variable stored in the data frame
dependent.data, and all 12 explaining variables are stored in the data
frame explaining.data.
However, this yields a model with only an intercept, and the comment
"Coefficients:...