Mine-injury data
Section of Standard errors, and models for counts, part of Generalised linear models
Mine-injury data
| Type | Section |
| Taught in | Standard errors, and models for counts |
| Part | Generalised linear models |
Myers, Montgomery, and Vining report injuries in the upper seam of 44 West Virginia coal mines. Three covariates survived their selection: inner burden thickness in feet (x_1), the percent already extracted from the seam below (x_2), and years the mine has been open (x_3). The fitted mean used for the interpretation is
\hat\mu=\exp(-3.2707-0.0015 x_1+0.0627 x_2-0.0317 x_3).
The glm summary from the fit below prints an intercept of -3.7207, with slopes -0.00148, 0.06270, and -0.03165. The slopes match the rounded values in Equation (5) in Standard errors, and models for counts. The intercepts do not: -3.2707 and -3.7207 differ by a transposition. The reading below follows Equation (5) in Standard errors, and models for counts as written, and the standard errors and the dispersion are taken from the printed summary, where the slopes are the quantities being tested.1
On Equation (5) in Standard errors, and models for counts, the intercept is the mean number of injuries when the inner burden is 0 feet, nothing has been extracted below, and the mine is brand new: \exp(-3.2707)=0.038. A new mine and a mine with nothing extracted below are imaginable. Zero inner burden is a hole at the surface, which is not a mine. The intercept is algebra, not a sentence to publish.
A one-foot increase in inner burden multiplies the mean by \exp(-0.0015)=0.999. A foot is about thirty centimetres. A per-foot effect is not worth quoting. Per ten feet the coefficient is -0.015, and the mean is multiplied by \exp(-0.015)\approx 0.985. Still a small multiplicative change, and still something to compare with a standard error rather than with 1 by eye.
One extra percentage point of extraction below multiplies injuries by \exp(0.0627)=1.065. One extra year of age multiplies them by \exp(-0.0317)=0.969, which is about 1.03 times fewer injuries. The sign is not the story you might have expected. A dangerous mine may have been closed before it could appear in a data set of mines that are still open. Age in this table is entangled with having survived.
The Poisson log-likelihood is \sum_i\{y_i\log\mu_i-\mu_i\}, up to a constant. Differentiating and setting the score to zero produces \sum_{i=1}^n\frac{y_i-\mu_i}{\mu_i}\,\mu_i\,{\boldsymbol{X}}_i =\sum_{i=1}^n(y_i-\mu_i)\,{\boldsymbol{X}}_i={\boldsymbol{0}} when the link is log, because then \mu'=\mu and \mathrm{Var}=\mu, so the two cancel. It is still nonlinear in \boldsymbol{\beta}, because \mu_i=\exp({\boldsymbol{X}}_i^\top\boldsymbol{\beta}). The general score from the previous chapter is the same equation before that cancellation. Software does the iteration.
need <- function(pkg) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg, repos = "https://cloud.r-project.org")
}
suppressPackageStartupMessages(library(pkg, character.only = TRUE))
}
need("locfit")
data(mine, package = "locfit")
mines <- data.frame(
y = mine$frac,
x1 = mine$inb,
x2 = mine$extrp,
x3 = mine$time
)
fit1 <- glm(y ~ x1 + x2 + x3, data = mines, family = poisson)
fit2 <- glm(y ~ x1 + x2 + x3, data = mines, family = quasipoisson)
summary(fit1)
summary(fit2)The Poisson summary is
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.72068 0.97888 -3.801 0.000144
x1 -0.001479 0.000824 -1.794 0.0728
x2 0.06270 0.01227 5.110 3.2e-07
x3 -0.03165 0.01631 -1.941 0.0523
with dispersion fixed at 1. Inner burden and mine age are borderline. Percent extraction is not. The quasi-Poisson summary has the same four estimates. Only the standard errors change, because the estimated dispersion is 0.905, a bit under 1: given these three covariates, the injury counts vary less than a Poisson process. The quasi-Poisson standard errors are smaller by about \sqrt{0.905}, the t statistics move accordingly, and mine age now sits below 0.05 (p=0.048) while inner burden remains borderline (p=0.067). All three terms stay in the model. A term that is hovering on the boundary, and that still carries information, is not dropped. The underdispersion fits the selection story: mines that would have been wild never stayed open long enough to be counted, so the ones we see are a little more deterministic than a pure count process.
Used in
See also
Standard errors in a GLM · Binomial counts in a GLM · Count responses · Quasi-Poisson · Reading a log-linear coefficient · Count models beyond the Poisson · Overdispersion · Underdispersion
Footnotes
The disagreement is left visible rather than resolved by silently picking one intercept. The baseline mean is not a meaningful mine either way.↩︎