ordinal_dispersion_2 {otsfeatures} | R Documentation |
Computes the estimated dispersion of an ordinal time series according to the approach based on the diversity coefficient (DIVC)
Description
ordinal_dispersion_2
computes the estimated dispersion
of an ordinal time series according to the approach based on the
diversity coefficient
Usage
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 |
Details
Given an OTS of length with range
(
),
, the function computes the DIVC
estimated dispersion given by
,
where
is a distance between ordinal states and
is the
standard estimate of the marginal probability for state
.
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 or
, respectively.
Value
The estimated dispersion according to the approach based on the diversity coefficient.
Author(s)
Ángel López-Oriona, José A. Vilar
References
Weiß CH (2019). “Distance-based analysis of ordinal data and ordinal time series.” Journal of the American Statistical Association.
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