Part IIC RDS/Lent 2014 STATISTICAL MODELLING Example Sheet 4 (of 4) 1. Consider a generalised linear model with vector of responses Y = (Y1, ... , Yn)T and design matrix X with ith row xT. Show that if the link function g is the canonical link, the dispersion parameter 02 = 1 and the di = 1, then writing ûi = g-1(xT 3) where ? is the maximum likelihood estimate of the vector of regression coefficients, we have XTY = XT û. Conclude also that if an intercept term is included in X then n i=1 Pi = i=1 n 2. Suppose that for some strictly increasing function f, we have Y ¡* = f(xT B* + Ei), i = 1, ... , n, where & ~ Nn (0, 021), and the xi are covariates in RP with first component equal to 1. Suppose that for some constant c, we observe Yi := 1 {Y" >c}. Show that Y1, ... , Yn are independent and E(Y¡) = $(x+ B) for some 3 that you should specify. 3. Below are three R commands, and the corresponding output. What is the model that is being fitted? Interpret the output. > n <- c(9, 10, 15, 25, 32, 33, 37, 46, 46) > i <- 1:9 > mod <- glm(n ~ i, family=poisson) > mod$dev [1] 6.351221 4. Consider a two-way contingency table where the row totals are fixed. We model the vectors of the responses in the rows as independent multinomial random variables. More concretely, if ni, i = 1, ... , I denotes the sum of the ith row, we model the response in the ith row, Yi as Yi ~ Multi(ni; Pil, · · · , PiJ), with Y1, ... , YI independent, and Pij exp(x{jB) 2j'=1 exp(x{j.B) € (0, 1). Show that if we instead model the jth component of Yi, Yij, as independent Poisson random variables with E(Yij) = Hij > 0 log (Hij) = 0; + x;}, 1 = =
then the maximum likelihood estimators of 6 under the multinomial model and the Poisson model will coincide, provided they are unique. Furthermore, prove that the corresponding estimates for E(Yij) from the two models are the same. 5. Show that the log-likelihood for binomial regression with data (y1, x1), ... , (yn, In) E {0, 1} x RP when the response is binary and the canonical link function is used can be written as n >>log(1 + exp(-yix{ B)), i=1 where yi = 2yi - 1. 6. You see below the results of using glmto analyse data from Agresti (1996) on tennis matches between 5 top women tennis players (1989-90). We let yij be the number of wins of player i against player j, and let nij be the total number of matches of i against j, for 1 < i < j < 5. Thus we have 10 observations, which we will assume are realisations of independent binomial random variables yij, with Yij ~ Bin(nij, Hij) and