# squantCI

##### Simulation-quantile based confidence intervals.

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”).

- Keywords
- utility

##### Usage

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

##### Arguments

- object
An object of class

`hmm.discnp`

as returned by`hmm()`

.- 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\).- 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. The confidence intervals calculated are for the
“raw” parameters (entries of `tpm`

with the
last column dropped --- since the rows sum to 1, and the
entries of `Rho`

with the last row dropped --- since
the columns sum to 1.

##### Value

A 2-by-`npar`

matrix (where `npar`

is the number of
“independent” parameters in the model) whose columns
form the estimated confidence intervals. The column labels
indicate the parameters to which each column pertains, in a
reasonably perspicuous manner. The row 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.

##### 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)
# }
```

*Documentation reproduced from package hmm.discnp, version 2.1-5, License: GPL (>= 2)*