ordinal_dispersion_1 function

Computes the standard estimated dispersion of an ordinal time series

Computes the standard estimated dispersion of an ordinal time series

ordinal_dispersion_1 computes the standard estimated dispersion of an ordinal time series UTF-8

ordinal_dispersion_1(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 standard estimated dispersion is returned. Otherwise, the function returns the normalized standard estimated dispersion.

Returns

The standard estimated dispersion.

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 standard estimated dispersion given by disp^loc,d=1Tt=1Td(Xt,x^loc,d)\widehat{disp}_{loc, d}=\frac{1}{T}\sum_{t=1}^Td\big(\overline{X}_t, \widehat{x}_{loc, d}\big), where x^loc,d\widehat{x}_{loc, d} is the standard estimate of the location and d(,)d(\cdot, \cdot) is a distance between ordinal states. If normalize = TRUE, then the normalized dispersion is computed, namely disp^loc,d/\widehat{disp}_{loc, d}/maxsi,sjSd(si,sj)_{s_i, s_j \in \mathcal{S}}d(s_i, s_j).

Examples

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