# maxwell: Maxwell Regression Family Function In VGAM: Vector Generalized Linear and Additive Models

## Description

Estimating the parameter of the Maxwell distribution by maximum likelihood estimation.

## Usage

 ```1 2 3``` ```maxwell(link = "loglink", zero = NULL, parallel = FALSE, type.fitted = c("mean", "percentiles", "Qlink"), percentiles = 50) ```

## Arguments

 `link` Parameter link function applied to a, which is called the parameter `rate`. See `Links` for more choices and information; a log link is the default because the parameter is positive. More information is at `CommonVGAMffArguments`. `zero, parallel` See `CommonVGAMffArguments`. `type.fitted, percentiles` See `CommonVGAMffArguments` for information. Using `"Qlink"` is for quantile-links in VGAMextra.

## Details

The Maxwell distribution, which is used in the area of thermodynamics, has a probability density function that can be written

f(y;a) = sqrt(2/pi) * a^(3/2) * y^2 * exp(-0.5*a*y^2)

for y>0 and a>0. The mean of Y is sqrt(8 / (a * pi)) (returned as the fitted values), and its variance is (3*pi - 8)/(pi*a).

## Value

An object of class `"vglmff"` (see `vglmff-class`). The object is used by modelling functions such as `vglm`, `rrvglm` and `vgam`.

## Note

Fisher-scoring and Newton-Raphson are the same here. A related distribution is the Rayleigh distribution. This VGAM family function handles multiple responses. This VGAM family function can be mimicked by `poisson.points(ostatistic = 1.5, dimension = 2)`.

T. W. Yee

## References

von Seggern, D. H. (1993). CRC Standard Curves and Surfaces, Boca Raton, FL, USA: CRC Press.

`Maxwell`, `rayleigh`, `poisson.points`.

## Examples

 ```1 2 3 4``` ```mdata <- data.frame(y = rmaxwell(1000, rate = exp(2))) fit <- vglm(y ~ 1, maxwell, data = mdata, trace = TRUE, crit = "coef") coef(fit, matrix = TRUE) Coef(fit) ```

### Example output

```Loading required package: stats4
VGLM    linear loop  1 :  coefficients = 2.2306871
VGLM    linear loop  2 :  coefficients = 1.9831625
VGLM    linear loop  3 :  coefficients = 2.0091814
VGLM    linear loop  4 :  coefficients = 2.0095258
VGLM    linear loop  5 :  coefficients = 2.0095258
loge(rate)
(Intercept)   2.009526
rate
7.459779
```

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.