3

I am working through Applied Longitudinal Data Analysis: Modeling Change and Event Occurence by Singer and Willett, using the R code supplied here. I am working through Chapter 11, on fitting discrete-time hazard models, and came across this model specification.

model <-glm(event~factor(period) + pt + pas - 1, family="binomial", data=firstsex.pp)

Which yields this output:

Call:
glm(formula = event ~ factor(period) + pt + pas - 1, family = "binomial", 
    data = firstsex.pp)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.1787  -0.6182  -0.4338  -0.2836   2.7862  

Coefficients:
                 Estimate Std. Error z value Pr(>|z|)    
factor(period)7   -2.8932     0.3206  -9.024  < 2e-16 ***
factor(period)8   -3.5848     0.4230  -8.474  < 2e-16 ***
factor(period)9   -2.1502     0.2775  -7.750 9.20e-15 ***
factor(period)10  -1.6932     0.2646  -6.398 1.58e-10 ***
factor(period)11  -1.5177     0.2757  -5.504 3.71e-08 ***
factor(period)12  -1.0099     0.2811  -3.592 0.000328 ***
pt                 0.6605     0.2367   2.790 0.005266 ** 
pas                0.2964     0.1254   2.364 0.018089 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1139.53  on 822  degrees of freedom
Residual deviance:  629.15  on 814  degrees of freedom
AIC: 645.15

Number of Fisher Scoring iterations: 5

I am familiar with logistic regression but have never encountered the -1 in a glm model specification before. The interpretation of the regression coefficients in the book seems to be exactly the same as it usually would be.

I am finding it difficult to obtain any online examples where it is used. What does this -1 mean? Is it something unique to survival analysis?

llewmills
  • 1,429
  • 12
  • 26
  • 1
    Where is the intercept in your output summary? Since you're using `R`'s formula notation, it's time to read its manual page on `formula`. – whuber Nov 02 '17 at 19:35
  • yes of course, the intercept is missing! The coefficient for each time period *is* that period's own intercept. Thank you @whuber. You are right. I do need to read the manual. – llewmills Nov 02 '17 at 19:40

1 Answers1

4

My guess is your variable period has only the values 7:12. You are modeling that as a factor (i.e., categorical variable). Literally, -1 in R is a command to supress the intercept. As a result, you end up using level means coding, instead of reference level coding. This doesn't actually change the model, but does cause the presentation to look different, and changes the interpretation of some of the values in the output.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
  • Thank you @gung. I figured someone had probably asked a similar question somewhere on CV, but hadn't noticed the missing intercept so couldn't search under those terms. – llewmills Nov 02 '17 at 19:47
  • 1
    You're welcome, @llewmills. It's always hard to search for something if you don't know what the search terms are supposed to be ;-). – gung - Reinstate Monica Nov 02 '17 at 19:49