*! version 1.1.9 12feb2024

Title

sta -- Association Measures (stratified frequency data)

Syntax

sta var_response var_exposure [if] [in], data(freq)
by(stratify_var) [options]

stai #a11 #a01 #b11 #b01 \ [...] \ #a1i #a0i #b1i #b0i \ [...] \
#a1k #a0k #b1k #b0k, data(freq) [options]

(where k is the number of strata)

st(type) study type; valid values are: default is st(co)

co (cohort)
cc (case-control)

method(weight) method of weighting: default is method(mh)

mh Mantel-Haenszel

iv Inverse of Variance

is Internal Standardization

es External Standardization

zero(correct) continuity correction for cells with zero events:

n None default is zero(n)

c Constant, add k=0.5 to each cell

p Proportional, add k1=N1/N and k0=N0/N for co studies

add k1=M1/N and k0=M0/N for cc studies

r Reciprocal, add k1=1/N0 and k0=1/N1 for co studies

add k1=1/M0 and k0=1/M1 for cc studies

The recommended correction is reciprocal

cornfield use Cornfield approximation to calculate CI of the odds ratio (cc studies only)

woolf use Woolf approximation to calculate SE and CI of the odds ratio (cc studies only)

by default, sta reports an exact interval of the odds ratio

notables do not show 2x2 frequency tables; by default, 2x2 tables are shown

level(#) confidence level (%); the default is level(95)

nst(string) name of the study (label)

Description

Measures of Association for stratified frequency data.

Cohort and case-control studies are available. The command needs the response, exposure and
stratify variables to compute the results.

stai is the immediate form of sta; see immed. The sequence of #a1i, #a0i, #b1i
and #b0i come from a contingency table, given k strata:

|Str 1| .. |Str i| .. |Str k

+-----+----+-----+----+-----

Exposed Cases | a11 | .. | a1i | .. | a1k

NonCases | b11 | .. | b1i | .. | b1k

+-----+----+-----+----+-----

UnExposed Cases | a01 | .. | a0i | .. | a0k

NonCases | b01 | .. | b0i | .. | b0k

+-----+----+-----+----+-----

Examples

Cohort

. use http://metodo.uab.cat/stata/RaceDeathStage.dta

. sta Death Race, data(freq) st(co) by(Stage) method(mh)

. stai 84 727 710 9055 \ 322 2277 553 5193, data(freq) st(co) method(mh)

. stai 84 727 0 9055 \ 322 2277 553 5193, data(freq) st(co) method(mh) zero(c)

Case-Control

. use http://metodo.uab.cat/stata/TubeBlanketSeason.dta

. sta NeuralTubeDef Blanket, data(freq) st(cc) by(Season) method(iv)

. stai 10 104 15 97 \ 11 99 9 103, data(freq) st(cc) method(iv)

Stored results

The command stores the following in r():

Matrices

r(Data) 2x2 table data

r(Ratios) ratios (risk/odds) for each stratum and for the overall

r(Estim) estimations (risk/odds) for the different methods

r(Chi2) chi2 results