hmm.discnp (version 3.0-9)

scovmat: Simulation based covariance matrix.

Description

Produces an estimate of the covariance matrix of the parameter estimates in a model fitted by hmm.discnp. Uses a method based on simulation (or “parametric bootstrapping”).

Usage

scovmat(object, expForm=TRUE, seed = NULL, nsim=100, verbose = TRUE)

Value

A (positive definite) matrix which is an estimate of the covariance of the parameter estimates from the fitted model specified by object. It has row and column labels which indicate the parameters to which its entries pertain, in a reasonably perspicuous manner.

This matrix has an attribute seed (the random number generation seed that was used) so that the calculations can be reproduced.

Arguments

object

An object of class hmm.discnp as returned by hmm().

expForm

Logical scalar. Should the covariance matrix produced be that of the estimates of the parameters expressed in “exponential” (or “smooth” or “logistic”) form? If expForm=FALSE then the parameter estimates considered are “raw” probabilities, with redundancies (last column of tpm; last row of Rho) removed.

seed

Integer scalar serving as a seed for the random number generator. If left NULL the seed itself is chosen randomly from the set of integers between 1 and \(10^5\).

nsim

A positive integer. The number of simulations upon which the covariance matrix estimate will be based.

verbose

Logical scalar; if TRUE, iteration counts will be printed out during each of the simulation and model-fitting stages.

Author

Rolf Turner r.turner@auckland.ac.nz

Details

This function is currently applicable only to models fitted to univariate data. If there are predictors in the model, then only the exponential form of the parameters may be used, i.e. expForm must be TRUE.

See Also

squantCI() link{rhmm}() link{hmm)}()

Examples

Run this code
if (FALSE) {
y   <- list(lindLandFlows$deciles,ftLiardFlows$deciles)
fit <- hmm(y,K=3)
ccc <- scovmat(fit,nsim=100)
}

Run the code above in your browser using DataLab