varbin {aods3} | R Documentation |
Estimate of a Probability from Clustered Binomial Data
Description
The function estimates a probability and its variance from clustered binomial data
{},
where is the size of cluster
,
the number of “successes” (proportions are
), and
the number of clusters. Confidence intervals are calculated using a normal approximation, which might be inappropriate when the probability is close to 0 or 1.
Usage
varbin(n, m, alpha = 0.05, R = 5000)
## S3 method for class 'varbin'
print(x, ...)
Arguments
n |
A vector of the sizes of the clusters. |
m |
A vector of the numbers of successes (proportions are eqny = m / n). |
alpha |
The significance level for the confidence intervals. Default to 0.05, providing 95% CI's. |
R |
The number of bootstrap replicates to compute bootstrap mean and variance. Default to 5000. |
x |
An object of class “varbin”. |
... |
Further arguments to be passed to “print”. |
Details
Five methods are used for the estimations. Let us consider clusters of sizes
with observed count responses
. We note
the observed proportions. The underlying assumption is that the probability, say
, is homogeneous across the clusters.
Binomial method: the probability estimate and its variance are calculated by
(ratio estimate) and
, respectively.
Ratio method: the probability is estimated as for the binomial method (ratio estimate). The one-stage cluster sampling formula is used to calculate the variance of
(see Cochran, 1999, p. 32 and p. 66).
Arithmetic method: the probability is estimated by . The variance of
is estimated by
.
Jackknife method: the probability is estimated by defined by the arithmetic mean of the pseudovalues
. The variance is estimated by
(Gladen, 1977, Paul, 1982).
Bootstrap method: samples of clusters of size
are drawn with equal probability from the initial sample
(Efron and Tibshirani, 1993). The bootstrap estimate
and its estimated variance are the arithmetic mean and the empirical variance (computed with denominator
) of the
binomial ratio estimates, respectively.
Value
An object of class varbin
, printed with print.varbin
.
References
Cochran, W.G., 1999, 3th ed. Sampling techniques. Wiley, New York.
Efron, B., Tibshirani, R., 1993. An introduction to the bootstrap. Chapman and Hall, London.
Gladen, B., 1977. The use of the jackknife to estimate proportions from toxicological data in the presence
of litter effects. JASA 74(366), 278-283.
Paul, S.R., 1982. Analysis of proportions of affected foetuses in teratological experiments.
Biometrics 38, 361-370.
See Also
Examples
data(rabbits)
z <- rabbits[rabbits$group == "M", ]
varbin(z$n, z$m)
by(rabbits,
list(group = rabbits$group),
function(x) varbin(n = x$n, m = x$m, R = 1000))