Learn R Programming

gamclass (version 0.52)

plotFars: Extract ratio of ratios estimate of safety device effectiveness, and return trellis graphics object

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.

Usage

plotFars(data = FARS, restrict =
"age>=16&age

Arguments

data
Data frame, which must include among its columns variables year, variables noted in statistics plus corresponding variables for drivers, variables that appear in restrict, the variable injury
restrict
text: an expression that restricts observations considered
fatal
numeric: 4 for fatal injury, or c(3,4) for incxapacitating or fatal injury
statistics
Vector of character: ratio of ratios variables that wil be plotted

Value

  • A graphics object is returned

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.

See Also

matchedPairs

Examples

Run this code
gphFars <- plotFars()

Run the code above in your browser using DataLab