Learn R Programming

otsfeatures (version 1.0.0)

binarization: Constructs the binarized time series associated with a given ordinal time series

Description

binarization constructs the binarized time series associated with a given ordinal time series.

Usage

binarization(series, states)

Value

The binarized time series.

Arguments

series

An OTS (numerical vector with integers).

states

A numeric 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 constructs the binarized time series, which is defined as \(\overline{\boldsymbol Y}_t=\{\overline{\boldsymbol Y}_1, \ldots, \overline{\boldsymbol Y}_T\}\), with \(\overline{\boldsymbol Y}_k=(\overline{Y}_{k,0}, \overline{Y}_{k,1},\ldots, \overline{Y}_{k,n})^\top\) such that \(\overline{Y}_{k,i}=1\) if \(\overline{X}_k=s_i\) (\(k=1,\ldots,T, , i=0,\ldots,n\)). The binarized series is constructed in the form of a matrix whose rows represent time observations and whose columns represent the states in the original series.

References

weiss2018introductionotsfeatures lopez2023hardotsfeatures

Examples

Run this code
binarized_series <- binarization(AustrianWages$data[[100]],
states = 0 : 5) # Constructing the binarized
# time series for one OTS in dataset AustrianWages

Run the code above in your browser using DataLab