Constructs the binarized time series associated with a given ordinal time series
Constructs the binarized time series associated with a given ordinal time series
binarization constructs the binarized time series associated with a given ordinal time series.
UTF-8
binarization(series, states)
Arguments
series: An OTS (numerical vector with integers).
states: A numeric vector containing the corresponding states.
Returns
The binarized time series.
Details
Given an OTS of length T with range S={s0,s1,s2,…,sn} (s0<s1<s2<…<sn), Xt={X1,…,XT}, the function constructs the binarized time series, which is defined as Yt={Y1,…,YT}, with Yk=(Yk,0,Yk,1,…,Yk,n)⊤
such that Yk,i=1 if Xk=si (c("k=1,ldots,T,\n", ",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.
Examples
binarized_series <- binarization(AustrianWages$data[[100]],states =0:5)# Constructing the binarized# time series for one OTS in dataset AustrianWages