pdf: Parametric distributions for correlated binary data

Description Usage Arguments Details Value Author(s) References See Also Examples

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

1
2
3
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

P(X=x) = C(n,x)∑_{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

1
2
3
4
5
#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")

CorrBin documentation built on May 2, 2019, 4:46 p.m.