Learn R Programming

otsfeatures (version 1.0.0)

joint_probabilities: Computes the joint probabilities of an ordinal time series

Description

joint_probabilities returns a matrix with the joint probabilities of an ordinal time series

Usage

joint_probabilities(series, lag = 1, states)

Value

A matrix with the joint probabilities.

Arguments

series

An OTS.

lag

The considered lag (default is 1).

states

A numerical vector containing the corresponding states.

Author

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

Details

Given an OTS of length \(T\) with range \(\mathcal{S}=\{s_0, s_1, s_2, \ldots, s_n\}\) (\(s_0 < s_1 < s_2 < \ldots < s_n\)), \(\overline{X}_t=\{\overline{X}_1,\ldots, \overline{X}_T\}\), the function computes the matrix \(\widehat{\boldsymbol P}(l) = \big(\widehat{p}_{i-1j-1}(l)\big)_{1 \le i, j \le n+1}\), with \(\widehat{p}_{ij}(l)=\frac{N_{ij}(l)}{T-l}\), where \(N_{ij}(l)\) is the number of pairs \((\overline{X}_t, \overline{X}_{t-l})=(s_i,s_j)\) in the realization \(\overline{X}_t\).

References

weiss2019distanceotsfeatures

Examples

Run this code
matrix_jp <- joint_probabilities(series = AustrianWages$data[[100]],
states = 0 : 5) # Computing the matrix of
# joint probabilities for one series in dataset AustrianWages

Run the code above in your browser using DataLab