Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


VGAM (version 0.8-3)

hypersecant: Hyperbolic Secant Distribution Family Function

Description

Estimation of the parameter of the hyperbolic secant distribution.

Usage

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)

Arguments

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.

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Details

The probability density function of the hyperbolic secant distribution is given by f(y)=exp(θy+log(cos(θ)))/(2cosh(π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(θ)/π)×y0.5+θ/π×(1y)0.5θ/π, 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.

References

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

See Also

elogit.

Examples

Run this code
hdata = data.frame(x = rnorm(nn <- 200))
hdata = transform(hdata, y = rnorm(nn))  # Not very good data!
fit = vglm(y ~ x, hypersecant, hdata, trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)
fit@misc$earg

# Not recommended:
fit = vglm(y ~ x, hypersecant(link = "identity"), hdata, trace = TRUE)
coef(fit, matrix = TRUE)
fit@misc$earg

Run the code above in your browser using DataLab