pdf {CorrBin} | R Documentation |
Parametric distributions for correlated binary data
Description
qpower.pdf
and betabin.pdf
calculate the probability
distribution function for the number of responses in a cluster of the q-power
and beta-binomial distributions, respectively.
Usage
betabin.pdf(p, rho, n)
qpower.pdf(p, rho, n)
Arguments
p |
numeric, the probability of success. |
rho |
numeric between 0 and 1 inclusive, the within-cluster correlation. |
n |
integer, cluster size. |
Details
The pdf of the q-power distribution is
, where
, and the intra-cluster correlation
The pdf of the beta-binomial distribution is
, where
, and
.
Value
a numeric vector of length giving the value of
for
.
Author(s)
Aniko Szabo, aszabo@mcw.edu
References
Kuk, A. A (2004) Litter-based approach to risk assessment in developmental toxicity studies via a power family of completely monotone functions Applied Statistics, 52, 51-61.
Williams, D. A. (1975) The Analysis of Binary Responses from Toxicological Experiments Involving Reproduction and Teratogenicity Biometrics, 31, 949-952.
See Also
ran.CBData
for generating an entire dataset using
these functions
Examples
#the distributions have quite different shapes
#with q-power assigning more weight to the "all affected" event than other distributions
plot(0:10, betabin.pdf(0.3, 0.4, 10), type="o", ylim=c(0,0.34),
ylab="Density", xlab="Number of responses out of 10")
lines(0:10, qpower.pdf(0.3, 0.4, 10), type="o", col="red")