Maxwell {VGAM} | R Documentation

## The Maxwell Distribution

### Description

Density, and distribution function for the Maxwell distribution.

### Usage

    dmaxwell(x, a, log=FALSE)
    pmaxwell(q, a)
    qmaxwell(p, a)
    rmaxwell(n, a)

### Arguments

`x, q` | vector of quantiles.
`p` | vector of probabilities.
`n` | number of observations. A single positive integer.
`a` | the parameter.
`log` | Logical. If `log=TRUE` then the logarithm of the density is returned.

### Details

See `maxwell`, the VGAM family function for estimating the parameter a by maximum likelihood estimation, for the formula of the probability density function.

### Value

`dmaxwell` gives the density, `pmaxwell` gives the distribution function, `qmaxwell` gives the quantile function, and `rmaxwell` generates random deviates.

### Note

The Maxwell distribution is related to the Rayleigh distribution.

### Author(s)

T. W. Yee

### References

Balakrishnan, N. and Nevzorov, V. B. (2003) A Primer on Statistical Distributions. Hoboken, New Jersey: Wiley.

### See Also

`maxwell`, `Rayleigh`, `rayleigh`.

### Examples

    ## Not run:
    a = 3
    x = seq(-0.5, 3, len=100)
    plot(x, dmaxwell(x, a=a), type="l", col="blue", las=1, ylab="",
         main="blue is density, red is cumulative distribution function",
         sub="Purple lines are the 10,20,...,90 percentiles")
    abline(h=0, col="blue", lty=2)
    lines(x, pmaxwell(x, a=a), type="l", col="red")
    probs = seq(0.1, 0.9, by=0.1)
    Q = qmaxwell(probs, a=a)
    lines(Q, dmaxwell(Q, a), col="purple", lty=3, type="h")
    lines(Q, pmaxwell(Q, a), col="purple", lty=3, type="h")
    abline(h=probs, col="purple", lty=3)
    pmaxwell(Q, a) - probs    # Should be all zero
    ## End(Not run)

[Package VGAM version 0.7-9 Index]