Description Usage Arguments Details Value Author(s) Source References See Also Examples
Density, distribution function, quantile function and random generation for the inverse hyperbolic sine distribution.
1 2 3 4 5 6 |
x, q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
mu |
vector of means. The default value is |
sigma |
vector of standard deviations. The default value is |
lambda |
vector of skewness parameters. If |
k |
vector of parameters. This parameter controls the skewness of the distribution. |
log, log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x]. |
If mu
, sigma
, lambda
, or k
are not specified they assume the default values of mu = 0
, sigma
is approximately sqrt((exp(2)-1)/2)
, lambda = 0
, and k = 1
. These default values give the distribution sinh(z)
, where z
is a standard normal random variable.
An inverse hyperbolic sine random variable Y is defined by the transformation
Y = a + b*sinh( λ + Z/k)
where Z is a standard normal random variable, and a, b, λ, and k control the mean, variance, skewness, and kurtosis respectively. Thus the inverse hyperbolic sine distribution has density
f(x) = \frac{k e^{(-k^2/2) (log ( \frac{x-a}{b} + (\frac{(x-a)^2}{b^2} + 1)^{1/2}) - λ )^2}}{√{2 π ((a-x)^2+b^2)}}
and if we reparametrize the distribution so that the parameters include the mean (μ) and the standard deviation (σ) instead of a and b, then we let
b = \frac{2 σ}{√{( e^{2 λ + k^{-2}} + e^{-2 λ + k^{-2}} + 2 ) ( e^{k^{-2}} - 1 )}}
a = μ - \frac{b}{2} (( e^{λ} - e^{-λ} ) e^{\frac{1}{2 k^2}} )
Thus if μ = 0, σ = √{\frac{e^2-1}{2}}, λ = 0, and k = 1, then Y = sinh(Z).
dihs
gives the density,
pihs
gives the distribution function,
qihs
gives the quantile function, and
rihs
generates random deviates.
The length of the result is determined by n
for
rihs
, and is the maximum of the lengths of the
numerical arguments for the other functions.
The numerical arguments other than n
are recycled to the
length of the result. Only the first elements of the logical
arguments are used.
sigma <= 0
and k <= 0
are errors and return NaN
.
Carter Davis, carterdavis@byu.edu
dihs
is calculated from the definition (in ‘Details’). [pqr]ihs
are based on the relationship to the normal.
Hansen, C., McDonald, J. B., and Theodossiou, P. (2007) "Some Flexible Parametric Models for Partially Adaptive Estimators of Econometric Models" Economics - The Open-Access, Open-Assessment E-Journal, volume 1, 1-20.
Hansen, C., McDonald, J. B., and Newey, W. K. (2010) "Instrumental Variables Regression with Flexible Distributions" Journal of Business and Economic Statistics, volume 28, 13-25.
Distributions for other standard distributions such as dnorm
for the normal distribution and dlnorm
for the log-normal distribution, which is also a transformation of a normal random variable.
1 2 3 4 5 6 7 8 9 10 |
Loading required package: maxLik
Loading required package: miscTools
Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.
If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
[1] 0.5
[1] 0.3904346
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.