ordinal_cohens_kappa function

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 TT with range S={s0,s1,s2,,sn}\mathcal{S}=\{s_0, s_1, s_2, \ldots, s_n\} (s0<s1<s2<<sns_0 < s_1 < s_2 < \ldots < s_n), Xt={X1,,XT}\overline{X}_t=\{\overline{X}_1,\ldots, \overline{X}_T\}, the function computes the estimated ordinal Cohen's kappa given by κ^d(l)=disp^d(Xt)E^[d(Xt,Xtl)]disp^d(Xt)\widehat{\kappa}_d(l)=\frac{\widehat{disp}_d(X_t)-\widehat{E}[d(X_t, X_{t-l})]}{{\widehat{disp}}_d(X_t)}, where disp^d(Xt)=TT1i,j=0nd(si,sj)p^ip^j\widehat{disp}_{d}(X_t)=\frac{T}{T-1}\sum_{i,j=0}^nd\big(s_i, s_j\big)\widehat{p}_i\widehat{p}_j is the DIVC estimate of the dispersion, with d(,)d(\cdot, \cdot) being a distance between ordinal states and p^k\widehat{p}_k being the standard estimate of the marginal probability for state sks_k, and E^[d(Xt,Xtl)]=1Tlt=l+1Td(Xt,Xtl)\widehat{E}[d(X_t, X_{t-l})]=\frac{1}{T-l} \sum_{t=l+1}^T d(\overline{X}_t, \overline{X}_{t-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

References

Rdpack::insert_ref(key="weiss2019distance",package="otsfeatures")

Author(s)

Ángel López-Oriona, José A. Vilar

  • Maintainer: Angel Lopez-Oriona
  • License: GPL-2
  • Last published: 2023-03-01

Useful links