View source: R/empirical_dist.R
expectation.empirical_dist | R Documentation |
empirical_dist
object x
under function g
.Method for obtaining the expectation of empirical_dist
object x
under function g
.
## S3 method for class 'empirical_dist'
expectation(x, g = function(t) t, ..., control = list())
x |
The distribution object. |
g |
The function to take the expectation of. |
... |
Additional arguments to pass into function |
control |
a list of control parameters: compute_stats - Whether to compute CIs for the expectations, defaults to FALSE n - The number of samples to use for the MC estimate, defaults to 10000 alpha - The significance level for the confidence interval, defaults to 0.05 |
If compute_stats
is FALSE, then the estimate of the expectation,
otherwise a list with the following components:
value - The estimate of the expectation
ci - The confidence intervals for each component of the expectation
n - The number of samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.