R Dataset / Package vcd / Trucks

On this R-data statistics page, you will find information about the Trucks data set which pertains to Truck Accidents Data. The Trucks data set is found in the vcd R package. You can load the Trucks data set in R by issuing the following command at the console data("Trucks"). This will load the data into a variable called Trucks. If R says the Trucks data set is not found, you can try installing the package by issuing this command install.packages("vcd") and then attempt to reload the data with the library() command. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the Trucks R data set. The size of this file is about 1,044 bytes.

Truck Accidents Data

Description

Data from a study in England in two periods from November 1969 to October 1971 and November 1971 to October 1973. A new compulsory safety measure for trucks was introduced in October 1971. Therefore, the question is whether the safety measure had an effect on the number of accidents and on the point of collision on the truck.

Usage

data("Trucks")

Format

A data frame with 24 observations on 5 variables.

Freq

frequency of accidents involving trucks.

period

factor indicating time period (before, after) 1971-11-01.

collision

factor indicating whether the collision was in the back or forward (including the front and the sides) of the truck (back, forward).

parked

factor indicating whether the truck was parked (yes, no).

light

factor indicating light conditions: day light (daylight), night on an illuminated road (night, illuminate), night on a dark road (night, dark).

Source

E. B. Andersen (1991), The Statistical Analysis of Categorical Data, Table 6.8.

References

E. B. Andersen (1991), The Statistical Analysis of Categorical Data. 2nd edition. Springer-Verlag, Berlin.

Examples

library(MASS)
data("Trucks")
tab <- xtabs(Freq ~ period + collision + light + parked, data = Trucks)
loglm(~ (collision + period) * parked * light, data = tab)
doubledecker(collision ~ parked + light + period, data = tab)
cotabplot(tab, panel = cotab_coindep)

Dataset imported from https://www.r-project.org.

Attachments: csv, json

<iframe src="https://pmagunia.com/iframe/r-dataset-package-vcd-trucks.html" width="100%" height="100%" style="border:0px"></iframe>