Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 2 3 | betabin.pdf(p, rho, n)
qpower.pdf(p, rho, n)
|
p |
numeric, the probability of success. |
rho |
numeric between 0 and 1 inclusive, the within-cluster correlation. |
n |
integer, cluster size. |
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.
a numeric vector of length n+1 giving the value of P(X=x) for x=0,…,n.
Aniko Szabo, aszabo@mcw.edu
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.
ran.CBData
for generating an entire dataset using
these functions
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.