PRACTICAL EXERCISE 11

 

In this exercise we will study further the Danish suicide data described in in practical exercise 10. In this exercise it is also described how you may read the data into R.

 

a) We start by fitting a model with age group (corresponding to the baseline hazard) and sex. This may be done by the commands (which were also given at the lectures in week 45):

 

fit.prop=glm(suicides~offset(log(pyears))+factor(agegr)+factor(sex)-1, family=poisson,data=suicides)

summary(fit.prop)

 

Perform the commands and inspect the output.

 

b) The summary command for a glm-object gives estimated regression coefficients with standard errors. However, for interpretation it is more relevant to consider the exponentials of the regression coefficients with corresponding confidence intervals. To obtain this we may use the following function:

 

expcoef=function(glmobj)

{

regtab=summary(glmobj)$coef

expcoef=exp(regtab[,1])

lower=expcoef*exp(-1.96*regtab[,2])

upper=expcoef*exp(1.96*regtab[,2])

cbind(expcoef,lower,upper)

}

 

After you have read this function into R, you may use it by giving the command:

 

expcoef(fit.prop)

 

Perform the command and interpret the output.

 

c) Now fit a model with age group, sex and job status category. Use the anova-command to test if job status category is significant.

 

d) Explain that interaction between age group and sex (job status category) corresponds to a non-proportional effect of sex (job status category), and perform tests for these interactions.

 

e) Test for interaction between sex and job status category.

 

f) Interpret the model you arrive at after performing the tests in questions d) and e).