hypersecant {VGAM} | R Documentation |
Hyperbolic Secant Regression Family Function
Description
Estimation of the parameter of the hyperbolic secant distribution.
Usage
hypersecant(link.theta = extlogitlink(min = -pi/2, max = pi/2),
init.theta = NULL)
hypersecant01(link.theta = extlogitlink(min = -pi/2, max = pi/2),
init.theta = NULL)
Arguments
link.theta |
Parameter link function applied to the
parameter |
init.theta |
Optional initial value for |
Details
The probability density function of the hyperbolic secant distribution is given by
for parameter
and all real
.
The mean of
is
(returned as the fitted values).
Morris (1982) calls this model NEF-HS
(Natural Exponential Family-Hyperbolic Secant).
It is used to generate NEFs, giving rise to the class of NEF-GHS
(G for Generalized).
Another parameterization is used for hypersecant01()
:
let .
Then this uses
for
parameter
and
.
Then the mean of
is
(returned as the fitted values) and the variance is
.
For both parameterizations Newton-Raphson is same as Fisher scoring.
Value
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions
such as vglm
,
and vgam
.
Author(s)
T. W. Yee
References
Jorgensen, B. (1997). The Theory of Dispersion Models. London: Chapman & Hall.
Morris, C. N. (1982). Natural exponential families with quadratic variance functions. The Annals of Statistics, 10(1), 65–80.
See Also
Examples
hdata <- data.frame(x2 = rnorm(nn <- 200))
hdata <- transform(hdata, y = rnorm(nn)) # Not very good data!
fit1 <- vglm(y ~ x2, hypersecant, hdata, trace = TRUE, crit = "c")
coef(fit1, matrix = TRUE)
fit1@misc$earg
# Not recommended:
fit2 <- vglm(y ~ x2, hypersecant(link = "identitylink"), hdata)
coef(fit2, matrix = TRUE)
fit2@misc$earg