MARSShessian {MARSS} | R Documentation |
Parameter Variance-Covariance Matrix from the Hessian Matrix
Description
Calculates an approximate parameter variance-covariance matrix for the parameters using an inverse of the Hessian of the negative log-likelihood function at the MLEs (the observed Fisher Information matrix). It appends $Hessian
, $parMean
, $parSigma
to the marssMLE
object.
Usage
MARSShessian(MLEobj, method=c("Harvey1989", "fdHess", "optim"))
Arguments
MLEobj |
An object of class |
method |
The method to use for computing the Hessian. Options are |
Details
See MARSSFisherI
for a discussion of the observed Fisher Information matrix and references.
Method fdHess
uses fdHess
from package nlme to numerically estimate the Hessian matrix (the matrix of partial 2nd derivatives of the negative log-likelihood function at the MLE). Method optim
uses optim
with hessian=TRUE
and list(maxit=0)
to ensure that the Hessian is computed at the values in the par
element of the MLE object. Method Harvey1989
(the default) uses the recursion in Harvey (1989) to compute the observed Fisher Information of a MARSS model analytically.
Note that the parameter confidence intervals computed with the observed Fisher Information matrix are based on the asymptotic normality of maximum-likelihood estimates under a large-sample approximation.
Value
MARSShessian()
attaches
Hessian
, parMean
and parSigma
to the marssMLE
object that is passed into the function.
Author(s)
Eli Holmes, NOAA, Seattle, USA.
References
Harvey, A. C. (1989) Section 3.4.5 (Information matrix) in Forecasting, structural time series models and the Kalman filter. Cambridge University Press, Cambridge, UK.
See also J. E. Cavanaugh and R. H. Shumway (1996) On computing the expected Fisher information matrix for state-space model parameters. Statistics & Probability Letters 26: 347-355. This paper discusses the Harvey (1989) recursion (and proposes an alternative).
See Also
MARSSFisherI()
, MARSSharveyobsFI()
, MARSShessian.numerical()
, MARSSparamCIs()
, marssMLE
Examples
dat <- t(harborSeal)
dat <- dat[c(2, 11), ]
MLEobj <- MARSS(dat)
MLEobj.hessian <- MARSShessian(MLEobj)
# show the approx Hessian
MLEobj.hessian$Hessian
# generate a parameter sample using the Hessian
# this uses the rmvnorm function in the mvtnorm package
hess.params <- mvtnorm::rmvnorm(1,
mean = MLEobj.hessian$parMean,
sigma = MLEobj.hessian$parSigma
)