Calculate the age standardized rate using the direct method.
ageadjust(
count,
pop,
rate = NULL,
stdpop = NULL,
method = "gamma",
conf_level = 0.95,
mp = 1e+05
)
The number of cases of a specific disease or condition.
The total population of the same group or region where the disease cases (count) were observed.
Disease rate, which is the number of cases (count) per unit of population (pop).
Standardized population for age standardization.
Method used for calculating the age-standardized rate, options are 'gamma', 'normal', or 'lognormal', default is 'gamma'.
Confidence level for calculating confidence intervals, value between 0 and 1, default is 0.95.
A multiplier used to scale the calculated rates. Default is 100000.
Age standardized rate and its confidence interval.
cases <- c(50, 60, 45, 70)
pop <- c(1000, 1200, 1100, 900)
spop <- c(800, 1000, 1100, 900)
ageadjust(cases, pop, stdpop = spop, mp = 100000)
#> $cases
#> [1] 225
#>
#> $cr
#> [1] 5357.143
#>
#> $cr_var
#> [1] 1.27551e-05
#>
#> $cr_lci
#> [1] 4679.972
#>
#> $cr_uci
#> [1] 6104.765
#>
#> $asr
#> [1] 5394.737
#>
#> $asr_var
#> [1] 1.306556e-05
#>
#> $asr_lci
#> [1] 4709.493
#>
#> $asr_uci
#> [1] 6154.046
#>