Datasets for R worksheets, February 2006 ....................................... Worksheet 1. \begin{verbatim} 7.82 3.4 8.00 3.5 7.95 3.3 8.07 3.9 8.08 3.9 8.01 4.1 8.33 4.6 8.34 4.3 8.32 4.5 8.64 4.9 8.61 4.9 8.57 5.1 9.01 5.5 8.97 5.5 9.05 5.6 9.23 5.9 9.24 5.8 9.24 6.1 9.61 6.3 9.60 6.4 9.61 6.2 \end{verbatim} There is a substantial library of data-sets available on R, including the cherry-trees' data-set (see Examples sheet 2) and the Anscombe quartet' (see worksheet 13). Try \begin{verbatim} data() \end{verbatim} And, lastly, how about the following datasets as examples for linear regression.\\ The Independent, November 28, 2003 gives the following data on Student funding, at 2001-2 prices, under the headline {\bf Amid the furore, one thing is agreed: university funding is in a severe crisis'}. \begin{verbatim} Funding per student Students (000's) 1989-90 7916 567 1990-91 7209 622 1991-2 6850 695 1992-3 6340 786 1993-4 5992 876 1994-5 5829 944 1995-6 5570 989 1996-7 5204 1007 1997-8 5049 1019 1998-9 5050 1023 1999-00 5039 1041 2000-01 4984 1064 2001-02 5017 1087 2002-03* 5022 1101 * = provisional figures \end{verbatim} The Independent, October 11, 2004 gives the following $CO_2$ record (data collected by Dr Charles Keeling at Mauna Loa, an 11000 ft extinct volcano on the Big Island of Hawaii). \begin{verbatim} Year Level (in ppm, ie parts per million by volume) 1958 315 1959 315.98 1960 316.91 1961 317.65 1962 318.45 1963 318.99 1964 NA 1965 320.03 1966 321.37 1967 322.18 1968 323.05 1969 324.62 1970 325.68 1971 326.32 1972 327.46 1973 329.68 1974 330.25 1975 331.15 1976 332.15 1977 333.9 1978 335.5 1979 336.85 1980 338.69 1981 339.93 1982 341.13 1983 342.78 1984 344.42 1985 345.9 1986 347.15 1987 348.93 1988 351.48 1989 352.91 1990 354.19 1991 355.59 1992 356.37 1993 357.04 1994 358.88 1995 360.88 1996 362.64 1997 363.76 1998 366.63 1999 368.31 2000 369.48 2001 371.02 2002 373.1 2003 375.64 \end{verbatim} as the graph shows, all of these (sharp peaks)-except the final one- can be explained by the fact that they occurred in the same year as El Nino... The sinister aspect of the most recent peak is that it does not coincide with an El Nino......'\\ The Independent, June 13, 2005, says So who really pays and who really benefits? A guide through the war of words over the EU rebate and the Common Agricultural Policy' and \\ It's easiest to read the data set via read.table() from the table below \begin{verbatim} per_cap_cont total_cont howUKrebate_pd Rec_from_CAP Luxembourg 466 218 20 29 Belgium 362 3734 259 686 Denmark 358 1933 177 818 Netherlands 314 5120 56 934 Ireland 301 1205 108 1314 Sweden 289 2604 34 580 Finland 273 1420 135 586 France 266 15941 1478 6996 Austria 256 2098 27 754 Germany 249 20477 302 3930 Italy 228 13208 1224 3606 Spain 187 8077 719 4336 UK 186 11133 -5097 2612 Greece 154 1689 151 1847 Portugal 128 1326 121 57 Cyprus 110 84 7 NA Slovenia 88 176 16 NA Malta 83 33 3 NA Czech_Republic 54 554 50 NA Hungary 54 548 47 NA Estonia 45 58 5 NA Slovakia 41 223 20 NA Lithuania 35 125 11 NA Poland 32 1239 116 NA Latvia 28 64 6 NA \end{verbatim} \newpage Worksheet 2. Here is the data-set mammals', from Weisberg (1985, pp144-5). It is in the Venables and Ripley (1994) library of data-sets. \begin{verbatim} body brain Arctic fox 3.385 44.50 Owl monkey 0.480 15.50 Mountain beaver 1.350 8.10 Cow 465.000 423.00 Grey wolf 36.330 119.50 Goat 27.660 115.00 Roe deer 14.830 98.20 Guinea pig 1.040 5.50 Verbet 4.190 58.00 Chinchilla 0.425 6.40 Ground squirrel 0.101 4.00 Arctic ground squirrel 0.920 5.70 African giant pouched rat 1.000 6.60 Lesser short-tailed shrew 0.005 0.14 Star-nosed mole 0.060 1.00 Nine-banded armadillo 3.500 10.80 Tree hyrax 2.000 12.30 N.A. opossum 1.700 6.30 Asian elephant 2547.000 4603.00 Big brown bat 0.023 0.30 Donkey 187.100 419.00 Horse 521.000 655.00 European hedgehog 0.785 3.50 Patas monkey 10.000 115.00 Cat 3.300 25.60 Galago 0.200 5.00 Genet 1.410 17.50 Giraffe 529.000 680.00 Gorilla 207.000 406.00 Grey seal 85.000 325.00 Rock hyrax-a 0.750 12.30 Human 62.000 1320.00 African elephant 6654.000 5712.00 Water opossum 3.500 3.90 Rhesus monkey 6.800 179.00 Kangaroo 35.000 56.00 Yellow-bellied marmot 4.050 17.00 Golden hamster 0.120 1.00 Mouse 0.023 0.40 Little brown bat 0.010 0.25 Slow loris 1.400 12.50 Okapi 250.000 490.00 Rabbit 2.500 12.10 Sheep 55.500 175.00 Jaguar 100.000 157.00 Chimpanzee 52.160 440.00 Baboon 10.550 179.50 Desert hedgehog 0.550 2.40 Giant armadillo 60.000 81.00 Rock hyrax-b 3.600 21.00 Raccoon 4.288 39.20 Rat 0.280 1.90 E. American mole 0.075 1.20 Mole rat 0.122 3.00 Musk shrew 0.048 0.33 Pig 192.000 180.00 Echidna 3.000 25.00 Brazilian tapir 160.000 169.00 Tenrec 0.900 2.60 Phalanger 1.620 11.40 Tree shrew 0.104 2.50 Red fox 4.235 50.40 \end{verbatim} Here is the data-set Japanese set the pace for Europe's car makers', from The Independent, August 18, 1999. The 3 columns of numbers are Vehicles produced in 1998, and the Productivity, in terms of vehicle per employee, in 1997, 1998 respectively. Can you construct any helpful graphs? \begin{verbatim} veh1998 prod97 prod98 Nissan(UK) 288838 98 105 Volkswagen(Spain) 311136 70 76 GM(Germany) 174807 77 76 Fiat(Italy) 383000 70 73 Toyota(UK) 172342 58 72 SEAT(Spain) 498463 69 69 Renault(France) 385118 61 68 GM(Spain) 445750 67 67 Renault(Spain) 213590 59 64 Honda(UK) 112313 62 64 Ford(UK) 250351 62 61 Fiat(2Italy) 416000 54 61 Ford(Germany) 290444 59 59 Ford(Spain) 296173 57 58 Vauxhall(UK) 154846 39 43 Skoda(CzechR) 287529 33 35 Rover(UK) 281855 33 30 \end{verbatim} \newpage Worksheet 3. $$\$$ This shows you how to construct a one-way analysis of variance and how to do a qqnorm-plot to assess normality of the residuals.\\ Here is the data in the file potash': nb, you may need to do some work to get the datafile in place before you go into R. \begin{verbatim} 7.62 8.00 7.93 8.14 8.15 7.87 7.76 7.73 7.74 7.17 7.57 7.80 7.46 7.68 7.21 \end{verbatim} Worksheet 4. $$\$$ A two-way analysis of variance, first illustrating the R function gl() to set up the factor levels in a balanced design. The data are given below, and are in the file IrishIt'.\\ Under the headline\\  Irish and Italians are the sexists of Europe'" The Independent, October 8, 1992, gave the following table. \begin{verbatim} The percentage having equal confidence in both sexes for various occupations 86 85 82 86 Denmark 75 83 75 79 Netherlands 77 70 70 68 France 61 70 66 75 UK 67 66 64 67 Belgium 56 65 69 67 Spain 52 67 65 63 Portugal 57 55 59 64 W. Germany 47 58 60 62 Luxembourg 52 56 61 58 Greece 54 56 55 59 Italy 43 51 50 61 Ireland \end{verbatim} Here is another dataset with the same layout.\\ The Independent, 16 June 1999, under the headline Tourists get hidden costs warnings' gave the following table of prices in pounds, called How the resorts compared'. \begin{verbatim} Algarve 8.00 0.50 3.50 3.00 4.00 100.00 CostaDelSol 6.95 1.30 4.10 12.30 4.10 130.85 Majorca 10.25 1.45 5.35 6.15 3.30 122.20 Tenerife 12.30 1.25 4.90 3.70 2.90 130.85 Florida 15.60 1.90 5.05 5.00 2.50 114.00 Tunisia 10.90 1.40 5.45 1.90 2.75 218.10 Cyprus 11.60 1.20 5.95 3.00 3.60 149.45 Turkey 6.50 1.05 6.50 4.90 2.85 263.00 Corfu 5.20 1.05 3.75 4.20 2.50 137.60 Sorrento 7.70 1.40 6.30 8.75 4.75 215.40 Malta 11.20 0.70 4.55 8.00 4.80 87.85 Rhodes 6.30 1.05 5.20 3.15 2.70 261.30 Sicily 13.25 1.75 4.20 7.00 3.85 174.40 Madeira 10.25 0.70 5.10 6.85 6.85 153.70 \end{verbatim} Finally, for the racing enthusiasts:\\ for the Cheltenham Gold Cup, March 18, 2004, I computed the following table of probabilities from the published Bookmakers' Odds:\\ thus, eg .6364 corresponds to odds of 4-7 (.6364 = 7/11).\\ In the event, BestMate was the winner, for the 3rd year in succession! (Note added November 3, 2005: sadly BestMate has just died.) \begin{verbatim} Corals WmHills Ladbrokes Stanleys Tote BestMate .6364 .6364 .6364 .6000 .6000 TheRealBandit .125 .1111 .0909 .1111 .1111 KeenLeader .0909 .0909 .0833 .0909 .0769 IrishHussar .0667 .0909 .0909 .0833 .0833 BeefOrSalmon .0909 .0769 .0909 .0769 .0667 FirstGold .0833 .0769 .0909 .0769 .0769 HarbourPilot .0588 .0667 .0588 .0588 .0588 TruckersTavern .0476 .0588 .0667 .0588 .0588 SirRembrandt .0385 .0294 .0294 .0294 .0244 AlexB'quet .0149 .0099 .0099 .0149 .0149 Here is the data from \begin{verbatim} bookpr 14.99 12.68 9.00 11.00 15.95 S.Hawking,"A brief history of time" 14.95 17.53 13.60 13.35 15.95 U.Eco,"Foucault's Pendulum" 12.95 14.01 11.60 11.60 13.60 J.Le Carre,"The Russia House" 14.95 12.00 8.45 NA NA J.Archer,"Kane & Abel" 12.95 15.90 15.10 NA 16.00 S.Rushdie,"The Satanic Verses" 12.95 13.40 12.10 11.00 13.60 J.Barnes"History of the world in ..." 17.95 30.01 NA 14.50 22.80 R.Ellman,"Oscar Wilde" 13.99 NA NA 12.50 13.60 J.Updike,"Rabbit at Rest" 9.95 10.50 NA 9.85 NA P.Suskind,"Perfume" 7.95 9.85 5.65 6.95 NA M.Duras,"The Lover" \end{verbatim} Do books cost more abroad?' was the question raised by The Independent on Sunday. Here is another data-set with the same structure. Under the headline Afloat on a sea of alcohol, the booze cruisers bid last farewell to duty-free' The Independent of 28 June, 1999, gives the Table below.\\ Booze and Fags: the relative cost' \begin{verbatim} 200 Benson & Hedges special filter cigarettes 16.95 16.99 35.99 20.00 NA 1 litre Smirnoff vodka 9.99 10.74 10.39 11.00 10.25 1 litre Gordon's gin 10.25 8.29 10.69 11.35 9.99 5 X 50 gm Golden Virginia 13.95 13.99 38.15 9.65 NA rolling tobacco 24 X 440 cans Stella Artois 11.95 20.80 23.96 9.25 9.67 24 X 440 cans Guinness 15.75 22.95 22.74 11.90 15.83 \end{verbatim} Here the column headings (ie place of sale) are P$\&$O Stena (on board ship), BAA (airport duty free), Tesco (UK, high street), Eastenders (Calais, cash $\&$ carry), and Wine $\&$ Beer Co (Calais, cash $\&$ carry).\\ And finally, just in case you want yet more data of this structure, Britons paying over the odds for designer goods' from The Independent, 27 April, 2001, gives the following table of prices in pounds sterling. \begin{verbatim} UK Sweden France Germany US U2CD 13.56 12.45 10.60 9.66 10.59 SPS2 299.99 312.43 272.99 266.17 226.76 Cl 24.45 28.84 24.48 24.35 14.66 Ca 305.36 346.83 316.43 312.83 248.62 Le 46.16 47.63 42.11 46.06 27.01 Do 58.00 54.08 47.22 46.20 32.22 TheMatrixDVD 19.26 15.61 17.93 15.29 15.75 Za 836.74 704.29 527.45 755.77 NA Ti 111.00 104.12 89.43 93.36 75.42 Ikea 395.00 276.26 272.99 299.99 454.21 \end{verbatim} Worksheet 6. Here is the dataset alloyf". (Warning: load' is a function in R, so we call the first column Load' rather than load'.) \begin{verbatim} Load n r 25 50 10 27 70 17 29 100 30 31 60 21 33 40 18 35 85 43 37 90 54 39 50 33 41 80 60 43 65 51 \end{verbatim} \newpage Worksheet 7. The data (read this by read.table("...",header=T)) follow. \begin{verbatim} nfail temp 2 53 1 57 1 58 1 63 0 66 0 67 0 67 0 67 0 68 0 69 0 70 0 70 1 70 1 70 0 72 0 73 0 75 2 75 0 76 0 76 0 78 0 79 0 81 \end{verbatim} \newpage First. The total number of reported new cases per month of AIDS in the UK up to November 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. \begin{verbatim} y <- scan() 0 0 3 0 1 1 1 2 2 4 2 8 0 3 4 5 2 2 2 5 4 3 15 12 7 14 6 10 14 8 19 10 7 20 10 19 # nb, blank line The Independent also gave the breakdown of the above totals, which of course results in a very sparse table. This is \begin{verbatim} Sex 0 0 0 2 1 0 2 0 0 1 4 Fin 1 0 0 0 0 0 2 0 0 0 3 Fai 2 1 0 0 0 0 0 0 0 3 0 Pol 3 0 2 4 0 5 2 5 4 7 3 Pub 1 0 0 1 0 0 0 0 0 3 1 \end{verbatim} (The resignation which precipitated the newspaper article in October 1995 may in fact have been counted under two of the above headings.)\\ {\bf Extra data added November 3, 2005, following the resignation of David Blunkett}\\ Abstracting the new data from today's Independent Those that have fallen: ministerial exits 1997-2005'\\ I decided not to attempt to give the reasons' for resignation (too controversial).\\ D.Foster May 1997\\ R.Davies Oct 1998\\ P.Mandelson Dec 1998\\ P.Mandelson Jan 2001\\ S.Byers May 2002\\ E.Morris Oct 2002\\ R.Cook March 2003\\ C.Short May 2003\\ A.Milburn June 2003\\ B.Hughes April 2004\\ D.Blunkett Dec 2004\\ D.Blunkett Nov 2005.\\ (I still lack data for the period Oct 1995- April 1997). $$\$$ And here's another dataset for Poisson regression. This is taken from the British Medical Journal, 2001;322:p460-463. The authors J.Kaye et al wrote Mumps, measles, and rubella vaccine and the incidence of autism recorded by general practitioners: a time trend analysis' and produced the following table, for which the column headings are\\ Year of diagnosis, Number of cases, Number of person-years at risk, Estimated incidence per 10,000 person-years, median age (in years) of cases. \begin{verbatim} Diag Cases Pyears Inc Age 1988 7 255771 0.3 6.0 1989 8 276644 0.3 5.6 1990 16 295901 0.5 5.0 1991 14 309682 0.5 4.4 1992 20 316457 0.6 4.0 1993 35 316802 1.1 5.8 1994 29 318305 0.9 4.6 1995 46 303544 1.5 4.3 1996 36 260644 1.4 4.7 1997 47 216826 2.2 4.3 1998 34 161664 2.1 5.4 1999 13 60502 2.1 5.9 \end{verbatim} Now, a classic data" set, due to F.J.Anscombe. \begin{verbatim} x1 y1 x2 y2 x3 y3 x4 y4 10.0 8.04 10.0 9.14 10.0 7.46 8.0 6.58 8.0 6.95 8.0 8.14 8.0 6.77 8.0 5.76 13.0 7.58 13.0 8.74 13.0 12.74 8.0 7.71 9.0 8.81 9.0 8.77 9.0 7.11 8.0 8.84 11.0 8.33 11.0 9.26 11.0 7.81 8.0 8.47 14.0 9.96 14.0 8.10 14.0 8.84 8.0 7.04 6.0 7.24 6.0 6.13 6.0 6.08 8.0 5.25 4.0 4.26 4.0 3.10 4.0 5.39 19.0 12.50 12.0 10.84 12.0 9.13 12.0 8.15 8.0 5.56 7.0 4.82 7.0 7.26 7.0 6.42 8.0 7.91 5.0 5.68 5.0 4.74 5.0 5.73 8.0 6.89 \end{verbatim} See E.R.Tufte, The Visual Display of Quantitative Information". Worksheet 14. New for 2001: football arrests, the Poisson and the negative binomial. These data come from the National Criminal Intelligence Service, and represent Football- related arrest figures for 2000/2001, classified by Team Supported', for each of the four UK divisions. You can see the data for yourselves on \begin{verbatim} http://www.ncis.gov.uk/press/29_01.html \end{verbatim} which also gives the names of the clubs, (Arsenal, Aston Villa etc) and further data giving the breakdown into types of offence (drink-related, ticket-touts etc). We use this dataset as an illustration of {\it over-dispersion} relative to the Poisson distribution, and how to fit an appropriate model.\\ Premiership, 1stDivision, 2ndDivision, 3rdDivision are the 4 columns of total arrests below, which you can read via \begin{verbatim} read.table(" ", header=T) 54 38 16 3 60 38 6 15 80 61 52 25 17 44 33 40 74 83 0 17 35 7 5 5 28 11 6 18 108 17 13 26 18 27 93 15 119 19 13 9 69 26 7 12 78 14 19 59 148 51 13 3 150 31 47 20 105 41 13 10 191 29 25 0 15 90 13 11 166 83 49 9 54 14 72 5 54 12 41 12 NA 20 10 20 NA 24 27 10 NA 11 24 1 NA 25 4 6 \end{verbatim} \begin{verbatim} Premiership totarr viol ManchesterUtd 186 13 Sunderland 185 6 NewcastleUtd 139 2 BirminghamCity 138 27 Liverpool 133 8 Chelsea 122 5 Everton 119 3 ManchesterCity 110 6 LeedsUtd 104 5 AstonVilla 101 23 T'hamHotspur 88 9 Middlesborough 67 0 W,Brom.Albion 63 2 W.HamUtd 57 3 Arsenal 53 2 BlackburnRovers 51 0 BoltonWanderers 45 1 Southampton 40 3 Fulham 19 0 CharltonAthletic 17 1 Division One totarr viol NottinghamForest 141 6 Burnley 121 7 SheffieldUtd 106 27 SheffieldWed 104 18 LeicesterCity 80 14 DerbyCo 72 6 StokeCity 69 4 Portsmouth 52 5 NorwichCity 43 5 Brighton&HoveAlb 35 6 CrystalPalace 35 2 PrstonNorthEnd 30 1 BradfordCity 28 3 CoventryCity 28 0 IpswichTown 28 1 RotherhamUtd 28 0 Reading 19 2 GrimsbyTown 18 0 Millwall 18 2 Gillingham 9 0 Division Two totarr viol CardiffCity 149 11 PlymouthArgyle 91 3 BristolCity 70 6 Barnsley 59 24 QPR 53 5 HuddersfieldTown 52 17 SwindonTown 51 2 PortVale 46 3 LutonTown 42 13 WiganAthletic 41 3 MansfieldTown 32 2 OldhamAthletic 23 2 NorthamptonTown 21 5 TranmereRovers 15 0 Brentford 13 1 Chesterfield 10 0 Blackpool 9 0 PeterboroughUtd 9 0 CheltenhamTown 8 1 ColchesterUtd 8 0 NottsCounty 8 0 CreweAlexandra 7 0 StockportCounty 6 1 WycombeWanderers 3 1 Division Three totarr viol LincolnCity 52 17 CarlisleUtd 42 9 SwanseaCity 32 2 ScunthorpeUtd 29 1 HartlepoolUtd 25 0 Wrexham 24 1 ShrewsburyTn 21 1 BristolRovers 18 3 CambridgeUtd 16 0 BostonUtd 15 3 Bournemouth 15 1 Darlington 14 0 ExeterCity 13 0 YorkCity 13 2 HullCity 12 0 OxfordUtd 10 0 Rochdale 10 0 Bury 8 2 LeytonOrient 7 1 SouthendUtd 7 0 Rushden&Diamonds 1 0 KidderminsterH's 0 0 Macclesfield 0 0 TorquayUtd 0 0 \end{verbatim} Worksheet15.\\ What happens when we model the data given by Prof Pippa Norris (Harvard University) in the Financial Times of April 20, 2005?\\ See Stirring up apathy?'\\ Here is her dataset, with my analysis in R.\\ \begin{verbatim} >PN.data Year UKTurnout Poll_Lead 1 1945 72.8 6.0 2 1950 83.9 0.6 3 1951 82.6 4.5 4 1955 76.8 3.7 5 1959 78.7 2.8 6 1964 77.1 1.9 7 1966 75.8 10.4 8 1970 72.0 3.1 9 1974 78.8 3.6 10 1974 72.8 8.9 11 1979 76.0 5.3 12 1983 72.7 19.8 13 1987 75.3 8.0 14 1992 77.7 0.4 15 1997 71.4 16.0 16 2001 59.4 14.2 \end{verbatim} {\bf Supplementary worksheet:\\ CRIME, UNEMPLOYMENT and a case-control study}\\ We reproduce matched-pairs' data first analysed in the GLIM Newsletter in 1987: the GLIM commands are easily translated into equivalent R commands. As part of a study on unemployment and crime, Farrington {\it et al} use the following data on 36 boys: \begin{verbatim} Boy YearsinEmploy OffE YearsinUnemplo OffU 1 1.21 3 0.68 1 2 1.47 0 1.28 1 3 1.02 0 0.89 8 4 2.97 2 0.36 0 5 3.37 2 0.30 0 6 2.65 8 0.60 0 7 3.16 1 0.67 1 8 3.07 1 0.27 0 9 2.51 2 0.40 0 10 1.58 2 1.08 0 11 2.21 1 1.37 4 12 2.45 1 0.47 0 13 1.52 2 0.64 2 14 2.64 1 0.70 0 15 2.46 2 0.57 0 16 1.54 1 0.85 0 17 2.83 1 0.37 0 18 1.50 2 1.25 0 19 2.37 1 0.55 0 20 2.25 0 0.75 1 21 2.84 1 0.75 0 22 1.66 4 0.61 1 23 2.39 2 0.44 1 24 2.42 3 0.78 0 25 1.17 0 2.50 2 26 3.15 2 0.43 0 27 1.75 1 0.25 0 28 0.83 1 0.88 3 29 2.22 0 0.28 1 30 1.25 4 0.96 2 31 1.31 2 0.69 1 32 2.91 2 0.67 0 33 2.67 1 0.67 0 34 3.28 4 0.45 0 35 3.00 1 0.34 0 36 2.14 0 0.46 1 \end{verbatim} 18. Here is the datafile RJdata' \begin{verbatim} 23102 11062 10564 8283 7732 8045 11033 16463 8229 6565 6453 6627 10485 8513 11766 6676 6068 5737 8389 6518 6672 9044 5231 4624 7915 6530 5973 5217 6177 4325 7603 6594 5670 4549 4326 6095 \end{verbatim} {\bf 19. New for 2006: cannabis use and psychosis, the Harry Potter' effect, and life is a risky business if you are in a TV soap opera.}\\ \begin{verbatim} > cannabis = read.table("cannabis", header=T); cannabis c.use with without predisposition none 294 1642 no some 59 216 no none 47 133 yes some 23 22 yes > attach(cannabis) ; tot = with + without > summary(glm(with/tot ~ c.use*predisposition, binomial, weights=tot)) \end{verbatim} $$\$$ ii) Harry Potter casts a spell on accident-prone children' was published by Gwilym, Howard, Davies and Willett in the BMJ on 23 December 2005. \begin{verbatim} read.table(" ", header=T) Date Year N 7-8June 2003 62 15-15June 2003 78 21-22June 2003 36 * 28-29June 2003 62 5-6July 2003 77 12-13July 2003 70 19-20July 2003 60 26-27July 2003 51 5-6June 2004 80 12-13June 2004 82 19-20June 2004 70 26-30June 2004 78 3-4July 2004 81 10-11July 2004 59 17-18July 2004 64 24-25July 2004 61 4-5June 2005 50 11-12June 2005 81 18-19June 2005 61 25-26June 2005 66 2-3July 2005 75 9-10July 2005 77 16-17July 2005 37 * 23-24July 2005 43 30-31July 2005 67 6-7August 2005 60 iii) Death rates of characters in soap operas on British television: is a government health warning required?' BMJ Dec 20, 1997, by Crayford, Hooper and Evans, gave Table 3, of which an extract is printed below. These authors studied mortality \begin{verbatim} soap totaldeaths extdeaths Epmf CorSt 14 6 .17 EastE 17 11 .22 Brooks 26 20 .28 Emmerd 28 17 .24 \end{verbatim} If you check the original article on http://bmj/bmjjournals.com, you can see a photograph from {\it Brookside}, captioned Gladys meets her controversial end with the help of her family'. {\bf 20. Results from the Corus chess tournament: An application of the Bradley-Terry model}\\ The Times, February 1, 2006, gave the results of `The top group at the Corus \begin{verbatim} W Dr L P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 0 1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 1 0 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