Plackett {VGAM} | R Documentation |
Density, distribution function, and random generation for the (one parameter) bivariate Plackett distribution.
dplack(x1, x2, oratio, log=FALSE) pplack(q1, q2, oratio) rplack(n, oratio)
x1, x2, q1, q2 |
vector of quantiles. |
n |
number of observations. Must be a positive integer of length 1. |
oratio |
the positive odds ratio psi. |
log |
Logical.
If TRUE then the logarithm is returned.
|
See plackett
, the VGAM
family functions for estimating the
parameter by maximum likelihood estimation, for the formula of the
cumulative distribution function and other details.
dplack
gives the density,
pplack
gives the distribution function, and
rplack
generates random deviates (a two-column matrix).
T. W. Yee
Mardia, K. V. (1967) Some contributions to contingency-type distributions. Biometrika, 54, 235–249.
## Not run: N = 101 x = seq(0.0, 1.0, len=N) oratio = exp(1) ox = expand.grid(x, x) z = dplack(ox[,1], ox[,2], oratio=oratio) contour(x, x, matrix(z, N, N), col="blue") z = pplack(ox[,1], ox[,2], oratio=oratio) contour(x, x, matrix(z, N, N), col="blue") plot(r <- rplack(n=3000, oratio=oratio)) par(mfrow=c(1,2)) hist(r[,1]) # Should be uniform hist(r[,2]) # Should be uniform ## End(Not run)