Computes the cumulative conditional probabilities of an ordinal time series
Computes the cumulative conditional probabilities of an ordinal time series
c_conditional_probabilities returns a matrix with the cumulative conditional probabilities of an ordinal time series
UTF-8
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.
Returns
A matrix with the conditional probabilities.
Details
Given an OTS of length T with range S={s0,s1,s2,…,sn} (s0<s1<s2<…<sn), Xt={X1,…,XT}, the function computes the matrix Fc(l)=(fi−1j−1c(l))1≤i,j≤n, with fijc(l)=(T−l)NiTNij(l), where Ni is the number of elements less one or equal to si in the realization Xt and Nij(l) is the number of pairs (Xt,Xt−l) in the realization Xt
such that Xt≤si and Xt−l≤sj.
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