Frank {VGAM} | R Documentation |
Density, distribution function, quantile function and random generation for the one parameter Frank distribution.
dfrank(x1, x2, alpha) pfrank(q1, q2, alpha) rfrank(n, alpha)
x1, x2, q1, q2 |
vector of quantiles. |
n |
number of observations. Must be a positive integer of length 1. |
alpha |
the positive correlation parameter alpha. |
See frank
, the VGAM
family functions for estimating the correlation
parameter by maximum likelihood estimation, for the formula of the
cumulative distribution function and other details.
dfrank
gives the density,
pfrank
gives the distribution function, and
rfrank
generates random deviates (a two-column matrix).
T. W. Yee
Genest, C. (1987) Frank's family of bivariate distributions. Biometrika, 74, 549–555.
## Not run: N = 100 x = seq(-0.30, 1.30, len=N) alpha = 8 ox = expand.grid(x, x) z = dfrank(ox[,1], ox[,2], alp=alpha) contour(x, x, matrix(z, N, N)) z = pfrank(ox[,1], ox[,2], alp=alpha) contour(x, x, matrix(z, N, N)) alpha = exp(4) plot(r <- rfrank(n=3000, alpha=alpha)) par(mfrow=c(1,2)) hist(r[,1]) # Should be uniform hist(r[,2]) # Should be uniform ## End(Not run)