hypersecant {VGAM} | R Documentation |
Estimation of the parameter of the hyperbolic secant distribution.
hypersecant(link.theta="elogit", earg=if(link.theta=="elogit") list(min=-pi/2, max=pi/2) else list(), init.theta=NULL) hypersecant.1(link.theta="elogit", earg=if(link.theta=="elogit") list(min=-pi/2, max=pi/2) else list(), init.theta=NULL)
link.theta |
Parameter link function applied to the parameter theta.
See Links for more choices.
|
earg |
List. Extra argument for the link.
See earg in Links for general information.
|
init.theta |
Optional initial value for theta.
If failure to converge occurs, try some other value.
The default means an initial value is determined internally.
|
The probability density function of the hyperbolic secant distribution is given by
f(y) =exp(theta*y + log(cos(theta ))) / (2*cosh(pi*y/2)),
for parameter pi/2 < theta < pi/2 and all real y. The mean of Y is tan(theta) (returned as the fitted values).
Another parameterization is used for hypersecant.1()
.
This uses
f(y) =(cos(theta)/pi) * y^(-0.5+theta/pi) * (1-y)^(-0.5-theta/pi),
for parameter pi/2 < theta < pi/2 and 0 < y < 1. Then the mean of Y is 0.5 + theta/pi (returned as the fitted values) and the variance is (pi^2 - 4*theta^2) / (8*pi^2).
For both parameterizations Newton-Raphson is same as Fisher scoring.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
T. W. Yee
Jorgensen, B. (1997) The Theory of Dispersion Models. London: Chapman & Hall.
x = rnorm(n <- 200) y = rnorm(n) # Not very good data! fit = vglm(y ~ x, hypersecant, trace=TRUE, crit="c") coef(fit, matrix=TRUE) fit@misc$earg # Not recommended fit = vglm(y ~ x, hypersecant(link="identity"), trace=TRUE, crit="c") coef(fit, matrix=TRUE) fit@misc$earg