calc_stdrate_var: Calculate age-standardized rates and variance

View source: R/calc_stdrate_var.R

calc_stdrate_varR Documentation

Calculate age-standardized rates and variance

Description

Given a bare (unquoted) column of age-specific rates, variance, and weights, will return the age-standardized rate and variance.

Usage

calc_stdrate_var(df, asrate_col, asvar_col, ..., weight_col = unit_w)

Arguments

df

processed MCOD dataframe

asrate_col

age-specific rate column

asvar_col

variance of the age-specific rate

...

grouping variables (in addition to year and race)

weight_col

column of (unit) weights

Value

dataframe with two new columns


mkiang/narcan documentation built on Sept. 26, 2024, 7:18 a.m.