distance: Calculate the \(\theta\)-distance between two intervals
Description
This function calculates the \(\theta\)-distance
between any two nonempty compact real intervals.
Usage
# S4 method for IntervalData,IntervalData
distance(e1, e2, theta = 1)
Value
This function returns the calculated \(\theta\)-distance between the
two given intervals, which is defined as a single real number. Therefore,
the output of this function is a single numeric value.
Arguments
e1
A single interval stored as an IntervalData object.
e2
A single interval stored as an IntervalData object.
theta
A single positive real number stored as a unique numeric
value which is used for distance computations. By default,
theta = 1.
The \(\theta\)-distance between any two given nonempty compact real
intervals, \(A\) and \(B\), was defined by Gil et al. (2002)
as the non-negative real number calculated as follows,
$$d_{\theta}(A,B) = \sqrt{(\mathrm{mid}~A - \mathrm{mid}~B)^2 +
\theta\cdot(\mathrm{spr}~A -\mathrm{spr}~B)^2},$$
where \(\theta\) is a positive real number.
References
Gil, M.Á.; Lubiano, M.A.; Montenegro, M.; López, M.T. (2002).
Least squares fitting of an affine function and strength of association for
interval-valued data. Metrika, 56:97-111. tools:::Rd_expr_doi("10.1007/s001840100160").