gigHessian {GeneralizedHyperbolic} | R Documentation |
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 |
hessianMethod |
Only the approximate method ( |
whichParam |
Numeric. A number between indicating which
parameterization the argument |
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)