joint_probabilities {ctsfeatures} | R Documentation |
Computes the joint probabilities of a categorical time series
Description
joint_probabilities
returns a matrix with the joint
probabilities of a categorical time series
Usage
joint_probabilities(series, lag = 1)
Arguments
series |
An object of type |
lag |
The considered lag (default is 1). |
Details
Given a CTS of length T
with range \mathcal{V}=\{1, 2, \ldots, r\}
,
\overline{X}_t=\{\overline{X}_1,\ldots, \overline{X}_T\}
, the function computes the
matrix \widehat{\boldsymbol P}(l) = \big(\widehat{p}_{ij}(l)\big)_{1 \le i, j \le r}
,
with \widehat{p}_{ij}(l)=\frac{N_{ij}(l)}{T-l}
, where N_{ij}(l)
is the number
of pairs (\overline{X}_t, \overline{X}_{t-l})=(i,j)
in the realization \overline{X}_t
.
Value
A matrix with the joint probabilities.
Author(s)
Ángel López-Oriona, José A. Vilar
References
Weiß CH, Göb R (2008). “Measuring serial dependence in categorical time series.” AStA Advances in Statistical Analysis, 92, 71–89.
Examples
sequence_1 <- GeneticSequences[which(GeneticSequences$Series==1),]
matrix_jp <- joint_probabilities(series = sequence_1) # Computing the matrix of
# joint probabilities for the first series in dataset GeneticSequences