Generalized Linear Models:
Tutorial 1.
STA3043S
Problem Set
1. Complete the following questions from Dobson and Barnett (2008):
(a) Chapter 1: 1.4, 1.5, 1.6.
(b) Chapter 2: 2.4, 2.5.
2. For the Chronic medical conditions example in Section 2.2 of Dobson and Barnett
(2008), the model equation for diering mean response levels is:
E(Yij ) = θj , Yij ∼ Po(θj )
for i = 1, 2, . . . , n, j = 1, 2. An alternative parametrisation of the model is given by:
E(Yi ) = β0 + β1 xi , Yi ∼ Po(β0 + β1 xi )
for i = 1, 2, . . . , n, where
(
0
xi =
1
if region = `Town',
if region = `Country'.
Set up the log-likelihood function, and calculate expressions for the maximum likelihood estimators of β0 and α = (β0 + β1 ). Verify your calculations by evaluating the
estimators and comparing the resulting values to θ̂j , j = 1, 2 calculated in the book.
3. For the birthweight and gestational age example in Section 2.2 of Dobson and Barnett
(2008), the model equation for equal growth is:
E(Yij ) = µij = αj + βxij , Yij ∼ N(µij , σ 2 )
for i = 1, 2, . . . , n, j = 1, 2.
(a) Use the log-likelihood function to derive a system of equations for which the
solution will yield maximum likelihood estimates of α1 , α2 , and β .
(b) Write the system derived in part (a) in the form
Aθ = b
where θT = [α1 , α2 , β]T and use the
MLEs.
(c) Fit a model of the form:
solve()
function in R to evaluate the
2
E(Yi ) = β0 + β1 xsex
+ β2 xage
i
i , Yi ∼ N(µi , σ )
for i = 1, 2, . . . , n in R to verify your calculations.
1
References
Annette J Dobson and Adrian Barnett. An Introduction to Generalized Linear Models.
CRC press, 2008.
Page 2