Generalized Secant Hyperbolic Regression Family Function
gensh.RdEstimation of the parameters of the generalized secant hyperbolic distribution.
Arguments
- shape
Numeric of length 1. Shape parameter, called \(t\) in Vaughan (2002). Valid values are \(-\pi/2 < t\).
- llocation, lscale
Parameter link functions applied to the two parameters. See
Linksfor more choices. SeeCommonVGAMffArgumentsfor more information.- zero, imethod
See
CommonVGAMffArgumentsfor information.- ilocation, iscale
See
CommonVGAMffArgumentsfor information.- glocation.mux, gscale.mux
See
CommonVGAMffArgumentsfor information.- probs.y, tol0
See
CommonVGAMffArgumentsfor information.
Details
The probability density function of the hyperbolic secant distribution is given by $$f(y; a, b, s) = [(c_1 / b) \; \exp(c_2 z)] / [ \exp(2 c_2 z) + 2 C_3 \exp(c_2 z) + 1]$$ for shape parameter \(-\pi < s\) and all real \(y\). The scalars \(c_1\), \(c_2\), \(C_3\) are functions of \(s\). The mean of \(Y\) is the location parameter \(a\) (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.
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
hypersecant,
logistic.
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)
#> Iteration 1: loglikelihood = -296.91201
#> Iteration 2: loglikelihood = -296.90211
#> Iteration 3: loglikelihood = -296.9021
#> Iteration 4: loglikelihood = -296.9021
coef(fit, matrix = TRUE)
#> location loglink(scale)
#> (Intercept) 2.04071529 0.103929
#> x2 0.05527216 0.000000