Last data update: 2014.03.03

R: Lifespans of UK 1st class cricketers born 1840-1960
cricketerR Documentation

Lifespans of UK 1st class cricketers born 1840-1960

Description

Year and birth, lifespan, etc, of British first class cricketers, born 1840-1960, whose handedness could be determined from information in the Who's who of cricketers. The status (alive=0, dead =1), and lifetime or lifespan, is for 1992.

Usage

data(cricketer)

Format

A data frame with 5960 observations on the following 8 variables.

left

a factor with levels right left

year

numeric, year of birth

life

numeric, lifetime or lifespan to 1992

dead

numeric (0 = alive (censored), 1 = dead, in 1992)

acd

numeric (0 = not accidental or not dead, 1 = accidental death)

kia

numeric (0 = not killed in action, 1 = killed in action)

inbed

numeric (0 = did not die in bed, 1 = died in bed)

cause

a factor with levels alive acd (accidental death) inbed (died in bed)

Details

Note that those 'killed in action' (mostly during World Wars I and II) form a subset of those who died by accident.

Source

John Aggleton, Martin Bland. Data were collated as described in Aggleton et al.

References

Aggleton JP, Bland JM, Kentridge RW, Neave NJ 1994. Handedness and longevity: an archival study of cricketers. British Medical Journal 309, 1681-1684.

Bailey P, Thorne P, Wynne-Thomas P. 1993. Who's Who of Cricketers. 2nd ed, London, Hamlyn.

Bland M and Altman D. 2005. Do the left-handed die young? Significance 2, 166-170.

See Also

earlycrcktr.

Examples

data(cricketer)
numLH <- xtabs(~ left+year, data=cricketer)
propLH <- prop.table(numLH, margin=2)[2,]
yr <- as.numeric(colnames(numLH))
plot(propLH ~ yr)
cricketer$lh <- unclass(cricketer$left)-1
left2.hat <- fitted(lm(lh ~ poly(year,2), data=cricketer))
ord <- order(cricketer$year)
lines(left2.hat[ord] ~ cricketer$year[ord])
library(splines)
ns3.hat <- fitted(lm(lh ~ ns(year,3), data=cricketer))
lines(ns3.hat[ord] ~ cricketer$year[ord], col="red")
require(survival)
summary(coxph(Surv(life, kia) ~ bs(year,3) +left, data=cricketer))
cricketer$notacdDead <- with(cricketer, {dead[acd==1]<-0; dead})
summary(coxph(Surv(life, notacdDead) ~ ns(year,2) +left, data=cricketer))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DAAG)
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DAAG/cricketer.Rd_%03d_medium.png", width=480, height=480)
> ### Name: cricketer
> ### Title: Lifespans of UK 1st class cricketers born 1840-1960
> ### Aliases: cricketer
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data(cricketer)
> numLH <- xtabs(~ left+year, data=cricketer)
> propLH <- prop.table(numLH, margin=2)[2,]
> yr <- as.numeric(colnames(numLH))
> plot(propLH ~ yr)
> cricketer$lh <- unclass(cricketer$left)-1
> left2.hat <- fitted(lm(lh ~ poly(year,2), data=cricketer))
> ord <- order(cricketer$year)
> lines(left2.hat[ord] ~ cricketer$year[ord])
> library(splines)
> ns3.hat <- fitted(lm(lh ~ ns(year,3), data=cricketer))
> lines(ns3.hat[ord] ~ cricketer$year[ord], col="red")
> require(survival)
Loading required package: survival

Attaching package: 'survival'

The following object is masked from 'package:DAAG':

    lung

> summary(coxph(Surv(life, kia) ~ bs(year,3) +left, data=cricketer))
Call:
coxph(formula = Surv(life, kia) ~ bs(year, 3) + left, data = cricketer)

  n= 5960, number of events= 120 

                  coef exp(coef)  se(coef)     z Pr(>|z|)    
bs(year, 3)1 1.707e+01 2.596e+07 4.793e+00 3.562 0.000368 ***
bs(year, 3)2 6.080e+00 4.368e+02 1.838e+00 3.308 0.000938 ***
bs(year, 3)3 1.596e+00 4.931e+00 4.715e+00 0.338 0.735048    
leftleft     5.248e-01 1.690e+00 2.009e-01 2.612 0.008991 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

             exp(coef) exp(-coef) lower .95 upper .95
bs(year, 3)1 2.596e+07  3.852e-08 2.160e+03 3.120e+11
bs(year, 3)2 4.368e+02  2.289e-03 1.192e+01 1.601e+04
bs(year, 3)3 4.931e+00  2.028e-01 4.783e-04 5.084e+04
leftleft     1.690e+00  5.917e-01 1.140e+00 2.506e+00

Concordance= 0.821  (se = 0.026 )
Rsquare= 0.03   (max possible= 0.294 )
Likelihood ratio test= 180.9  on 4 df,   p=0
Wald test            = 70.83  on 4 df,   p=1.521e-14
Score (logrank) test = 131.8  on 4 df,   p=0

> cricketer$notacdDead <- with(cricketer, {dead[acd==1]<-0; dead})
> summary(coxph(Surv(life, notacdDead) ~ ns(year,2) +left, data=cricketer))
Call:
coxph(formula = Surv(life, notacdDead) ~ ns(year, 2) + left, 
    data = cricketer)

  n= 5960, number of events= 3199 

                 coef exp(coef) se(coef)       z Pr(>|z|)    
ns(year, 2)1 -2.21708   0.10893  0.11518 -19.249   <2e-16 ***
ns(year, 2)2 -2.62801   0.07222  0.20703 -12.694   <2e-16 ***
leftleft      0.02215   1.02240  0.04581   0.484    0.629    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

             exp(coef) exp(-coef) lower .95 upper .95
ns(year, 2)1   0.10893     9.1805   0.08691    0.1365
ns(year, 2)2   0.07222    13.8462   0.04813    0.1084
leftleft       1.02240     0.9781   0.93460    1.1184

Concordance= 0.634  (se = 0.006 )
Rsquare= 0.076   (max possible= 1 )
Likelihood ratio test= 473.6  on 3 df,   p=0
Wald test            = 409.2  on 3 df,   p=0
Score (logrank) test = 447  on 3 df,   p=0

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>