gigHessian | R Documentation |
Calculates the Hessian of a function, either exactly or approximately. Used to obtaining the information matrix for maximum likelihood estimation.
gigHessian(x, param, hessianMethod = "tsHessian",
whichParam = 1)
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 |
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
.
gigHessian
gives the approximate Hessian matrix for
the data vector x
and the estimated parameter vector
param
.
David Scott d.scott@auckland.ac.nz, David Cusack
### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.