LqDist: Calculation of the distance between two data sets

View source: R/qmvs.R

LqDistR Documentation

Calculation of the distance between two data sets

Description

LqDist calculates the Wasserstein metric or Kolmogorov-Smirnov distance between two data sets.

Usage

LqDist(E1, E2, q=1) 

Arguments

E1, E2

Vectors of data between which a distance is to calculate.

q

Option for the distance measure. If q equals 1, the Wasserstein metric will be calculated. If q equals Inf, the Kolmogorov-Smirnov distance will be calculated. Default option is 1.

Value

A positive number.

Author(s)

\both

References

\yiqiDiss

See Also

distance,

Examples

simdata1 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094,
0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed = 0)

simdata2 <- sim.ny(par = c(30, 200, 250, 350), esterrorpar = c(-2.67, 0.0094,
0.0299, 0.0020, 1.13), c = 4, k = 12, N = 10000, pr = TRUE, seed =
12345)

simcorrectRT1 <- subset(simdata1, simdata1[,2] == TRUE, select = 1)

simcorrectRT2 <- subset(simdata2, simdata2[,2] == TRUE, select = 1)

LqDist(simcorrectRT1, simcorrectRT2, q=1) 

qmvs documentation built on Nov. 4, 2024, 9:06 a.m.

Related to LqDist in qmvs...