Learn R Programming

DALY (version 1.1.0)

hist.DALY: Histogram method for class 'DALY'

Description

Plot a standardized histogram of DALY Calculator output.

Usage

## S3 method for class 'DALY':
hist(x, xval = "DALY", prob = 0.95, central = "mean", \dots)

Arguments

x
Object of class 'DALY'
xval
Value to plot on x-axis; must be any of c("DALY", "YLD", "YLL", "Cases", "Deaths")
prob
Probability span by plotted credibility interval; defaults to .95
central
Plotted central value of distribution; must be any of c("Mean", "Median")
...
Further arguments passed to or from other methods

Details

This function plots a standardized histogram of DALY Calculator output. The histogram contains by default 25 cells. The limits of the credible interval are denoted by vertical lines; the credible interval limits and central tendency are printed above the histogram. An empirical density curve is plotted on top of the histogram.

See Also

aggregate.DALY DALYcalculator (for a brief description of the DALY Calculator) DALYmanual (for a more comprehensive overview)

Examples

Run this code
## load the Neurocysticercosis example
setDALYexample(1)

## initiate the Monte Carlo simulation process
## and store results in object 'x'
x <- getDALY()

## plot histogram of total deaths
## 90% credible interval + median
hist(x, xval = "Deaths", prob = 0.90, central = "median")

Run the code above in your browser using DataLab