# for heptathlon example, p 104
m200 <- c(22.6, 23.7, 23.1, 23.6, 23.6, 23.6, 25.5,
23.9, 24.5, 23.9, 24.9, 24.8, 24.7,
25.0, 24.6, 24.9, 25.0, 25.6, 24.8,
25.5, 25.7, 24.9, 26.6, 25.2, 26.2)
m800 <- c(128.5, 126.1, 124.2, 132.5,
134.7, 132.5, 138.5, 127.9, 133.7, 132.2,
136.1, 142.8, 125.8, 131.5, 137.1, 134.9,
146.7, 133.9, 146.4, 144.0, 133.4,
138.0, 139.2, 137.3, 163.4)
m=L_corr(m200, m800, null=0, exp.r=.4, L.int=3, alpha=.05,
toler=0.0001, logplot=FALSE, supplot=-10, verb=TRUE)
m
#Note: the support for observed vs 0 is different from book (5.776 vs 5.700)
#due to differences in calculation of r by Excel and R
Run the code above in your browser using DataLab