GofHMMGen: Goodness-of-fit of univariate hidden Markov model

Description Usage Arguments Value

View source: R/GofHMMGen.R

Description

This function performs goodness-of-fit test of an univariate hidden Markov model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
GofHMMGen(
  y,
  reg,
  family,
  start = 0,
  max_iter = 10000,
  eps = 0.001,
  graph = 0,
  size = 0,
  n_sample = 100,
  n_cores = 1,
  useFest = 1
)

Arguments

y

observations

reg

number of regimes

family

distribution name; run the function distributions() for help

start

starting parameter for the estimation

max_iter

maximum number of iterations of the EM algorithm; suggestion 10000

eps

precision (stopping criteria); suggestion 0.0001.

graph

1 for a graph, 0 otherwise (default); only for continuous distributions

size

additional parameter for some discrete distributions; run the command distributions() for help

n_sample

number of bootstrap samples; suggestion 1000

n_cores

number of cores to use in the parallel computing

useFest

1 (default) to use the first estimated parameters as starting value for the bootstrap, 0 otherwise

Value

pvalue

pvalue of the Cramer-von Mises statistic in percent

theta

Estimated parameters; (r x p)

Q

estimated transition matrix; ; (r x r)

eta

(conditional probabilities of being in regime k at time t given observations up to time t; (n x r)

lambda

conditional probabilities of being in regime k at time t given all observations; (n x r)

U

matrix of Rosenblatt transforms; (n x r)

cvm

Cramer-von-Mises statistic for goodness-of-fit

W

pseudo-observations that should be uniformly distributed under the null hypothesis

LL

log-likelihood

nu

stationary distribution

AIC

Akaike information criterion

BIC

bayesian information criterion

CAIC

consistent Akaike information criterion

AICcorrected

Akaike information criterion corrected

HQC

Hannan-Quinn information criterion

stats

Empirical means and standard deviation of each regimes using lambda

pred_l

Estimated regime using lambda

pred_e

Estimated regime using eta

runs_l

Estimated number of runs using lambda

runs_e

Estimated number of runs using eta


GenHMM1d documentation built on Jan. 21, 2021, 9:07 a.m.

Related to GofHMMGen in GenHMM1d...