
dplack(x1, x2, oratio, log = FALSE)
pplack(q1, q2, oratio)
rplack(n, oratio)
TRUE
then the logarithm is returned.dplack
gives the density,
pplack
gives the distribution function, and
rplack
generates random deviates (a two-column matrix).plackett
, the plackett
,
frank
.N = 101; oratio = exp(1)
x = seq(0.0, 1.0, len = N)
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(rr <- rplack(n = 3000, oratio = oratio))
par(mfrow = c(1,2))
hist(rr[,1]) # Should be uniform
hist(rr[,2]) # Should be uniform
Run the code above in your browser using DataLab