qpower.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

qpower.pdf(p, rho, n)
betabin.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

P(X=x) = C(n,x)sum_{k=0}^x (-1)^kC(x,k)q^((n-x+k)^g),

x=0,...,n, where q=1-p, and the intra-cluster correlation

rho = (q^(2^g)-q^2)/(q(1-q)).

The pdf of the beta-binomial distribution is

P(X=x) = C(n,x) B(a+x,n+b-x)/B(a,b),

x=0,...,n, where a=p(1-rho)/rho, and b=(1-p)(1-rho)/rho.

Value

a numeric vector of length n+1 giving the value of P(X=x) for x=0,...,n.

Author(s)

Aniko Szabo, aszabo@mcw.edu

References

Kuk, A. A (2004) litter-based approach to risk assessement 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")

[Package CorrBin version 1.02 Index]