glarma (version 1.6-0)

DriverDeaths: Single Vehicle Nighttime Driver Deaths in Utah

Description

This data set gives the number of single vehicle nighttime driver deaths in the state of Utah by month over the period August 1980 to July 1986, along with observations on a number of possible predictors. The aim of the study from which it was taken was to investigate the effect of the lowering of the legal blood alcohol concentration (BAC) while driving, from 0.1 to 0.08 units, and the simultaneous introduction of administrative license revocation. The time period for the observations is centred on the month of the intervention, August 1983.

Usage

data(DriverDeaths)

Arguments

Format

A data frame containing the following columns:

[, 1]

Deaths Number of single vehicle nighttime driver deaths monthly.

[, 2]

Intercept A vector of ones, providing the intercept in the model.

[, 3]

ReducedBAC Indicator of before or after lowering of legal blood alcohol level.0 for months prior to August 1983, 1 for months on or after August 1983.

[, 4]

FriSat Number of Friday and Saturday nights in the month.

[, 5]

lnOMVDRate Log of the number of other motor vehicle deaths per 100,000 of population.

[, 6]

Population Adult population of the State of Utah.

Examples

Run this code
# NOT RUN {
### Model number of deaths
data(DriverDeaths)
y <- DriverDeaths[, "Deaths"]
X <- as.matrix(DriverDeaths[, 2:5])
Population <- DriverDeaths[, "Population"]

### Offset included
glarmamodOffset <- glarma(y, X, offset = log(Population/100000),
                          phiLags = c(12),
                          type = "Poi", method = "FS",
                          residuals = "Pearson", maxit = 100, grad = 1e-6)
print(summary(glarmamodOffset))
par(mfrow =c(3,2))
plot(glarmamodOffset)


### No offset included
glarmamodNoOffset <- glarma(y, X, phiLags = c(12),
                            type = "Poi", method = "FS",
                            residuals = "Pearson", maxit = 100, grad = 1e-6)
print(summary(glarmamodNoOffset))
par(mfrow=c(3,2))
plot(glarmamodNoOffset)
# }

Run the code above in your browser using DataLab