| plotFars | R Documentation |
Devices may be airbags or seatbelts. For airbags, alternatives are to use “airbag installed” or “airbag deployed” as the criterion. The plot shows, for each of the specified features, the ratio of driver death rate (or other outcome, e.g., death or injury) with feature, to rate without feature, in both cases for passenger without feature.
plotFars(tabDeaths=gamclass::frontDeaths,
statistics = c("airbagAvail", "airbagDeploy", "restraint"))
tabDeaths |
List, containing (as a minimum) three-dimensional arrays
with the names specified in the argument |
statistics |
Vector of character: names of the sublists, which contain information on the deathrates |
The name injury is used, with frontDeaths or sideDeaths
or rearDeaths or otherDeaths as the first argument, to refer to
deaths. The function tabFarsDeaths allows the option of returning an
object, suitable for using as first argument, that treats injury as
death or serious injury.
A graphics object is returned
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.
John Maindonald
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.