View source: R/ordinal_location_2.R
ordinal_location_2 | R Documentation |
ordinal_location_2
computes the estimated location
of an ordinal time series with respect to the lowest category
ordinal_location_2(series, states, distance = "Block", normalize = FALSE)
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 |
Given an OTS of length T with range \mathcal{S}=\{s_0, s_1, s_2, …, s_n\} (s_0 < s_1 < s_2 < … < s_n), \overline{X}_t=\{\overline{X}_1,…, \overline{X}_T\}, the function computes the estimated location with respect to the lowest state, that is, the state s_j such that a_j=d(s_j, s_0) is the closest to \frac{1}{T}∑_{t=1}^Td\big(\overline{X}_t, s_0\big) is determined, where d(\cdot, \cdot) is a distance between ordinal states.
The estimated location with respect to the lowest category.
Ángel López-Oriona, José A. Vilar
weiss2019distanceotsfeatures
estimated_location <- ordinal_location_2(series = AustrianWages$data[[100]], states = 0 : 5) # Computing the location estimate # with respect to the lowest state for one series in dataset AustrianWages
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.