age.deaths | R Documentation |
Function to compute excess deaths by age group and jurisdiction during the 2020 COVID-19 pandemic.
age.deaths(state="Massachusetts", age.group=c("Under 25 years","25-44 years","45-64 years", "65-74 years","75-84 years","85 years and older"), plot=c("raw & excess","raw & percent above normal"), cumulative=TRUE, corrected=FALSE, regression=FALSE, data=list(), date.range=list(), return=NULL, year=c(2020,2021,2022), bg="transparent", ...)
state |
state or jurisdiction. |
age.group |
age group or groups. |
plot |
what to plot. |
cumulative |
show cumulative deaths or excess deaths (logical). |
corrected |
correct past year deaths to 2020 population (logical). |
regression |
use regression to obtain expected value (instead of corrected mean). |
data |
list containing CDC data. If not supplied, function will create this object. |
date.range |
date range for the plot. |
return |
return specific values to the user. |
year |
year to plot. |
bg |
background color. |
... |
optional arguments. |
A plot. Also can optionally return various different things to the user if return
is specified.
Liam Revell liam.revell@umb.edu
References here.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.