tabFarsDead {gamclass} | R Documentation |
Extract ratio of ratios estimate of safety device effectiveness, from
the Fars
dataset.
Description
Safety devices may be airbags or seatbelts. For airbags, alternatives are to use ‘airbag installed’ or ‘airbag deployed’ as the criterion. Ratio of driver deaths to passenger deaths are calculated for driver with device and for driver without device, in both cases for passenger without device, and the ratio of these ratios calculated.
Usage
tabFarsDead(dset=gamclass::FARS, fatal = 4,
restrict=expression(age>=16&age<998&inimpact%in%c(11,12,1)),
statistics = c("airbagAvail", "airbagDeploy", "Restraint"))
Arguments
dset |
data frame containing data |
fatal |
numeric: 4 for fatal injury, or |
statistics |
Vector of character: ratio of rates variables that will be tabulated |
restrict |
Expression restricting values as specified |
Details
Note that the ‘airbag deployed’ statistic is not a useful measure of airbag effectiveness. At its most effective, the airbag will deploy only when the accident is sufficiently serious that deployment will reduce the risk of serious injury and/or accident. The with/without deployment comparison compares, in part, serious accidents with less serious accidents.
Value
A list with elements
airbagAvail |
a multiway table with margins |
airbagDeploy |
a multiway table with margins |
Restraint |
a multiway table with margins |
Author(s)
John Maindonald
Examples
tabDeaths <- tabFarsDead()