EstHMMGen: Estimation of univariate hidden Markov model

Description Usage Arguments Details Value Examples

View source: R/EstHMMGen.R

Description

This function estimates the parameters from a univariate hidden Markov model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
EstHMMGen(
  y,
  reg,
  family,
  start = 0,
  max_iter = 10000,
  eps = 0.001,
  graph = 0,
  size = 0,
  theta0 = 0
)

Arguments

y

observations; (n x 1)

reg

number of regimes

family

distribution name; run the function distributions() for help

start

starting parameters for the estimation; (1 x p)

max_iter

maximum number of iterations of the EM algorithm; suggestion 10000

eps

precision (stopping criteria); suggestion 0.001.

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

theta0

initial parameters for each regimes; (r x p)

Details

#############################################################################

Value

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

Examples

1
2
3
4
family = "gaussian"
Q = matrix(c(0.8, 0.3, 0.2, 0.7), 2, 2) ; theta = matrix(c(-1.5, 1.7, 1, 1),2,2) ;
sim = SimHMMGen(Q, family, theta, 10)$SimData ;
est = EstHMMGen(y=sim, reg=2, family=family)

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

Related to EstHMMGen in GenHMM1d...