ghypScale {GeneralizedHyperbolic} | R Documentation |
Rescale a generalized hyperbolic distribution
Description
Given a specific mean and standard deviation will rescale any given generalized hyperbolic distribution to have the same shape but the specified mean and standard deviation. Can be used to standardize a generalized hyperbolic distribution to have mean zero and standard deviation one.
Usage
ghypScale(newMean, newSD,
mu = 0, delta = 1, alpha = 1, beta = 0, lambda = 1,
param = c(mu, delta, alpha, beta, lambda))
Arguments
newMean |
Numeric. The required mean of the rescaled distribution. |
newSD |
Numeric. The required standard deviation of the rescaled distribution. |
mu |
Numeric. Location parameter |
delta |
Numeric. Scale parameter |
alpha |
Numeric. Tail parameter |
beta |
Numeric. Skewness parameter |
lambda |
Numeric. Shape parameter |
param |
Numeric. Specifying the parameters of the starting
distribution as a vector of the form |
Value
A numerical vector of length 5 giving the value of the parameters in
the rescaled generalized hyperbolic distribution in the usual
(\alpha, \beta
) parameterization.
Author(s)
David Scott d.scott@auckland.ac.nz
Examples
param <- c(2,10,0.1,0.07,-0.5) # a normal inverse Gaussian
ghypMean(param = param)
ghypVar(param = param)
## convert to standardized parameters
(newParam <- ghypScale(0, 1, param = param))
ghypMean(param = newParam)
ghypVar(param = newParam)
## try some other mean and sd
(newParam <- ghypScale(1, 1, param = param))
ghypMean(param = newParam)
sqrt(ghypVar(param = newParam))
(newParam <- ghypScale(10, 2, param = param))
ghypMean(param = newParam)
sqrt(ghypVar(param = newParam))