Description Usage Arguments Value See Also Examples
This function calculates a cumulative probability using simulated data and
Martin Maechler's ecdf
function. Fn is a step function with jumps i/n at observation
values, where i is the number of tied observations at that value. Missing values are ignored. For
observations y = (y1, y2, ..., yn), Fn is the fraction of observations less or equal to t, i.e.,
Fn(t) = sum[yi <= t]/n. This works for continuous, ordinal, or count variables.
1 | sim_cdf_prob(sim_y, delta = 0.5)
|
sim_y |
a vector of simulated data |
delta |
the value y at which to evaluate the cumulative probability |
A list with components:
cumulative_prob
the empirical cumulative probability up to delta
Fn
the empirical distribution function
1 2 3 | # Beta(a = 4, b = 2) Distribution:
x <- rbeta(10000, 4, 2)
sim_cdf_prob(x, delta = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.