drs {aods3} | R Documentation |
Test of Proportion Homogeneity between Groups using Donner's and Rao-Scott's Adjustments
Description
The function tests the homogeneity of probabilities between groups (H_0:
) from clustered binomial data {
}, where
is the size of cluster
,
the number of “successes” (proportions are
), and
the number of clusters. The function uses adjusted chi-squared statistics, with either the correction proposed by proposed by Donner (1989) or the correction proposed by Rao and Scott (1993).
Usage
drs(formula, data, type = c("d", "rs"), C = NULL, pooled = FALSE)
## S3 method for class 'drs'
print(x, ...)
Arguments
formula |
An formula where the left-hand side is a matrix of the form |
type |
A character string: either “d” for the Donner's test and “rs” for the Rao and Scott's test. |
data |
A data frame containing |
C |
An optional vector of a priori |
pooled |
Logical indicating if a pooled design effect is estimated over the |
x |
An object of class “drf”. |
... |
Further arguments to be passed to |
Details
Donner's test
The chi-squared statistic is adjusted with the correction factor computed in each group
. The test statistic is given by:
where and
.
is a scalar depending on the cluster sizes, and
is the ANOVA estimate of the intra-cluster correlation assumed common across groups (see Donner, 1989 or Donner et al., 1994). The statistic is compared to a chi-squared distribution with
degrees of freedom. Fixed correction factors
can be specified with the argument
C
.
Rao ans Scott's test
The method uses design effects and “effective” sample sizes. The design effect in each group
is estimated by
, where
is the variance of the ratio estimate of the probability in group
(Cochran, 1999, p. 32 and p. 66) and
is the standard binomial variance. The
are used to compute the effective sample sizes
, the effective numbers of successes
in each group
, and the overall effective proportion
. The test statistic is obtained by substituting these quantities in the usual chi-squared statistic, yielding:
which is compared to a chi-squared distribution with degrees of freedom.
A pooled design effect over the groups is estimated if argument
pooled = TRUE
(see Rao and Scott, 1993, Eq. 6). Fixed design effects can be specified with the argument
C
.
Value
An object of class drs
, printed with print.drs
.
References
Donner, A., 1989. Statistical methods in ophthalmology: an adjusted chi-squared approach. Biometrics 45, 605-611.
Donner, A., 1993. The comparison of proportions in the presence of litter effects. Prev. Vet. Med. 18, 17-26.
Donner, A., Eliasziw, M., Klar, N., 1994. A comparison of methods for testing homogeneity of proportions in teratologic studies. Stat. Med. 13, 1253-1264.
See Also
Examples
data(dja)
# Donner
drs(formula = cbind(m, n - m) ~ group, data = dja, type = "d")
# Rao and Scott
drs(formula = cbind(m, n - m) ~ group, type = "rs", data = dja)
drs(formula = cbind(m, n - m) ~ group, type = "rs", data = dja, pooled = TRUE)
# standard chi2 test
drs(formula = cbind(m, n - m) ~ group, data = dja, type = "d", C = c(1:1))
drs(formula = cbind(m, n - m) ~ group, data = dja, type = "rs", C = c(1:1))