*! version 1.2.3 28apr2025

Title

sta -- Association Measures (paired data)

Syntax

sta var_Y var_X [if] [in], data(paired)
[options]

stai #a11 #a10 #a01 #a00, data(paired) [options]

relatsymm relative symmetry results

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

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

nst(string) name of the study (label)

Description

Measures of Association for paired data.

The command needs the Y and X variables to compute the results.

stai is the immediate form of sta; see immed.
The sequence of #a11, #a10, #a01 and #a00 come from a contingency table:

| X

| (-) | (+) |

+
+
+

Y (+) | a10 | a11 |

(-) | a00 | a01 |

+
+
+

Examples

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

. sta Paracetamol Aspirin, data(paired)

. sta Paracetamol Aspirin, data(paired) relatsymm

. stai 2 7 1 0, data(paired)

. stai 3 0 1 5, data(paired) relatsymm

Stored results

The command stores the following in r():

Scalars

r(a11) number of cases exposed & controls exposed

r(a10) number of cases exposed & controls unexposed

r(a01) number of cases unexposed & controls exposed

r(a00) number of cases unexposed & controls unexposed

Paired samples

r(d) difference Pr(Y+)-Pr(X+)

r(lb_d_exact) exact lower bound of CI for d

r(ub_d_exact) exact upper bound of CI for d

r(lb_d_new) Newcombe lower bound of CI for d

r(ub_d_new) Newcombe upper bound of CI for d

r(lb_d_asym) asymptotic lower bound of CI for d

r(ub_d_asym) asymptotic upper bound of CI for d

r(se_d_asym) estimate of standard error of d

r(lb_d_asym_corr) asymptotic corrected lower bound of CI for d

r(ub_d_asym_corr) asymptotic corrected upper bound of CI for d

r(or) odds ratio (exposure-disease)

r(lb_or_exact) exact lower bound of CI for or

r(ub_or_exact) exact upper bound of CI for or

r(lb_or_wilson) Wilson lower bound of CI for or

r(ub_or_wilson) Wilson upper bound of CI for or

r(lb_or_asym) asymptotic lower bound of CI for or

r(ub_or_asym) asymptotic upper bound of CI for or

r(se_or_asym) estimate of standard error of or

r(p_McNemar) McNemar matched-pair p-value

r(chi2_exact) exact simmetry chi-square

r(p_exact) exact simmetry p-value

r(chi2_exact_corr) corrected exact simmetry chi-square

r(p_exact_corr) corrected exact simmetry p-value

r(or_assoc) test of association or

r(chi2_assoc) test of association chi-square

r(p_assoc) test of association p-value

r(chi2_assoc_corr) corrected test of association chi-square

r(p_assoc_corr) corrected test of association p-value

Relative simmetry

r(pd) proportion difference

r(lb_pd_wald) Wald lower bound of CI for pd

r(ub_pd_wald) Wald upper bound of CI for pd

r(lb_pd_new) Newcombe lower bound of CI for pd

r(ub_pd_new) Newcombe upper bound of CI for pd

r(pr) proportion ratio

r(lb_pr) lower bound of CI for pr

r(ub_pr) upper bound of CI for pr

r(se_pr) estimate of standard error of pr

r(or) odds ratio

r(lb_or) lower bound of CI for or

r(ub_or) upper bound of CI for or

r(se_or) estimate of standard error of or

r(chi2) exact simmetry chi-square

r(p) exact simmetry p-value

r(chi2_corr) corrected exact simmetry chi-square

r(p_corr) corrected exact simmetry p-value