Learn R Programming

epiR (version 0.9-45)

epi.directadj: Directly adjusted incidence risk estimates

Description

Compute directly adjusted incidence risks.

Usage

epi.directadj(obs, pop, std, units = 1, conf.level = 0.95)

Arguments

obs
a matrix representing the observed number of events. Rows represent strata (e.g. region); columns represent the covariates to be adjusted for (e.g. age class, gender). The sum of each row will equal the total number of events for each stratum. If there ar
pop
a matrix representing population size. Rows represent strata (e.g. region); columns represent the covariates to be adjusted for (e.g. age class, gender). The sum of each row will equal the total population size within each stratum. If there are no covaria
std
a matrix representing the standard population size for the different levels of the covariate to be adjusted for.
units
multiplier for the incidence risk estimates.
conf.level
magnitude of the returned confidence interval. Must be a single number between 0 and 1.

Value

  • A list containing the following:
  • crude.stratathe crude incidence risk estimates for each stratum.
  • adj.stratathe directly adjusted incidence risk estimates for each stratum.

Details

This function returns unadjusted (crude) and directly adjusted incidence risk estimates for each of the specified population strata. The term `covariate' is used here to refer to the factors we want to control (i.e. adjust) for when calculating the directly adjusted incidence risk estimates. As an example, data were collected to identify the relationship between the incidence of mongoloidism and birth order in Michigan (USA) from 1950 to 1964 (Fleiss 1981, page 240). Of interest was to provide incidence risk estimates for each of the birth order categories that were adjusted for the effect of maternal age. Using epi.directadj rows represent the strata (birth order: 1, 2, 3, 4, and 5+) and columns represent the variable to be adjusted for (maternal age: less than 20 years of age, 20 - 24 years, 25 - 29 years, etc). The following table show the count of mongoloid births during the study period: lllllll{ -20 20-24 25-29 30-34 35-39 40+ 1 107 141 60 40 39 25 2 25 150 110 84 82 39 3 3 71 114 103 108 75 4 1 26 64 89 137 96 5+ 0 8 63 112 262 295 } Data in this format would be presented as object obs for epi.directadj.

References

Fay M, Feuer E (1997). Confidence intervals for directly standardized rates: A method based on the gamma distribution. Statistics in Medicine 16: 791 - 801. Fleiss JL (1981). Statistical Methods for Rates and Proportions, Wiley, New York, USA. Greenland S, Rothman KJ. Introduction to stratified analysis. In: Rothman KJ, Greenland S (1998). Modern Epidemiology. Lippincott Williams, & Wilkins, Philadelphia, pp. 260 - 265.

See Also

epi.indirectadj

Examples

Run this code
## A study was conducted to estimate the seroprevalence of leptospirosis
## in dogs in Glasgow and Edinburgh, Scotland. The following data were 
## obtained for male and female dogs:

obs <- matrix(data = c(15,46,53,16), nrow = 2, byrow = TRUE, 
   dimnames = list(c("ED","GL"), c("M","F")))
pop <- matrix(data = c(48,212,180,71), nrow = 2, byrow = TRUE, 
   dimnames = list(c("ED","GL"), c("M","F")))

## Compute directly adjusted seroprevalence estimates, using a standard 
## population with equal numbers of male and female dogs:

std <- matrix(data = c(250,250), nrow = 1, byrow = TRUE, 
   dimnames = list("", c("M","F")))

epi.directadj(obs, pop, std, units = 1, conf.level = 0.95)

## > $crude.strata
## >          est     lower     upper
## > ED 0.2346154 0.1794622 0.3013733
## > GL 0.2749004 0.2138889 0.3479040

## > $adj.strata
## >          est     lower     upper
## > ED 0.2647406 0.1866047 0.3692766
## > GL 0.2598983 0.1964162 0.3406224

## The confounding effect of sex has been removed by the gender-adjusted 
## incidence risk estimates.

Run the code above in your browser using DataLab