Description Usage Arguments Details Value References Examples
Creates a Markov modulated Poisson process model object with class "mmpp"
.
1 |
tau |
vector containing the event times. Note that the first event is at time zero. Alternatively, |
Q |
the infinitesimal generator matrix of the Markov process. |
delta |
is the marginal probability distribution of the m hidden states at time zero. |
lambda |
a vector containing the Poisson rates. |
nonstat |
is logical, |
The Markov modulated Poisson process is based on a hidden Markov process in continuous time. The initial state probabilities (at time zero) are specified by delta
and the transition rates by the Q
matrix. The rate parameter of the Poisson process (lambda
) is determined by the current state of the hidden Markov process. Within each state, the Poisson process is homogeneous (constant rate parameter). A Poisson event is assumed to occur at time zero and at the end of the observation period, however, state transitions of the Markov process do not necessarily coincide with Poisson events. For more details, see Ryden (1996).
A list
object with class "mmpp"
, containing the above arguments as named components.
Cited references are listed on the HiddenMarkov manual page.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Q <- matrix(c(-2, 2,
1, -1),
byrow=TRUE, nrow=2)/10
# NULL indicates that we have no data at this point
x <- mmpp(NULL, Q, delta=c(0, 1), lambda=c(5, 1))
x <- simulate(x, nsim=5000, seed=5)
y <- BaumWelch(x)
print(summary(y))
# log-likelihood using initial parameter values
print(logLik(x))
# log-likelihood using estimated parameter values
print(logLik(y))
|
iter = 1
LL = 361.0557716
diff = Inf
iter = 2
LL = 362.5886854
diff = 1.532914
iter = 3
LL = 362.8406330
diff = 0.2519476
iter = 4
LL = 362.9252205
diff = 0.08458748
iter = 5
LL = 362.9543815
diff = 0.02916102
iter = 6
LL = 362.9645022
diff = 0.01012071
iter = 7
LL = 362.9680245
diff = 0.003522296
iter = 8
LL = 362.9692518
diff = 0.001227252
iter = 9
LL = 362.9696795
diff = 0.0004277787
iter = 10
LL = 362.9698287
diff = 0.0001491253
iter = 11
LL = 362.9698806
diff = 5.198553e-05
iter = 12
LL = 362.9698988
diff = 1.812167e-05
iter = 13
LL = 362.9699051
diff = 6.316798e-06
$delta
[1] 0 1
$Q
[,1] [,2]
[1,] -0.17402168 0.17402168
[2,] 0.09433875 -0.09433875
$nonstat
[1] TRUE
$lambda
[1] 5.031719 1.054213
$n
[1] 5001
[1] 361.0558
[1] 362.9699
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.