[R] glm(y ~ -1 + c, "binomial") question

Yuelin Li yuelin at pandora.outcomes.chop.edu
Thu May 16 21:03:12 CEST 2002

This is a question about removing the intercept in a binomial 
glm() model with categorical predictors.  V&R (3rd Ed. Ch7) and 
Chambers & Hastie (1993) were very helpful but I wasn't sure I 
got all the answers.  

In a simplistic example suppose I want to explore how disability 
(3 levels, profound, severe, and mild) affects the dichotomized 
outcome.  The glm1 model (see below) is the same as glm2 (2 dummy 
variables coding sever and mild).  In both models the reference 
level is profound disability.

My questions are:

1. How do I interpret the coefficients in the third model (the 
intercept is removed)? 

2. Does glm3 make sense?  Does anyone ever want to construct a 
model like glm3?  If so, when? 

3. What is the algebraic specification of glm3?

Many thanks,

-- Yuelin Li.


categ <- factor(rep(c(1, 2, 3), times=c(20, 20, 20)),
                labels=c("P", "S", "M"))
Y <- c(1,1,1,1,1,1,2,1,2,1,2,1,1,1,1,1,1,2,2,
Y <- Y == 2
glm1 <- glm(Y ~ categ, family="binomial")
glm2 <- glm(Y ~ c(categ == "S") + c(categ == "M"), "binomial")
glm3 <- glm(Y ~ -1 + categ, "binomial")

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list