10 prtest — Tests of proportions
where s
1
=
p
bp
1
bq
1
/n
1
and s
2
=
p
bp
2
bq
2
/n
2
are the standard errors of the two sample proportions
and z
1−α/2
is the (1 − α/2)th quantile of the standard normal distribution.
With clustered data, suppose that there are K
1
and K
2
clusters in population one and population
two with the corresponding average cluster sizes of M
1
and M
2
. Let ρ
1
and ρ
2
be the intraclass
correlations and CV
cl,1
and CV
cl,2
be the coefficients of variation for cluster sizes for population one
and population two. Let C
adj,1
and C
adj,2
be the adjustments to standard errors of the two sample
proportions for clustered data, defined analogously to C
adj
in One-sample test for each population.
Let s
d0,cl
=
r
bp
p
bq
p
C
2
adj,1
/n
1
+ C
2
adj,2
/n
2
be the standard error of bp
1
− bp
2
under the null
hypothesis of p
1
= p
2
adjusted for clustered data. Also, let s
1,cl
= C
adj,1
s
1
and s
2,cl
= C
adj,2
s
2
be
the standard errors of bp
1
and bp
2
adjusted for clustered data. To adjust the two-sample test statistic
and the confidence interval for clustering, replace s
d0
with s
d0,cl
, s
1
with s
1,cl
, and s
2
with s
2,cl
in
the corresponding formulas.
References
Acock, A. C. 2023. A Gentle Introduction to Stata. Rev. 6th ed. College Station, TX: Stata Press.
Ahn, C., M. Heo, and S. Zhang. 2015. Sample Size Calculations for Clustered and Longitudinal Outcomes in Clinical
Research. Boca Raton, FL: CRC Press.
Hayes, R. J., and L. H. Moulton. 2009. Cluster Randomised Trials. Boca Raton, FL: CRC Press.
. 2017. Cluster Randomised Trials. 2nd ed. Boca Raton, FL: CRC Press.
Hujoel, P. P., L. H. Moulton, and W. J. Loesche. 1990. Estimation of sensitivity and specificity of site-specific
diagnostic tests. Journal of Periodontal Research 25: 193–196. https://doi.org/10.1111/j.1600-0765.1990.tb00903.x.
O’Brien, K. L., L. H. Moulton, R. Reid, R. Weatherholt, J. Oski, L. B. Brown, G. Kumar, A. Parkinson, D. Hu,
J. Hackell, I. Chang, R. Kohberger, G. Siber, and M. Santosham. 2003. Efficacy and safety of seven-valent
conjugate pneumococcal vaccine in American Indian children: Group randomised trial. Lancet 362: 355–361.
https://doi.org/10.1016/S0140-6736(03)14022-6.
Also see
[R] bitest — Binomial probability test
[R] proportion — Estimate proportions
[R] ttest — t tests (mean-comparison tests)
[MV] hotelling — Hotelling’s T
2
generalized means test
[PSS-2] power oneproportion — Power analysis for a one-sample proportion test
[PSS-2] power oneproportion, cluster — Power analysis for a one-sample proportion test, CRD
[PSS-2] power twoproportions — Power analysis for a two-sample proportions test
[PSS-2] power twoproportions, cluster — Power analysis for a two-sample proportions test, CRD
Stata, Stata Press, and Mata are registered trademarks of StataCorp LLC. Stata and
Stata Press are registered trademarks with the World Intellectual Property Organization
of the United Nations. StataNow and NetCourseNow are trademarks of StataCorp
LLC. Other brand and product names are registered trademarks or trademarks of their
respective companies. Copyright
c
1985–2023 StataCorp LLC, College Station, TX,
USA. All rights reserved.
For suggested citations, see the FAQ on citing Stata documentation.