emp_cdf | R Documentation |
The empirical CDF with tail correction, ensuring that its output is never 0 or 1.
emp_cdf(x)
x |
numeric vector of observations |
The corrected empirical CDF is defined as
F_n(x) = \frac{1}{n + 1} \min\biggl\{1, ∑_{i = 1}^n 1(X_i ≤ x)\biggr\}
A function with signature function(x)
that returns F_n(x).
# fit ECDF on simulated data x <- rnorm(100) cdf <- emp_cdf(x) # output is bounded away from 0 and 1 cdf(-50) cdf(50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.