marginal_probabilities {ctsfeatures} | R Documentation |
Computes the marginal probabilities of a categorical time series
Description
marginal_probabilities
returns a vector with the marginal
probabilities of a categorical time series
Usage
marginal_probabilities(series)
Arguments
series |
An object of type |
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
vector \widehat{\boldsymbol p} =(\widehat{p}_1, \ldots, \widehat{p}_r)
,
with \widehat{p}_i=\frac{N_i}{T}
, where N_i
is the number
of elements equal to i
in the realization \overline{X}_t
.
Value
A vector with the marginal 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),]
vector_mp <- marginal_probabilities(series = sequence_1) # Computing the vector of
# marginal probabilities for the first series in dataset GeneticSequences