Description Usage Arguments Details Examples
Given a vector x, calculate P(x <= X) for a set of upper bounds X. Can be applied to a data.table object for multivariate use. That is, calculate P(x <= X, y <= Y, z <= Z, ...)
1 | empirical_cdf(x, ubounds)
|
x |
Numeric vector or a data.table object for multivariate use. |
ubounds |
A vector of upper bounds on which to evaluate the CDF. For multivariate version, a data.table whose names correspond to columns of x. |
Calculate the empirical CDF of a vector, or data.table with multiple columns for multivariate use.
1 2 3 4 | library(data.table)
dt <- data.table(x=c(0.3, 1.3, 1.4, 3.6), y=c(1.2, 1.2, 3.8, 3.9))
empirical_cdf(dt$x, ubounds=1:4)
empirical_cdf(dt, ubounds=CJ(x = 1:4, y = 1:4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.