****************
****************
** tabodds ** Tabulate Odds
****************
****************
Overview: The "tabodds" command is used to obtain summaries and inference
for case-control or cross-sectional designs. It tabulates the
odds of disease for the levels of a categorical exposure (or
explanatory) variable. This is particularly useful for
looking at the association between disease and a multi-category
exposure variable. The "or" option is useful for computing
odds ratios that compare each level >1 of the exposure variable
to the first level, or reference level (ie. odds ratio comparing
Evar=j to Evar=1 for j=2,3,...).
This procedure can be used to obtain two useful tests:
(1) A test of homogeneity of odds -- this is a variant on
the standard Pearson's chi-square test.
(2) A trend test for a linear trend of the log odds against
the levels of the explanatory variable.
Usage: "tabodds Dvar Evar"
Where - Dvar is the disease variable (1=disease, 0=control)
Evar is the exposure variable (multiple levels possible)
Summaries: The "tabodds" command returns an estimate of the disease odds,
p/(1-p), for each level of the exposure variable. A confidence
interval is also calculated. A test of homogeneity, and a test
for trend are reported.
Using the "or" option will compute an odds ratio comparing level=j
to level=1 (see below).
Options: (1) "tabodds Dvar Evar [fweight=freq]" -- this is used when the
data are in a "grouped" format with the number of
cases/controls that have a certain covariate combination
given by the variable "freq".
See notes pg 52 for cc example.
(2) "tabodds Dvar Evar, or" -- this option leads to odds ratio
summaries. The reference group is the lowest level of the
Evar, and the odds ratios are: odds(j)/odds(1) where each
category, level=j, is compared to the reference category,
level=1. The reference level can be controlled using "base"
(see next).
(3) "tabodds Dvar Evar, or base(#)" -- the base option allows
the reference category to be changed. For example, "base(4)"
would use Evar=4 as the reference group, and odds ratios would
report: odds(j)/odds(4).
****************
****************
** mhodds ** Mantel-Haenszel Methods
****************
****************
Overview: The "mhodds" command is used to obtain summaries and inference
for case-control or cross-sectional designs. It calculates an
estimate of the odds ratio (disease & exposure) for each level
of a stratifying variable. A test for the common odds ratio,
and an estimate of the common odds ratio are given. In addition,
a test of homogeneity of the odds ratios is computed.
One key advantage of "mhodds" is the ability to control for
multiple stratifying variables.
Usage: "mhodds Dvar Evar, by(Svar)"
Where - Dvar is the disease variable (1=disease, 0=control)
Evar is the exposure variable (1=exposed, 0=unexposed)
Svar is the stratifying variable (multiple levels)
Summaries: The "mhodds" command returns the stratum specific odds ratio,
a test for each stratum specific odds ratio, a confidence interval
for each stratum specific odds ratio, and an adjusted, or common
odds ratio estimate, test, and confidence interval.
Options: (1) "mhodds Dvar Evar [fweight=freq], by(Svar)" -- this is
used when the data are in a "grouped" format with the number
of cases/controls that have a certain covariate combination
given by the variable "freq".
See notes pg 52 for cc example.
(2) The overall adjusted estimate can be obtained directly by
not using the "by()" option:
"mhodds Dvar Evar Svar"
This returns the summary odds ratio and tests without showing
the stratum-specific odds ratios. No homogeneity test is
provided.
Similarly, we can adjust for multiple variables:
"mhodds Dvar Evar Svar1 Svar2" -- this adjusts for both
Svar1 and Svar2 when computing the adjusted OR. No test
of homogeneity is given.
"mhodds Dvar Evar Svar1, by(Svar2)" -- this computes an
a disease odds ratio that is adjusted for Svar1 within each
level of Svar2, and then combines these estimates to form
a single common odds ratio. A homogeneity test is calculated
for the adjusted odds ratios across the levels of Svar2.
****************
****************
** cc ** Using "cc" for Mantel-Haenszel Methods
****************
****************
Overview: The "cc" command is used to obtain summaries and inference
for case-control or cross-sectional designs. Using the
"by(Svar)" option allows Mantel-Haenszel estimates to be
obtained.
Usage: "cc Dvar Evar, by(Svar)"
Where - Dvar is the disease variable (1=disease, 0=control)
Evar is the exposure variable (1=exposed, 0=unexposed)
Svar is the stratifying variable (multiple levels)
Summaries: The "cc" command returns the stratum specific odds ratio and
confidence interval, the Mantel-Haenszel weights, the crude
odds ratio and the adjusted odds ratio. In addition, both
a test of homogeneity of odds ratios, and the Mantel-Haenszel
test for the common odds ratio are computed.
Options: (1) "cc Dvar Evar [fweight=freq], by(Svar)" -- this is used
when the data are in a "grouped" format with the number of
cases/controls that have a certain covariate combination
given by the variable "freq".
See notes pg 52 for cc example.
(2) "cc Dvar Evar, by(Svar) bd" -- the "bd" option allows
calculation of the Breslow-Day test of homogeneity of the
odds ratio. This test is more appropriate than the
Mantel-Haenszel test when the stratum specific 2x2 Tables
are sparse.