View source: R/marginal_probabilities.R
| marginal_probabilities | R Documentation |
marginal_probabilities returns a vector with the marginal
probabilities of a categorical time series
marginal_probabilities(series)
series |
An object of type |
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.
A vector with the marginal probabilities.
Ángel López-Oriona, José A. Vilar
weiss2008measuringctsfeatures
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.