genrayleigh: Generalized Rayleigh Distribution Family Function

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/family.others.R

Description

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

Usage

1
2
3
genrayleigh(lscale = "loglink", lshape = "loglink",
            iscale = NULL,   ishape = NULL,
            tol12 = 1e-05, nsimEIM = 300, zero = 2)

Arguments

lscale, lshape

Link function for the two positive parameters, scale and shape. See Links for more choices.

iscale, ishape

Numeric. Optional initial values for the scale and shape parameters.

nsimEIM, zero

See CommonVGAMffArguments.

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.

Details

The generalized Rayleigh distribution has density function

(2*s*y/b^2) * e^(-(y/b)^2) * (1 - e^(-(y/b)^2))^(s-1)

where y > 0 and the two parameters, b and s, 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.

Value

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

Note

We define scale as the reciprocal of the scale parameter used by Kundu and Raqab (2005).

Author(s)

J. G. Lauder and T. W. Yee

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

1
2
3
4
5
6
7
Scale <- exp(1); shape <- exp(1)
rdata <- data.frame(y = rgenray(n = 1000, scale = Scale, shape = shape))
fit <- vglm(y ~ 1, genrayleigh, data = rdata, trace = TRUE)
c(with(rdata, mean(y)), head(fitted(fit), 1))
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

Example output

Loading required package: stats4
Loading required package: splines
VGLM    linear loop  1 :  loglikelihood = -1513.8597
VGLM    linear loop  2 :  loglikelihood = -1513.8597
VGLM    linear loop  3 :  loglikelihood = -1513.8597
[1] 3.437968 3.342808
            loge(scale) loge(shape)
(Intercept)    1.000509    1.022118
   scale    shape 
2.719665 2.779073 

Call:
vglm(formula = y ~ 1, family = genrayleigh, data = rdata, trace = TRUE)


Pearson residuals:
                Min      1Q  Median     3Q   Max
loge(scale) -0.9827 -0.7636 -0.2724 0.5229 4.987
loge(shape) -9.6620 -0.1779  0.3615 0.6054 0.668

Coefficients: 
              Estimate Std. Error z value Pr(>|z|)    
(Intercept):1  1.00051    0.01649   60.69   <2e-16 ***
(Intercept):2  1.02212    0.05030   20.32   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Number of linear predictors:  2 

Names of linear predictors: loge(scale), loge(shape)

Log-likelihood: -1513.86 on 1998 degrees of freedom

Number of iterations: 3 

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