Chapter 11Poisson regression: some examplesThis exercise shows you use of the Poisson ‘family’ or distribution function forloglinear modelling.Also it shows you use of the ‘sink()’ directive in R.As usual, typing the commands below is a trivial exercise: what YOU must do is tomake sure you understand the purpose of the commands, and that you can interpretthe output.First. The total number of reported new cases per month of AIDS in the UK up toNovember 1985 are listed below(data from A.Sykes 1986).We model the way in which y, the number of cases depends on i, the month number.y
P.M.E.Altham, University of Cambridge 50Table 11.1: vCJD data1994 1995 1996 1997 1998 1999 20003,5 5,5 4,7 7,7 8,9 20,9 12,11Table 11.2: GM tree releases1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 19981 1 0 2 2 2 1 1 6 3 5q()type temp# to QUIT R# to read results of "sink"(The deviance, 2Σy i log(y i /e i ), in the above example is large in comparison with theexpected value of χ 2 34, but since we have so many cells with e i < 5, the approximationto the χ 2 34 distribution will be poor. We could improve matters here, say by poolingadjacent cells to give larger values of e i for the combined cells, then recomputingthe deviance, and reducing the degrees of freedom of χ 2 accordingly.)Table 11.1 gives the Confirmed and probable vCJD patients reported to the end ofDecember 2001, sorted into males (the first number given in each pair) and females(the second number of the pair), according to their Year of onset of the illness.Can we use a Poisson model for these data?Here is another data-set of similar structure for you to investigate (once again, agloomy subject I’m afraid).The Independent, November 10, 1999, published an article headed“GM trees pose risk of ‘superweed’ calamity”.This article gave a table, headed ‘Released into the environment’, that showed thefollowing figures for GM tree species released into the environment through fieldtrials. This is summarised in Table 11.2. Thus, for example, in 1988 there was justone GM species (European aspen) released into the environment, and in 1998 fivenew GM species were released. (In total, 24 different GM tree species were released.These figures are taken from ‘at least 116 GM tree trials in 17 countries, involving24 species’.) You could try a Poisson regression for 1, 1, 0, ...., 5.Table 11.3 is yet another example of newspaper data for which we might try Poissonregression. On October 18, 1995, ‘The Independent’ gave the following Table 11.3of the numbers of ministerial resignations because of one or more of the following:Sex scandal, Financial scandal, Failure, Political principle, or Public criticism, whichwe abbreviate to Sex, Fin, Fai, Pol, Pub, respectively as the rows of Table 11.4. Theyears start in 1945, with a Labour government, and 7 Resignations.Is there any difference between Labour and Conservative in the rate of resignations?To answer this question, we will need to include log(t) as an offset in the Poissonregression, where t is the length of time of that Government, which we only knowfrom these data to the nearest year.
- Page 1: INTRODUCTION TO STATISTICALMODELLIN
- Page 4 and 5: PrefaceR is available as Free Softw
- Page 6: Chapter 1Getting started: books and
- Page 9: Chapter 2Ways of reading in data, t
- Page 13 and 14: P.M.E.Altham, University of Cambrid
- Page 15 and 16: P.M.E.Altham, University of Cambrid
- Page 17 and 18: P.M.E.Altham, University of Cambrid
- Page 19 and 20: P.M.E.Altham, University of Cambrid
- Page 21 and 22: P.M.E.Altham, University of Cambrid
- Page 23 and 24: P.M.E.Altham, University of Cambrid
- Page 25 and 26: P.M.E.Altham, University of Cambrid
- Page 27 and 28: P.M.E.Altham, University of Cambrid
- Page 29 and 30: Chapter 5A 2-way anova, how to set
- Page 31 and 32: P.M.E.Altham, University of Cambrid
- Page 33 and 34: Chapter 6A 2-way layout with missin
- Page 35 and 36: P.M.E.Altham, University of Cambrid
- Page 37 and 38: P.M.E.Altham, University of Cambrid
- Page 39 and 40: Chapter 8The space shuttle temperat
- Page 41 and 42: P.M.E.Altham, University of Cambrid
- Page 43 and 44: P.M.E.Altham, University of Cambrid
- Page 45 and 46: P.M.E.Altham, University of Cambrid
- Page 47 and 48: P.M.E.Altham, University of Cambrid
- Page 49: P.M.E.Altham, University of Cambrid
- Page 53 and 54: P.M.E.Altham, University of Cambrid
- Page 55 and 56: P.M.E.Altham, University of Cambrid
- Page 57 and 58: P.M.E.Altham, University of Cambrid
- Page 59 and 60: Chapter 12Fisher’s exact test, 3-
- Page 61 and 62: P.M.E.Altham, University of Cambrid
- Page 63 and 64: Chapter 13Defining a function in R,
- Page 65 and 66: zbP.M.E.Altham, University of Cambr
- Page 67 and 68: P.M.E.Altham, University of Cambrid
- Page 69 and 70: P.M.E.Altham, University of Cambrid
- Page 71 and 72: P.M.E.Altham, University of Cambrid
- Page 73 and 74: P.M.E.Altham, University of Cambrid
- Page 75 and 76: P.M.E.Altham, University of Cambrid
- Page 77 and 78: P.M.E.Altham, University of Cambrid
- Page 79 and 80: P.M.E.Altham, University of Cambrid
- Page 81 and 82: P.M.E.Altham, University of Cambrid
- Page 83 and 84: Chapter 18Crime and unemployment: a
- Page 85 and 86: P.M.E.Altham, University of Cambrid
- Page 87 and 88: Chapter 19Maximising a multi-parame
- Page 89 and 90: P.M.E.Altham, University of Cambrid
- Page 91 and 92: P.M.E.Altham, University of Cambrid
- Page 93 and 94: P.M.E.Altham, University of Cambrid
- Page 95 and 96: P.M.E.Altham, University of Cambrid
- Page 97 and 98: P.M.E.Altham, University of Cambrid
- Page 99 and 100: P.M.E.Altham, University of Cambrid
- Page 101 and 102:
P.M.E.Altham, University of Cambrid
- Page 103 and 104:
P.M.E.Altham, University of Cambrid
- Page 105 and 106:
P.M.E.Altham, University of Cambrid
- Page 107 and 108:
Chapter 22Brief introduction to Sur
- Page 109 and 110:
P.M.E.Altham, University of Cambrid
- Page 111 and 112:
IndexAIC, 36.Rdata, 10.Rhistory, 10