Description Usage Arguments Details Value Author(s) References Examples
This function is intended to calculate the age-adjusted rates given a dataset that includes age and an binary outcome. It returns the crude rates with their confidence interval and the age-adjusted rates with its confidence interval.
1 | age_adjusted(dataset,outcome,age,agemin=0,agemax=130,source="who",alpha=0.05)
|
dataset |
the name of the dataframe |
outcome |
the name of the outcome variable |
age |
the name of the age variable |
agemin |
the minimum age to be used to calculate the weights (default=0) |
agemax |
the maximum age to be used to calculate the weights (default=130) |
source |
the name of the standard to be used for the weights (see the details section). Default: 'who' |
alpha |
the probability of a type I error. Default: 0.05 for the 95% CI (1-alpha) |
This function return a list containing nine values (see values section). It includes three types of standards: the European (euro), the American (us) and the World Health Organization (who). The confidence interval (CI) is calculated using the binomial probabilities using the binconf function of the Hmisc package. The default is to calculate the 95% CI (using an alpha of 0.05).
This function returns a list containing the following fields:
outcome - the name of the outcome variable
population - the total population on the dataset
events - the number of events for the outcome
crude - a list with the crude rates. This contains a list we three elements:
rate - the value of the crude rate
CImin - the value of the lower CI
CImax - the value of the higher CI
weighted - a list with the weighted rates. This contains a list we three elements:
rate - the value of the crude rate
CImin - the value of the lower CI
CImax - the value of the higher CI
Tomas Karpati M.D.
"The WHO Standard Population is defined to reflect the average age structure of the world's population over the next generation, from the year 2000 to 2025." https://www.nrscotland.gov.uk/files//statistics/age-standardised-death-rates-esp/age-standard-death-rates-background.pdf
American standard (2000): https://www.cdc.gov/nchs/data/statnt/statnt20.pdf
World (WHO 2000-2025) Standard: https://seer.cancer.gov/stdpopulations/world.who.html
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.