Description Usage Arguments Value
View source: R/modular_functions.R
checkThat
performs tests and checks to ensure
functionality of the adaptive rejection sampling algorithm. For example, if
no starting values are supplied, checkThat
will determine viable
starting values for the initialization step.
1 | checkThat(f, f_params, starting_values, sample_size, supp)
|
f |
A function quosure representing the target sampling distribution. |
f_params |
A |
starting_values |
The initial values for the k abscissae. If NULL, values will be determined using the bounds of the log-distribution where the first derivative is positive. |
sample_size |
The desired number of samples in the final output. |
supp |
The support of the sampling density. |
if all checks pass, a named list
is returned containing an
expression for the density function, the initial abscissae values, and the
support of the density which may be determined by the function if no
initial values were supplied.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.