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

Description Usage Format Author(s) References Examples

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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))

JimmyClowes/rethinking documentation built on Dec. 18, 2021, 1:36 a.m.