c_conditional_probabilities: Computes the cumulative conditional probabilities of an...

View source: R/c_conditional_probabilities.R

c_conditional_probabilitiesR Documentation

Computes the cumulative conditional probabilities of an ordinal time series

Description

c_conditional_probabilities returns a matrix with the cumulative conditional probabilities of an ordinal time series

Usage

c_conditional_probabilities(series, lag = 1, states)

Arguments

series

An OTS.

lag

The considered lag (default is 1).

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 matrix \widehat{\boldsymbol F}^c(l) = \big(\widehat{f}^c_{i-1j-1}(l)\big)_{1 ≤ i, j ≤ n}, with \widehat{f}^c_{ij}(l)=\frac{TN_{ij}(l)}{(T-l)N_i}, where N_i is the number of elements less one or equal to s_i in the realization \overline{X}_t and N_{ij}(l) is the number of pairs (\overline{X}_t, \overline{X}_{t-l}) in the realization \overline{X}_t such that \overline{X}_t ≤ s_i and \overline{X}_{t-l} ≤ s_j.

Value

A matrix with the conditional probabilities.

Author(s)

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

References

\insertRef

weiss2019distanceotsfeatures

Examples

matrix_ccp <- c_conditional_probabilities(series = AustrianWages$data[[100]],
states = 0 : 5) # Computing the matrix of
# cumulative conditional probabilities for one series in dataset AustrianWages

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