gensh {VGAM} | R Documentation |
Generalized Secant Hyperbolic Regression Family Function
Description
Estimation of the parameters of the generalized secant hyperbolic distribution.
Usage
gensh(shape, llocation = "identitylink",
lscale = "loglink", zero = "scale",
ilocation = NULL, iscale = NULL, imethod = 1,
glocation.mux = exp((-4:4)/2),
gscale.mux = exp((-4:4)/2),
probs.y = 0.3, tol0 = 1e-4)
Arguments
shape |
Numeric of length 1.
Shape parameter, called |
llocation , lscale |
Parameter link functions applied to the
two parameters.
See |
zero , imethod |
See |
ilocation , iscale |
See |
glocation.mux , gscale.mux |
See |
probs.y , tol0 |
See |
Details
The probability density function of the hyperbolic secant distribution is given by
for shape
parameter
and all real
.
The scalars
,
,
are functions of
.
The mean of
is
the location parameter
(returned as the fitted values).
All moments of the distribution are finite.
Further details about
the parameterization can be found
in Vaughan (2002).
Fisher scoring is implemented and it has
a diagonal EIM.
More details are at
Gensh
.
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
Vaughan, D. C. (2002). The generalized secant hyperbolic distribution and its properties. Communications in Statistics—Theory and Methods, 31(2): 219–238.
See Also
Examples
sh <- -pi / 2; loc <- 2
hdata <- data.frame(x2 = rnorm(nn <- 200))
hdata <- transform(hdata, y = rgensh(nn, sh, loc))
fit <- vglm(y ~ x2, gensh(sh), hdata, trace = TRUE)
coef(fit, matrix = TRUE)