Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Midterm Exam VERSION B

MATH 523: Generalized Linear Models

2020

Problem 1. Consider the Geometric family of distributions with parameter π e (0, 1) and probability mass function

f (y; π) = πy (1 _ π),    y e {0, 1, . . .}.

 

(a)  [4 marks] Show that the Geometric family is an exponential dispersion family. Identify  the  functions  b(.)  and  c(.),  as  well  as  the  dispersion  and  canonical parameters.

(b)  [3 marks] Compute the mean and variance of the Geometric distribution and identify the mean-variance relationship.

(c)  [2 marks] Identify the  canonical link for  a Geometric GLM. Comment  on its suitability.

(d)  [2 marks] Explain why the link function log(_ log(µ/(1 + µ))) may be better suited than the canonical link for this GLM.

(e)  [1 mark] For what kind of data would a Geometric GLM be better suited than a Poisson GLM (Hint: look at the mean-variance relationship)?

(f)  [4 marks] Derive the likelihood (score) equations for the Geometric GLM when the

link from part (d) is used. Explain how the equations simplify when the canonical link is used.

(g)  [4 marks] Calculate the Deviance for a Geometric GLM. Does it depend on the link

function used? Explain.


Problem 2.  Consider the following data on ear infections in swimmers from the 1990 Pilot Surf/Health Study of the New South Wales Water Board.


NumInfec

the number of self-diagnosed ear infections

Age

the age of the swimmer (with levels 15-19, 20-24 and 25-29);

Sex

gender of the swimmer (with levels Female and Male);

Loc

the usual swimming location (with levels Beach and NonBeach)

Swim

frequency of swims in the ocean (with levels Freq(ently) and Occas(ionally))

 

(a)  [5 marks] The data were first modeled with a GLM model m1 whose output is given

on page 4, lines 1–23. From this output:

– Identify the response and the predictors;

– Identify the GLM that was used and the link function;

– Identify the sample size n;

– For each main effect, write down whether it is treated as a factor or a covariate (continuous predictor).

(b)  [3 marks] In model m1, quantify the effect of Age and Swim on the response.

(c)  [3 marks] Fill in the values marked by XXX on line 12. Does the p-value allow you to conclude that Age is not a significant predictor? Explain.

(d)  [4 marks] What is the estimated mean number of self-diagnosed ear infections of a swimmer aged 27 who swims frequently in the ocean?

(e)  [5 marks] A simpler model m2 whose output is given on lines 26–46 has been fitted to the data.  Test whether m2 is an adequate simplification of m1 at the 5%

significance level. Interpret the finding in terms of significance of Age and Swim. Use the R output on page 4, and the χy(2) table on page 5.


1  C a l l :

2  glm ( f o r m u l a  =  NumInfec  ˜  Age  +  Swim ,   f a m i l y  =  p o i s s o n ) 3

4  D e v i a n c e   R e s i d u a l s :

5          Min               1Q      Median               3Q            Max 6  - 2.0300     - 1.5001     - 1.2851       0 . 6 7 7 4       7 . 1 6 2 0 7

8  C o e f f i c i e n t s :

9                            E s t i m a t e   Std .   E r r o r   z  v a l u e   Pr ( s|z | )

10  ( I n t e r c e p t )     0 . 1 1 7 9 4         0 . 0 9 5 3 7       1 . 2 3 7       0 . 2 1 6 2

11  Age20 -24         - 0.30947         0 . 1 2 3 9 1     - 2.497       0 . 0 1 2 5  *

12  Age25 -29         - 0.27479         0 . 1 2 8 5 9      XXX          XXX

13  SwimOccas         0 . 6 0 5 0 2         0 . 1 0 4 9 8       5 . 7 6 3   8 . 2 5 e -09  ***                     14                                                                                                                               15  S i g n i f .   c o d e s :     0   ’* * * ’   0 . 0 0 1   ’* * ’   0 . 0 1   ’* ’   0 . 0 5    ’. ’   0 . 1   ’   ’   1

16                                                                                                                      17  ( D i s p e r s i o n   p a r a m e t e r   f o r   p o i s s o n   f a m i l y   t a k e n   t o   be   1 )

18                                                                                                                  19           N u l l   d e v i a n c e :   8 2 4 . 5 1    on  286     d e g r e e s   o f  f r e e d o m

20  R e s i d u a l   d e v i a n c e :   7 8 1 . 2 6    on  283     d e g r e e s   o f  f r e e d o m

21  AIC :   1 1 6 1 . 7

22

23  Number  o f   F i s h e r   S c o r i n g   i t e r a t i o n s :   6 24

25

26  C a l l :

27  glm ( f o r m u l a  =  NumInfec  ˜  Swim ,   f a m i l y  =  p o i s s o n ) 28

29  D e v i a n c e   R e s i d u a l s :

30          Min               1Q      Median               3Q            Max 31  - 1.8930     - 1.3993     - 1.3993       0 . 8 2 2 3       6 . 7 8 8 6 32

33  C o e f f i c i e n t s :

34                            E s t i m a t e   Std .   E r r o r   z  v a l u e   Pr ( s|z | ) 35  ( I n t e r c e p t )   - 0.02120         0 . 0 8 4 5 2     - 0.251         0 . 8 0 2

36  SwimOccas         0 . 6 0 4 3 5         0 . 1 0 4 9 7       5 . 7 5 7   8 . 5 5 e -09  ***

37                                                                                                                               38  S i g n i f .   c o d e s :     0   ’* * * ’   0 . 0 0 1   ’* * ’   0 . 0 1   ’* ’   0 . 0 5    ’. ’   0 . 1   ’   ’   1

39                                                                                                                      40  ( D i s p e r s i o n   p a r a m e t e r   f o r   p o i s s o n   f a m i l y   t a k e n   t o   be   1 )

41                                                                                                                  42           N u l l   d e v i a n c e :   8 2 4 . 5 1    on  286     d e g r e e s   o f  f r e e d o m

43  R e s i d u a l   d e v i a n c e :   7 8 9 . 8 1    on  285     d e g r e e s   o f  f r e e d o m

44  AIC :   1 1 6 6 . 2

45                                                                                  46  Number  o f   F i s h e r   S c o r i n g   i t e r a t i o n s :   6