conditional.dist: Method for obtaining the condition distribution, 'x | P(x)',...

View source: R/dist.R

conditional.distR Documentation

Method for obtaining the condition distribution, x | P(x), of dist object x.

Description

We just sample from x and place the sample in empirical_dist and then condition on it.

Usage

## S3 method for class 'dist'
conditional(x, P, n = 10000L, ...)

Arguments

x

The distribution object.

P

The predicate function to condition the distribution on

n

The number of samples to generate for the MC estimate of the conditional distribution x | P. Defaults to 10000.

...

additional arguments to pass into P.


queelius/algebraic.dist documentation built on Jan. 27, 2025, 8:46 a.m.