cumdist.hmm0norm: Cumulative distribution of an HMM with Extra Zeros

Description Usage Arguments Value Author(s) References Examples

View source: R/cumdist.hmm0norm.R

Description

Calculates the cumulative distribution of an HMM with extra zeros.

Usage

1
cumdist.hmm0norm(x,HMMest)

Arguments

x

x is a value at which the cumulative distribution is evaluated.

HMMest

is a list which contains pie, gamma, sig, mu, and delta (the HMM parameter estimates).

Value

prob

is the calculated cumulative distribution.

Author(s)

Ting Wang

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
pie <- c(0.002,0.2,0.4)
gamma <- matrix(c(0.99,0.007,0.003,
                  0.02,0.97,0.01,
                  0.04,0.01,0.95),byrow=TRUE, nrow=3)
mu <- matrix(c(0.3,0.7,0.2),nrow=1)
sig <- matrix(c(0.2,0.1,0.1),nrow=1)
delta <- c(1,0,0)
y <- sim.hmm0norm(mu,sig,pie,gamma,delta, nsim=5000)
R <- as.matrix(y$x,ncol=1)
Z <- y$z
HMMEST <- hmm0norm(R, Z, pie, gamma, mu, sig, delta)
xx <- seq(0,1,0.05)
cumdist <- apply(t(xx),2,cumdist.hmm0norm,HMMest=HMMEST)

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