ordinal_asymmetry {otsfeatures} | R Documentation |
Computes the estimated asymmetry of an ordinal time series
Description
ordinal_asymmetry
computes the estimated asymmetry
of an ordinal time series
Usage
ordinal_asymmetry(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
estimated asymmetry given by
,
where
,
with
being the standard estimate of the marginal probability for state
,
and
are the identity and counteridentity
matrices of order
, respectively, and
is a pairwise distance
matrix for the elements in the set
considering a specific distance
between ordinal states,
. If
normalize = TRUE
, then the normalized estimate is computed, namely
.
Value
The estimated asymmetry.
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_asymmetry <- ordinal_asymmetry(series = AustrianWages$data[[100]],
states = 0 : 5) # Computing the asymmetry estimate
# for one series in dataset AustrianWages using the block distance