SCM

[#5021] Kolmogorov-Smirnov test statistic

Date:
2013-10-26 11:54
Priority:
3
State:
Closed
Submitted by:
thorsten riedle (tr206)
Assigned to:
Nobody (None)
Product:
None
Operating System:
None
Component:
None
Summary:
Kolmogorov-Smirnov test statistic

Detailed description
Hi Guys,

I am struggling with Kolmogorov-Smirnov test statistic. The application of the following code works and provides a nice curve. However, I want to identify the maximum difference between F1 and F2 and tried to apply the max() function which does not work. The result should be 0.4. I know there is a solution but I do not find it.

> x1<-c(8.2,15.6,9.9,4.3,14.6,9.4,6.6,20.2,13.7,0.5)
> x2<-c(18.0,-3.7,12.9,-11.8,4.6,13.0,2.7,5.9,-4.7,17.0)
> F1<-ecdf(x1)
> F2<-ecdf(x2)
> absDiff<-function(x)abs(F1(x)-F2(x))

Could anyone help me with that?
Thanks

Comments:

No Comments Have Been Posted

Attached Files:

Changes

Field Old Value Date By
status_idOpen2018-06-22 08:36gstar
close_dateNone2018-06-22 08:36gstar
Thanks to:
Vienna University of Economics and Business Powered By FusionForge