Learn R Programming

VGAM (version 0.8-4.1)

genrayleigh: Generalized Rayleigh Distribution Family Function

Description

Estimates the two parameters of the generalized Rayleigh distribution by maximum likelihood estimation.

Usage

genrayleigh(lshape = "loge", lscale = "loge", eshape = list(),
            escale = list(), ishape = NULL,   iscale = NULL,
            tol12 = 1e-05, nsimEIM = 300, zero = 1)

Arguments

lshape, lscale
Link function for the two positive parameters, shape and scale. See Links for more choices.
eshape, escale
List. Extra argument for each of the links. See earg in Links for general information.
ishape, iscale
Numeric. Optional initial values for the shape and scale parameters.
nsimEIM, zero
tol12
Numeric and positive. Tolerance for testing whether the second shape parameter is either 1 or 2. If so then the working weights need to handle these singularities.

Value

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

Details

The generalized Rayleigh distribution has density function $$f(y;a = shape,b = scale) = (2 a y/b^{2}) e^{-(y/b)^{2}} (1 - e^{-(y/b)^{2}})^{a-1}$$ where $y > 0$ and the two parameters, $a$ and $b$, are positive. The mean cannot be expressed nicely so the median is returned as the fitted values. Applications of the generalized Rayleigh distribution include modeling strength data and general lifetime data. Simulated Fisher scoring is implemented.

References

Kundu, D., Raqab, M. C. (2005). Generalized Rayleigh distribution: different methods of estimations. Computational Statistics and Data Analysis, 49, 187--200.

See Also

dgenray, rayleigh.

Examples

Run this code
shape = exp(1); scale = exp(1);
rdata = data.frame(y = rgenray(n = 1000, shape, scale))
fit = vglm(y ~ 1, genrayleigh, rdata, trace = TRUE)
c(with(rdata, mean(y)), head(fitted(fit), 1))
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab