getEmpiricalCumulativeDistributions {RVCompare} | R Documentation |
Get the empirical distribution from samples.
Description
Given the observed sampels of X_A (or X_B) returns the empirical cumulative distribution function of Y_A (or Y_B)
Usage
getEmpiricalCumulativeDistributions(
X_A_observed,
X_B_observed,
nOfEstimationPoints,
EPSILON,
trapezoid = TRUE
)
Arguments
X_A_observed |
array of the observed samples (real values) of X_A. |
X_B_observed |
array of the observed samples (real values) of X_B. |
nOfEstimationPoints |
the number of points in the interval [0,1] in which the cumulative density is estimated + 2. |
EPSILON |
(optional, default value 1e-20) minimum difference between two values to be considered different. |
trapezoid |
(optional, default TRUE) if trapezoid=FALSE the non smooth empirical distribution is given. This is what the WDK uses the empirical as the estimation. |
Value
a list with two fields: the empirical distributions of X'A and X'B.
Examples
### Example 1 ###
c <- getEmpiricalCumulativeDistributions(c(1:5),c(1:3,2:3), 170, EPSILON=1e-20, trapezoid=FALSE)
plot(c$p, c$Y_A_cumulative_estimation, type="l")
lines(x=c$p, y=c$Y_B_cumulative_estimation, col="red")
[Package RVCompare version 0.1.8 Index]