In other words, we condition the data on the predicate function. In order to do so, we simply remove all rows from the data that do not satisfy the predicate P. For instance, if we have a 2-dimensional distribution, and we want to condition on the first dimension being greater than the second dimension, we would do the following:

# S3 method for empirical_dist
conditional(x, P, ...)

Arguments

x

The empirical distribution object.

P

The predicate function to condition the data on.

...

additional arguments to pass into P.

Details

x_cond <- conditional(x, function(d) d[1] > d[2])

This would return a new empirical distribution object with the same dimensionality as x, but with all rows where the first dimension is less than or equal to the second dimension removed.