Computes the total mixed cumulative quantile correlation (TMCQC) between an ordinal and a real-valued time series
Computes the total mixed cumulative quantile correlation (TMCQC) between an ordinal and a real-valued time series
total_mixed_c_correlation_2 returns the TMCQC between an ordinal and a real-valued time series
UTF-8
total_mixed_c_correlation_2( o_series, n_series, lag =1, states, features =FALSE)
Arguments
o_series: An OTS.
n_series: A real-valued time series.
lag: The considered lag (default is 1).
states: A numerical vector containing the corresponding states.
features: Logical. If features = FALSE (default), the value of the TMCLC is returned. Otherwise, the function returns a vector with the individual components of the TMCQC.
Returns
If features = FALSE (default), returns the value of the TMCQC. Otherwise, the function returns a vector of features, i.e., the vector contains the features employed to compute the TMCLC.
Details
Given a OTS of length T with range S={s0,s1,…,sn}, Xt={X1,…,XT}, and the cumulative binarized time series, which is defined as Yt={Y1,…,YT}, with Yk=(Yk,0,…,Yk,n−1)⊤
such that Yk,i=1 if Xk≤si (c("k=1,ldots,T\n", ",i=0,ldots,n−1")), the function computes the estimated TMCQC given by
Ψ2m(l)=n1i=0∑n−1∫01ψiρ(l)2dρ,
where ψiρ(l)=Corr(Yt,i,I(Zt−l≤qZt(ρ))), with Zt={Z1,…,ZT} being a T-length real-valued time series, ρ∈(0,1) a probability level, I(⋅) the indicator function and qZt the quantile function of the corresponding real-valued process. If features = TRUE, the function returns a vector whose components are the quantities ∫01ψiρ(l)2dρ, i=0,1,…,n−1.
Examples
tmclc <- total_mixed_c_correlation_2(o_series = SyntheticData1$data[[1]],n_series = rnorm(600), states =0:5)# Computing the TMCQC# between the first series in dataset SyntheticData1 and white noisefeature_vector <- total_mixed_c_correlation_2(o_series = SyntheticData1$data[[1]],n_series = rnorm(600), states =0:5, features =TRUE)# Computing the corresponding# vector of features