squantCI: Simulation-quantile based confidence intervals.

View source: R/squantCI.R

squantCIR Documentation

Simulation-quantile based confidence intervals.

Description

Calculates estimates of confidence intervals for the parameters of a model fitted by hmm.discnp. Uses a method based quantiles of estimates produced by simulation (or “parametric bootstrapping”).

Usage

squantCI(object, expForm = TRUE, seed = NULL, alpha = 0.05,
         nsim=100, verbose = TRUE)

Arguments

object

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

expForm

Logical scalar. Should the confidence intervals produced be for the parameters expressed in “exponential” (or “smooth” or “logistic”) form? If expForm=FALSE then the parameters 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 1e5.

alpha

Positive real number strictly between 0 and 1. A set of 100*(1-alpha)% confidence intervals will be produced.

nsim

A positive integer. The number of simulations upon which the confidence interval estimates will be based.

verbose

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

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.

Value

A npar-by-2 matrix (where npar is the number of “independent” parameters in the model) whose rows form the estimated confidence intervals. (The first entry of each row is the lower bound of a confidence interval for the corresponding parameter, and the second entry is the upper bound. The row labels indicate the parameters to which each row pertains, in a reasonably perspicuous manner. The column labels indicate the relevant quantiles in percentages.

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

Author(s)

Rolf Turner r.turner@auckland.ac.nz

See Also

scovmat() link{rhmm}() link{hmm)}()

Examples

## Not run: 
y   <- list(lindLandFlows$deciles,ftLiardFlows$deciles)
fit <- hmm(y,K=3)
CIs <- squantCI(fit,nsim=100)

## End(Not run)

hmm.discnp documentation built on Sept. 26, 2022, 5:05 p.m.