Fgm {VGAM} | R Documentation

## Farlie-Gumbel-Morgenstern's Bivariate Distribution

### Description

Density, distribution function, and random generation for the (one parameter) bivariate Farlie-Gumbel-Morgenstern's distribution.

### Usage

    dfgm(x1, x2, alpha, log=FALSE)
    pfgm(q1, q2, alpha)
    rfgm(n, alpha)

### Arguments

`x1, x2, q1, q2` | vector of quantiles.
`n` | number of observations. Must be a positive integer of length 1.
`alpha` | the association parameter.
`log` | Logical. If `TRUE` then the logarithm is returned.

### Details

See `fgm`, the VGAM family functions for estimating the parameter by maximum likelihood estimation, for the formula of the cumulative distribution function and other details.

### Value

`dfgm` gives the density, `pfgm` gives the distribution function, and `rfgm` generates random deviates (a two-column matrix).

### Author(s)

T. W. Yee

### See Also

`fgm`.

### Examples

    ## Not run:
    N = 101
    x = seq(0.0, 1.0, len=N)
    alpha = 0.7
    ox = expand.grid(x, x)
    z = dfgm(ox[,1], ox[,2], alpha=alpha)
    contour(x, x, matrix(z, N, N), col="blue")
    z = pfgm(ox[,1], ox[,2], alpha=alpha)
    contour(x, x, matrix(z, N, N), col="blue")

    plot(r <- rfgm(n=3000, alpha=alpha), col="blue")
    par(mfrow=c(1,2))
    hist(r[,1]) # Should be uniform
    hist(r[,2]) # Should be uniform
    ## End(Not run)

[Package VGAM version 0.7-9 Index]