50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

VGAM (version 1.1-8)

leipnik: Leipnik Regression Family Function

Description

Estimates the two parameters of a (transformed) Leipnik distribution by maximum likelihood estimation.

Usage

leipnik(lmu = "logitlink", llambda = logofflink(offset = 1),
        imu = NULL, ilambda = NULL)

Value

An object of class "vglmff"

(see vglmff-class). The object is used by modelling functions such as vglm,

rrvglm

and vgam.

Arguments

lmu, llambda

Link function for the μ and λ parameters. See Links for more choices.

imu, ilambda

Numeric. Optional initial values for μ and λ.

Author

T. W. Yee

Details

The (transformed) Leipnik distribution has density function f(y;μ,λ)={y(1y)}12Beta(λ+12,12)[1+(yμ)2y(1y)]λ2 where 0<y<1 and λ>1. The mean is μ (returned as the fitted values) and the variance is 1/λ.

Jorgensen (1997) calls the above the transformed Leipnik distribution, and if y=(x+1)/2 and μ=(θ+1)/2, then the distribution of X as a function of x and θ is known as the the (untransformed) Leipnik distribution. Here, both x and θ are in (1,1).

References

Jorgensen, B. (1997). The Theory of Dispersion Models. London: Chapman & Hall

Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1995). Continuous Univariate Distributions, 2nd edition, Volume 2, New York: Wiley. (pages 612--617).

See Also

mccullagh89.

Examples

Run this code
ldata <- data.frame(y = rnorm(2000, 0.5, 0.1))  # Improper data
fit <- vglm(y ~ 1, leipnik(ilambda = 1), ldata, trace = TRUE)
head(fitted(fit))
with(ldata, mean(y))
summary(fit)
coef(fit, matrix = TRUE)
Coef(fit)

sum(weights(fit))  # Sum of the prior weights
sum(weights(fit, type = "work"))  # Sum of the working weights

Run the code above in your browser using DataLab