View source: R/get.processes.R
| get.processes | R Documentation |
Computes, for a list of sequences, the processes of the Markov renewal representation of a semi-Markov chain (successively visited states, jump times, sojourn times, backward recurrence times) and the counting processes used by the estimators of fitsmm.
get.processes(sequences)
sequences |
A list of vectors (of characters or numbers) representing the observed sequences of states. |
Notation (see smmR-package for the complete description of the
models): (Z_k)_{k \in \mathbb{N}} is the observed
semi-Markov chain, (J_n)_{n \in \mathbb{N}} the visited
states, (X_n)_{n \in \mathbb{N}^*} the sojourn times
and (U_k)_{k \in \mathbb{N}} the backward recurrence
times.
For each sequence Z_1, \dots, Z_n (time is
counted from 1 to n, as the indices of the R vector):
Jm gives the successively visited states J_0, J_1, \dots
(embedded Markov chain (J_n)_{n \in \mathbb{N}});
Xm gives the corresponding sojourn times X_1, X_2, \dots
((X_n)_{n \in \mathbb{N}^*}); the last one is
censored by the end of the sequence;
Tm gives the times when a new state is entered, from the second
visited state on, followed by n + 1;
Um gives the backward recurrence times
(U_k)_{k \in \mathbb{N}}, i.e. the number of time
units already spent in the current state (0 at each jump; Barbu and
Limnios, 2008, Equation (6.5), p. 137).
The states are taken in their order of first appearance in sequences
(unique(unlist(sequences))), not in alphabetical order.
A list with the following components:
s |
Number of distinct observed states; |
states |
Vector of the observed states, in their order of first
appearance (length |
M |
Total length (sum of the length of each sequence); |
L |
Number of sequences; |
kmax |
Length of the longest sojourn (censored sojourns included); |
Ym |
The list |
Jm |
List of the successively visited states of each sequence; |
Tm |
List of the jump times of each sequence (see Details); |
Xm |
List of the sojourn times of each sequence; |
Um |
List of the backward recurrence times of each sequence; |
counting |
List of counting processes, with the states coded by
their index in |
V. S. Barbu, N. Limnios. (2008). Semi-Markov Chains and Hidden Semi-Markov Models Toward Applications - Their Use in Reliability and DNA Analysis. New York: Lecture Notes in Statistics, vol. 191, Springer.
get.Niuj, fitsmm
seqs <- list(c("c", "c", "a", "a", "a", "g"), c("a", "g", "g"))
p <- get.processes(seqs)
p$states # "c" "a" "g"
p$Jm[[1]] # "c" "a" "g"
p$Xm[[1]] # 2 3 1
p$Tm[[1]] # 3 6 7
p$Um[[1]] # 0 1 0 1 2 0
p$counting$Nij
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.