ordinal_dispersion_2 function

Computes the estimated dispersion of an ordinal time series according to the approach based on the diversity coefficient (DIVC)

Computes the estimated dispersion of an ordinal time series according to the approach based on the diversity coefficient (DIVC)

ordinal_dispersion_2 computes the estimated dispersion of an ordinal time series according to the approach based on the diversity coefficient UTF-8

ordinal_dispersion_2(series, states, distance = "Block", normalize = FALSE)

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.
  • normalize: Logical. If normalize = FALSE (default), the value of the estimated dispersion is returned. Otherwise, the function returns the normalized estimated dispersion.

Returns

The estimated dispersion according to the approach based on the diversity coefficient.

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 DIVC estimated dispersion given by disp^d=TT1i,j=0nd(si,sj)p^ip^j\widehat{disp}_{d}=\frac{T}{T-1}\sum_{i,j=0}^nd\big(s_i, s_j\big)\widehat{p}_i\widehat{p}_j, where d(,)d(\cdot, \cdot) is a distance between ordinal states and p^k\widehat{p}_k is the standard estimate of the marginal probability for state sks_k. If normalize = TRUE, and distance = "Block" or distance = "Euclidean", then the normalized versions are computed, that is, the corresponding estimates are divided by the factors 2/m2/m or 2/m22/m^2, respectively.

Examples

estimated_dispersion <- ordinal_dispersion_2(series = AustrianWages$data[[100]], states = 0 : 5) # Computing the DIVC dispersion estimate # 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