Learn R Programming

rethinking (version 2.13)

PrussianHorses: Numbers of soldiers killed by horse kicks in the Prussian army 1875-1894

Description

Data collected by Ladsilaus von Bortkiewicz (1898), Das Gesetz der kleinen Zahlen.

Usage

data(PrussianHorses)

Arguments

Value

Format

  1. kicks: Count of soldier deaths from horse kicks

  2. year: Calendar year

  3. corps: Military corps (division). G is the guard corps.

References

von Bortkiewicz (1898), Das Gesetz der kleinen Zahlen

Examples

Run this code
# NOT RUN {
data(PrussianHorses)
d <- PrussianHorses

dat <- list(
    kicks = d$kicks,
    year = as.integer(as.factor(d$year)), # year as category
    corps = as.integer(d$corps)
)

m0 <- ulam(
    alist(
        kicks ~ poisson( lambda ),
        log(lambda) <- d[corps] + y[year],
        d[corps] ~ normal(0,0.5),
        y[year] ~ normal(0,0.5)
    ), data=dat )

plot(precis(m0,2))
# }

Run the code above in your browser using DataLab