scatterplot {DALY} | R Documentation |
Scatterplot method for class 'DALY' and 'DALY_list'
Description
Generate a scatterplot of population versus patient level burden. The method is available for objects of class 'DALY' and 'DALY_list'.
Usage
## S3 method for class 'DALY'
scatterplot(x, plot = c("DALY", "YLD", "YLL"), outcomes = TRUE,
per = 1000, samples = 1000, pch = 16, col = NULL, legend = NULL,
legend_pos = c("topright", "topleft", "bottomright", "bottomleft"), ...)
## S3 method for class 'DALY_list'
scatterplot(x, plot = c("DALY", "YLD", "YLL"),
per = 1000, samples = 1000, pch = 16, col = NULL, legend = NULL,
legend_pos = c("topright", "topleft", "bottomright", "bottomleft"), ...)
Arguments
x |
Object of class |
plot |
Which estimates should be plotted? Must be either |
outcomes |
Should different outcomes be plotted? Defaults to |
per |
Denominator for population level burden. Defaults to 1000 |
samples |
Number of samples to plotted. Defaults to 1000 |
pch |
Plotting symbol. Defaults to 16 (= solid circle).
See |
col |
Plotting color. Defaults to |
legend |
A character or |
legend_pos |
The position of the legend, either |
... |
Additional arguments to be passed to |
Details
This function generates a scatterplot of the estimated burden at the
population level (x-axis) versus the patient level (y-axis). Scatterplots can
be generated of 'DALY'
objects, to visualize the overall or
outcome-specific burden; and of 'DALY_list'
objects, to compare the
overall burden of, e.g., different diseases or different DALY calculation
scenarios.
Author(s)
See Also
DALYcalculator
(for a brief description of the DALY Calculator)
DALYmanual
(for a more comprehensive overview)
Examples
## Not run:
##= load toxoplasmosis example ============================
setDALYexample(2)
##= perform DALY calculation for different scenarios ======
toxo_00 <- getDALY(aw = FALSE, dr = 0)
toxo_03 <- getDALY(aw = FALSE, dr = 0.03)
toxo_13 <- getDALY(aw = TRUE, dr = 0.03)
##= combine scenarios in 'DALY_list' ======================
toxo <- DALY_list(toxo_00, toxo_03, toxo_13)
##= plot YLL and YLL for toxo_00 ==========================
par(mar = c(4, 4, 1, 1) + .5)
par(mfrow = c(1, 2))
scatterplot(toxo_00, plot = "YLL",
outcomes = FALSE, legend = FALSE)
scatterplot(toxo_00, plot = "YLD",
outcomes = FALSE, legend = FALSE)
##= plot all three scenarios ==============================
par(mfrow = c(1, 1))
scatterplot(toxo,
legend = c("DALY[0,0]",
"DALY[0,0.03]",
"DALY[1,0.03]"),
legend_pos = "topleft",
log = "xy",
main = "Scenario analysis")
## End(Not run)