marginal_probabilities: Computes the marginal probabilities of an ordinal time series

View source: R/marginal_probabilities.R

marginal_probabilitiesR Documentation

Computes the marginal probabilities of an ordinal time series

Description

marginal_probabilities returns a vector with the marginal probabilities of an ordinal time series

Usage

marginal_probabilities(series, states)

Arguments

series

An OTS (numerical vector with integers).

states

A numerical vector containing the corresponding states

Details

Given an OTS of length T with range \mathcal{S}=\{s_0, s_1, s_2, …, s_n\} (s_0 < s_1 < s_2 < … < s_n), \overline{X}_t=\{\overline{X}_1,…, \overline{X}_T\}, the function computes the vector \widehat{\boldsymbol p} =(\widehat{p}_0, …, \widehat{p}_n), with \widehat{p}_i=\frac{N_i}{T}, where N_i is the number of elements equal to s_i in the realization \overline{X}_t.

Value

A vector with the marginal probabilities.

Author(s)

Ángel López-Oriona, José A. Vilar

References

\insertRef

weiss2019distanceotsfeatures

Examples

vector_mp <- marginal_probabilities(series = AustrianWages$data[[100]],
states = 0 : 5) # Computing the vector of
# marginal probabilities for one series in dataset AustrianWages

otsfeatures documentation built on March 7, 2023, 7:38 p.m.