msmbuilder.msm._ratematrix.hessian

msmbuilder.msm._ratematrix.hessian(theta, counts, n, inds=None, t=1)

Estimate of the hessian of the log-likelihood with respect to theta.

Parameters:

theta : array of shape = (n*(n-1)/2 + n) for dense or shorter

The free parameters of the model. These values are the (possibly sparse) linearized elements of the log of the upper triangular portion of the symmetric rate matrix, S, followed by the log of the equilibrium distribution.

counts : array of shape = (n, n)

The matrix of observed transition counts.

n : int

The size of counts

t : double

The lag time.

inds : array, optional (default=None)

Sparse linearized triu indices theta. If not supplied, theta is assumed to be a dense parameterization of the upper triangular portion of the symmetric rate matrix followed by the log equilibrium weights, and must be of length n*(n-1)/2 + n. If inds is supplied, it is a set of indices, with len(inds) == len(theta), 0 <= inds < n*(n-1)/2+n, giving the indices of the nonzero elements of the upper triangular elements of the rate matrix to which theta correspond.

Returns:

m : array, shape=(len(theta), len(theta))

An estimate of the hessian of the log-likelihood

Notes

This computation follows equation 3.6 of [1].

References

[R38]Kalbfleisch, J. D., and Jerald F. Lawless. “The analysis of panel data under a Markov assumption.” J. Am. Stat. Assoc. 80.392 (1985): 863-871.
Versions