group_diff {surveil} | R Documentation |
Measures of pairwise inequality
Description
Calculate pairwise measures of health inequality from a fitted surveil
time series model, with credible intervals and MCMC samples. Calculates absolute and fractional rate differences (RD and population attributable risk (PAR)), rate ratios, and excess cases.
Usage
group_diff(x, target, reference)
## S3 method for class 'surveil'
group_diff(x, target, reference)
## S3 method for class 'list'
group_diff(x, ...)
Arguments
x |
Either a fitted |
target |
The name (character string) of the disadvantaged group that is the target of inference. If |
reference |
The name (character string) of the reference group to which |
... |
Additional arguments (not used). |
Details
Comparing incidence rates
For the following calculations, the terms reference
and target
refer to incidence rates for the respective groups; p
is the size of the target population. (Target is the group that is the 'target' of our inferences, so that it is the numerator in rate ratios, etc.) The following measures are calculated by group_diff
:
# rate difference RD = target - reference # population attributable fraction PAR = RD/target = (RR - 1)/RR # rate ratio RR = target/reference # excess cases EC = RD * p
As the math communicates, the PAR is the rate difference expressed as a fraction of total risk for the target population. This could also be read as the fraction of risk in the target population that would have been removed had the target rate equaled the reference rate (Menvielle et al. 2017).
Comparing age-standardized rates
If the user provides a list of stand_surveil
objects with age-standardized rates (instead of a single surveil
model), then the exact calculations will be completed as follows. The RR is simply the ratio of age-standardized rates, and the rate difference is similarly the difference between age-standardized rates. However, excess cases is calculated for each age group separately, and the total excess cases across all age groups is returned. Similarly, the attributable risk is calculated by taking the total excess cases across all age groups per year and dividing by the total risk (i.e., by the sum of the whole number of cases across all age groups). Cumulative excess cases is the sum of the time-period specific total number of excess cases. (Notice that the PAR is not equal to (RR-1)/RR when the PAR is derived from a number of age-specific rates and the RR is based on age-standardized rates.)
Value
A list, also of class "surveil_diff", with the following elements:
- summary
A tibble with a summary of posterior distributions (mean and 95 percent cred. intervals) for the target group incidence rate, the RD, RR, PAR, and excess cases.
- cumulative_cases
Summary of the posterior distribution for the cumulative number of excess cases and the PAR (mean and 95 percent cred. intervals)
- groups
Character string with target and reference population names
- samples
A data frame of MCMC samples for each quantity of interest (target and reference rates, RD, RR, PAR, and EC, as well as
Trend_Cases = Rate * Population
). Indexed by time.- cum_samples
MCMC samples of the cumulative number of excess cases.
Author(s)
Connor Donegan (Connor.Donegan@UTSouthwestern.edu)
Source
Menvielle, G, Kulhanaova, I, Machenbach, JP. Assessing the impact of a public health intervention to reduce social inequalities in cancer. In: Vaccarella, S, Lortet-Tieulent, J, Saracci, R, Conway, D, Straif, K, Wild, CP, editors. Reducing Social Inequalities in Cancer: Evidence and Priorities for Research. Geneva, Switzerland: WHO Press, 2017:185-192.
See Also
plot.surveil_diff
print.surveil_diff
theil
Examples
data(msa)
dat = subset(msa, grepl("Houston", MSA) & grepl("Black|White", Race))
fit <- stan_rw(dat, time = Year, group = Race,
iter = 1e3) # low iter for speed only
gd <- group_diff(fit, "Black or African American", "White")
print(gd, scale = 100e3)
plot(gd, scale = 100e3)