PrussianHorses: Numbers of soldiers killed by horse kicks in the Prussian...

PrussianHorsesR Documentation

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)

Format

  1. kicks: Count of soldier deaths from horse kicks

  2. year: Calendar year

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

Author(s)

Richard McElreath

References

von Bortkiewicz (1898), Das Gesetz der kleinen Zahlen

Examples

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))

rmcelreath/rethinking documentation built on Aug. 26, 2024, 5:54 p.m.