Hessian of negative log-likelihood function
Hessian = ecmnhess(Data, Covariance, InvCovariance, MatrixFormat)
(Optional) Inverse of covariance matrix:
(Optional) Character vector that identifies parameters
included in the Hessian matrix. If
Hessian = ecmnhess(Data, Covariance, InvCovariance,
MatrixFormat) computes a
matrix of the observed negative log-likelihood function based on current
parameter estimates, where
NUMPARAMS = NUMSERIES*(NUMSERIES + 3)/2
MatrixFormat = 'full' and
NUMPARAMS = NUMSERIES
MatrixFormat = 'meanonly'.
This routine is slow for
NUMSERIES > 10 or
The data matrix has
NaNs for missing observations.
The multivariate normal model has
NUMPARAMS = NUMSERIES + NUMSERIES*(NUMSERIES + 1)/2
distinct parameters. Therefore, the full Hessian is a
NUMSERIES parameters are estimates
for the mean of the data in
Mean and the remaining
+ 1)/2 parameters are estimates for the lower-triangular
portion of the covariance of the data in
in row-major order.
MatrixFormat = 'meanonly', the number
of parameters is reduced to
NUMPARAMS = NUMSERIES,
where the Hessian is computed for the mean parameters only. In this
format, the routine executes fastest.
This routine expects the inverse of the covariance matrix as an input. If you do not pass in the inverse, the routine computes it.
Stderr = (1.0/sqrt(NumSamples)) .* sqrt(diag(inv(Hessian)));
provides an approximation for the observed standard errors of estimation of the parameters.
Because of the additional uncertainties introduced by missing
information, these standard errors can be larger than the estimated
standard errors derived from the Fisher information matrix. To see
the difference, compare to standard errors calculated from