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 location is returned. Otherwise, the function returns the normalized standard estimated location.
Returns
The estimated location with respect to the lowest category.
Details
Given an OTS of length T with range S={s0,s1,s2,…,sn} (s0<s1<s2<…<sn), Xt={X1,…,XT}, the function computes the estimated location with respect to the lowest state, that is, the state sj such that aj=d(sj,s0) is the closest to T1∑t=1Td(Xt,s0) is determined, where d(⋅,⋅) is a distance between ordinal states.
Examples
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