Computes the estimated ordinal Cohen's kappa of an ordinal time series
Computes the estimated ordinal Cohen's kappa of an ordinal time series
ordinal_cohens_kappa computes the estimated ordinal Cohen's kappa of an ordinal time series
UTF-8
ordinal_cohens_kappa(series, states, distance ="Block", lag =1)
Arguments
series: An OTS.
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.
lag: The considered lag.
Returns
The estimated ordinal Cohen's kappa.
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 ordinal Cohen's kappa given by κd(l)=dispd(Xt)dispd(Xt)−E[d(Xt,Xt−l)], where dispd(Xt)=T−1T∑i,j=0nd(si,sj)pipj is the DIVC estimate of the dispersion, with d(⋅,⋅) being a distance between ordinal states and pk being the standard estimate of the marginal probability for state sk, and E[d(Xt,Xt−l)]=T−l1∑t=l+1Td(Xt,Xt−l).
Examples
estimated_ock <- ordinal_cohens_kappa(series = AustrianWages$data[[100]],states =0:5)# Computing the estimated ordinal Cohen's kappa# for one series in dataset AustrianWages using the block distance