Let's say I want to fit a set of X's to a Y. For example:
fit <- glm(Y~x1+x2+x3,data=mydata,family=binomial())
Instead of using variable names X1, X2, X3, I'd like to fit Y using the 31 features in positions/columns 20 to 50 from mydata. I've seen this done before but can't find the example. Can anyone please provide an example ... thanks.