HMMextra0s-package: Hidden Markov Models with Extra Zeros Hidden Markov Models...

Description Details Author(s) References

Description

The DESCRIPTION file: This package was not yet installed at build time.
Index: This package was not yet installed at build time.
This package contains functions to estimate the parameters of the HMMs with extra zeros using hmm0norm (1-D HMM) and hmm0norm2d (2-D HMM), to calculate the cumulative distribution of the 1-D HMM using cumdist.hmm0norm, to estimate the Viterbi path using Viterbi.hmm0norm (1-D HMM) and Viterbi.hmm0norm2d (2-D HMM), to simulate this class of models using sim.hmm0norm (1-D HMM) and sim.hmm0norm2d (2-D HMM), to plot the classified 2-D data with different colours representing different hidden states using plotVitloc2d, and to plot the Viterbi path using plotVitloc2d.

Details

This package is used to estimate the parameters, carry out simulations, and estimate the Viterbi path for 1-D and 2-D HMMs with extra zeros as defined in the two publications in the reference (also briefly defined below). It contains examples using simulated data for how to set up initial values for a data analysis and how to plot the results.

An HMM is a statistical model in which the observed process is dependent on an unobserved Markov chain. A Markov chain is a sequence of states which exhibits a short-memory property such that the current state of the chain is dependent only on the previous state in the case of a first-order Markov chain. Assume that the Markov chain has m states, where m can be estimated from the data. Let S_t in {1,...,m} denote the state of the Markov chain at time t. The probability of a first-order Markov chain in state j at time t given the previous states is P(S_t=j|S_{t-1},...,S_1)=P(S_t=j|S_{t-1}). These states are not observable. The observation Y_t at time t depends on the state S_t of the Markov chain.

In this framework, we are interested in estimating the transition probability matrix Gamma=(gamma_{ij}) of the Markov chain that describes the migration pattern and the density function f(y_t|S_t=i) that gives the distribution feature of observations in state i, where gamma_{ij}=P(S_t=j|S_{t-1}=i).

Let Z_t be a Bernoulli variable, with Z_t=1 if an event is present at t, and Z_t=0, otherwise. Let X_t be the response variable (e.g., location of the tremor cluster in 2D space) at time t. We set P(Z_t=0|S_t=i)=1-p_i and P(Z_t=1|S_t=i)=p_i. We assume that, given Z_t=1 and S_t=i, X_t follows a univariate or bivariate normal distribution, e.g. for a bivariate normal,

f(x_t | Z_t=1,S_t=i)=1/(2 pi|Sigma_i|^(1/2)) exp[-(x_t-mu_i)^T Sigma_i^(-1)(x_t-mu_i)/2].

The joint probability density function of Z_t and X_t conditional on the system being in state i at time t is

f(x_t,z_t=1|S_t=i)=(1-p_i)^(1-z_t)[p_i/(2 pi|Sigma_i|^(1/2)) exp[-(x_t-mu_i)^T Sigma_i^(-1)(x_t-mu_i)/2]]^(z_t).

where p_i, mu_i=E(X_t|S_t=i,Z_t=1) and Sigma_i=Var(X_t|S_t=i,Z_t=1) are parameters to be estimated.

Author(s)

Ting Wang, Wolfgang Hayek, and Alexander Pletzer

Maintainer: Ting Wang <ting.wang@otago.ac.nz>

References

Wang, T., Zhuang, J., Obara, K. and Tsuruoka, H. (2016) Hidden Markov Modeling of Sparse Time Series from Non-volcanic Tremor Observations. Journal of the Royal Statistical Society, Series C, Applied Statistics, 66, Part 4, 691-715.

Wang, T., Zhuang, J., Buckby, J., Obara, K. and Tsuruoka, H. (2018) Identifying the recurrence patterns of non-volcanic tremors using a 2D hidden Markov model with extra zeros. Journal of Geophysical Research, doi: 10.1029/2017JB015360.

Some of the functions in the package are based on those of the R package “HiddenMarkov":

Harte, D. (2021) HiddenMarkov: Hidden Markov Models. R package version 1.8-13. URL: https://cran.r-project.org/package=HiddenMarkov


HMMextra0s documentation built on Aug. 3, 2021, 9:06 a.m.