races: Hill races in Scotland

Description Usage Format Source References Examples

Description

Each year the Scottish Hill Runners Association publishes a list of hill races in Scotland for the year. These data consist of record time, distance, and cumulative climb of 35 of those races. The aim of the statistical analysis of these data is to explain the differences between the record time of the races using their differences on distance and cumulative climb. See Agresti (2015, page 62).

Usage

1

Format

A data frame with 35 rows and 4 variables:

race

a character vector giving the names of the races.

distance

a numeric vector giving the distance, in miles, of the races.

cclimb

a numeric vector giving the cumulative climb, in thousands of feet, of the races.

rtime

a numeric vector giving the record time, in minutes, of the races.

Source

http://users.stat.ufl.edu/~aa/glm/data/

References

Agresti A. (2015) Foundations of Linear and Generalized Linear Models. John Wiley & Sons, New Jersey.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
races2 <- within(races,cli <- cut(cclimb, include.lowest=TRUE,
                                  breaks=quantile(cclimb, probs=c(0:2)/2),
                                  labels=c("low","high")))
with(races2,{
    plot(log(distance), log(rtime),
         col=apply(as.matrix(cli),1,function(x) switch(x,"low"="red","high"="blue")),
         pch=apply(as.matrix(cli),1,function(x) switch(x,"low"=15,"high"=16)))
    legend(0.7, 5.4, legend=c("low","high"), title="Cumulative climb",
           col=c("red","blue"), pch=c(15,16), bty="n")
})

glmtoolbox documentation built on June 9, 2021, 9:07 a.m.

Related to races in glmtoolbox...