c_conditional_probabilities {otsfeatures}R 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 TT with range S={s0,s1,s2,,sn}\mathcal{S}=\{s_0, s_1, s_2, \ldots, s_n\} (s0<s1<s2<<sns_0 < s_1 < s_2 < \ldots < s_n), Xt={X1,,XT}\overline{X}_t=\{\overline{X}_1,\ldots, \overline{X}_T\}, the function computes the matrix F^c(l)=(f^i1j1c(l))1i,jn\widehat{\boldsymbol F}^c(l) = \big(\widehat{f}^c_{i-1j-1}(l)\big)_{1 \le i, j \le n}, with f^ijc(l)=TNij(l)(Tl)Ni\widehat{f}^c_{ij}(l)=\frac{TN_{ij}(l)}{(T-l)N_i}, where NiN_i is the number of elements less one or equal to sis_i in the realization Xt\overline{X}_t and Nij(l)N_{ij}(l) is the number of pairs (Xt,Xtl)(\overline{X}_t, \overline{X}_{t-l}) in the realization Xt\overline{X}_t such that Xtsi\overline{X}_t \le s_i and Xtlsj\overline{X}_{t-l} \le s_j.

Value

A matrix with the conditional probabilities.

Author(s)

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

References

Weiß CH (2019). “Distance-based analysis of ordinal data and ordinal time series.” Journal of the American Statistical Association.

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

[Package otsfeatures version 1.0.0 Index]