Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

races

Hill races in Scotland


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

data(races)

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

References

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

Examples

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.5, 5.5, legend=c("low","high"), title="Cumulative climb",
           col=c("red","blue"), pch=c(15,16), bty="n", cex=0.75,
           title.adj=0.4, y.intersp=0.5, x.intersp=0.3)
})

glmtoolbox

Set of Tools to Data Analysis using Generalized Linear Models

v0.1.0
GPL-2 | GPL-3
Authors
Luis Hernando Vanegas [aut, cre], Luz Marina Rondón [aut], Gilberto A. Paula [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.