## 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