I have created two generalised linear models as follows:
glm1 <-glm(Y ~ X1 + X2 + X3, family=binomial(link=logit))
glm2 <-glm(Y ~ X1 + X2, family=bino
I'm guessing that you meant to type:
glm1 <-glm(Y ~ X1+X2+X3, family=binomial(link=logit))
glm2 <-glm(Y ~ X1 + X2, family=binomial(link=logit))
The formula interface for R regression functions does not recognize commas as adding covariates to the RHS of the formula. And don't use attach(); use the data argument to regression functions.