simulecdf {robusTest} | R Documentation |
Simulate the distribution of the test statistic for the robust independence test of Kolmogorov-Smirnov's type
Description
For two independent continuous uniform variables on compute the maximal distance
between the joint empirical cumulative distribution function and the product of the marginal
empirical cumulative distribution functions using Monte-Carlo simulations.
Usage
simulecdf(n, N)
Arguments
n |
the size of the sample. |
N |
the number of replications in the Monte-Carlo simulation. |
Details
Let be a bivariate sample of
n
independent continuous uniform variables.
Its corresponding bivariate e.c.d.f. (empirical cumulative distribution function)
Fn is defined as:
Fn(t1,t2) = #{xi<=t1,yi<=t2}/n = sum_{i=1}^n Indicator(xi<=t1,yi<=t2)/n
.
Let Fn(t1) and Fn(t2) be the marginals e.c.d.f. Based on N Monte_Carlo simulations, the function computes the e.c.d.f. of
Value
Returns the e.c.d.f. based on the N Monte_Carlo simulations. The returned object
is a stepfun object obtained from the function ecdf
.
See Also
indeptest
, stat_indeptest
, ecdf2D
.