test_stat: Kolmogorov-Smirnov Test Statistic

Description Usage Arguments Details Value References See Also Examples

View source: R/test_stat.R

Description

This function is used to calculate the Kolmogorov-Smirnov statistic: D(F_1, F_2) = \sup_{x}|F_1(x) - F_2(x)| .

Usage

1
test_stat (F1, F2)

Arguments

F1

vector of one distribution function value.

F2

vector of the other distribution function value.

Details

It is necessary to point out that F1 and F2 are based on common grids. Other technical details can be found in Wang et al. (2015).

Value

This function returns a list of prediction values for classes,

out

value of Kolmogorov-Smirnov statistics.

References

Wang, Y., Liang, B., Tong, X., Marder, K., Bressman, S., Orr-Urtreger, A., Giladi, N. & Zeng, D. (2015). Efficient estimation of nonparametric genetic risk function with censored data. Biometrika, 102(3), 515-532.

See Also

Permutation_Test()

Examples

1
2
3
4
5
6
7
8
 X = seq(0.01, 1, 0.05);
 Func_1 = function(x){ x + runif(length(x), min=0, max=1) };
 Func_2 = function(x){ x + 2*runif(length(x), min=0, max=1) };
 
 U1 = Func_1(X);
 U2 = Func_2(X);
 
 test_stat (F1 = U1, F2 = U2);

GSSE documentation built on May 2, 2019, 12:40 p.m.