I am interested in the standardized version (mean zero, variance one) of the generalized hyperbolic and the hyperbolic distribution. I want to include this in my analysis and therefore I need the dervations and the implementations. In R, there is an implementation of the standardized generalized hyperbolic distribution.
I need the used formula and how to derive it for this implementation, where can I get it?
Where can I see, what the code is doing? So where can I get a 'look behind the scenes' to see what is implemented?
I searched via google but I could not find any derviations of how to get a standardized version of the ghyp or hyp. Where can I find this?
I could use the R command to also fit a standardized hyperbolic distribution if I do the following: Inser for lambda=1 (this gives hyperbolic) and then use the
dsghcommand along together with theoptimcommand to get a good fit of the standardized hyperbolic distribution to my data, is this correct?
edit: OK, the answer to 2) is, that I just can load the package and enter the command without any specifications. I then get the code behind it.
edit: I also noticed the sghFIT command, where can I find the theory behind this? Because they have to use a standardized version, so they need the formula and the derivation, this is what I need.
edit: I just saw, that they also only use the dsgh command for fitting.
Ok, my last edit, all comes back to the implementation of the dsgh command, the code for this command is:
dsgh <-
function(x, zeta = 1, rho = 0, lambda = 1, log = FALSE)
{
# A function implemented by Diethelm Wuertz
# Description:
# Returns density of the sgh distribution
# FUNCTION:
# Parameters:
if (length(zeta) == 3) {
lambda = zeta[3]
rho = zeta[2]
zeta = zeta[1]
}
# Compute Density:
param = .paramGH(zeta, rho, lambda)
ans = dgh(x, param[1], param[2], param[3], param[4], lambda, log)
# Return Value:
ans
}
He computes the density with
# Compute Density:
param = .paramGH(zeta, rho, lambda)
ans = dgh(x, param[1], param[2], param[3], param[4], lambda, log)
but I am not getting the idea behind the code. dgh is just giving the moments of the generalized hyperbolic distribution, see here? So where is the density? How does he do the modification to get a standardized version? Where is the theory behind this? So there must be a puplished paper or so, where it is described how to get the standardized version? I cannot find this?
.paramGHat theRcommand line shows you the code used to transform $\zeta, \rho, \lambda$ to thedghparameters. – whuber May 01 '13 at 18:50