Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gigHessian

Calculate Two-Sided Hessian for the Generalized Inverse Gaussian Distribution


Description

Calculates the Hessian of a function, either exactly or approximately. Used to obtaining the information matrix for maximum likelihood estimation.

Usage

gigHessian(x, param, hessianMethod = "tsHessian",
           whichParam = 1)

Arguments

x

Data vector.

param

The maximum likelihood estimates parameter vector of the generalized inverse Gaussian distribution. There are five different sets of parameterazations can be used in this function, the first four sets are listed in gigChangePars and the last set is the log scale of the first set of the parameterization, i.e., mu,log(delta),Pi,log(zeta).

hessianMethod

Only the approximate method ("tsHessian") has actually been implemented so far.

whichParam

Numeric. A number between indicating which parameterization the argument param relates to. Only parameterization 1 is available so far.

Details

The approximate Hessian is obtained via a call to tsHessian from the package DistributionUtils. summary.gigFit calls the function gigHessian to calculate the Hessian matrix when the argument hessian = TRUE.

Value

gigHessian gives the approximate Hessian matrix for the data vector x and the estimated parameter vector param.

Author(s)

David Scott d.scott@auckland.ac.nz, David Cusack

Examples

### Calculate the approximate Hessian using gigHessian:
param <- c(1,1,1)
dataVector <- rgig(500, param = param)
fit <- gigFit(dataVector)
coef <- coef(fit)
gigHessian(x = dataVector, param = coef, hessianMethod = "tsHessian",
              whichParam = 1)

### Or calculate the approximate Hessian using summary.gigFit method:
summary(fit, hessian = TRUE)

GeneralizedHyperbolic

The Generalized Hyperbolic Distribution

v0.8-4
GPL (>= 2)
Authors
David Scott <d.scott@auckland.ac.nz>
Initial release
2018-05-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.