states: A numerical vector containing the corresponding states.
distance: A function defining the underlying distance between states. The Hamming, block and Euclidean distances are already implemented by means of the arguments "Hamming", "Block" (default) and "Euclidean". Otherwise, a function taking as input two states must be provided.
normalize: Logical. If normalize = FALSE (default), the value of the estimated asymmetry is returned. Otherwise, the function returns the normalized estimated asymmetry.
Returns
The estimated asymmetry.
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 estimated asymmetry given by asymd=p⊤(J−I)Dp, where p=(p0,p1,…,pn)⊤, with pk being the standard estimate of the marginal probability for state sk, I and J are the identity and counteridentity matrices of order n+1, respectively, and D is a pairwise distance matrix for the elements in the set S considering a specific distance between ordinal states, d(⋅,⋅). If normalize = TRUE, then the normalized estimate is computed, namely maxsi,sj∈Sd(si,sj)asymd.
Examples
estimated_asymmetry <- ordinal_asymmetry(series = AustrianWages$data[[100]],states =0:5)# Computing the asymmetry estimate# for one series in dataset AustrianWages using the block distance