ebnm_check_fn | R Documentation |
Checks inputs and outputs of an ebnm-style function. Designed to
troubleshoot custom functions, especially those that are intended for use
in the flashier
package (e.g., as argument to the ebnm_fn
parameter in function flash
).
ebnm_check_fn(fn, x, s)
fn |
The function to be checked. |
x |
A test set (vector) of observations. |
s |
A test set of standard errors. Typically, ebnm-style functions should be able to accept a vector of standard errors or a scalar if all standard errors are identical. This is not always the case; for example, the horseshoe prior family requires homoskedastic standard errors. |
Prints a success message and silently returns 1 if all checks pass. Otherwise the function errors out.
ebnm_check_fn(ebnm_normal, x = rnorm(10, sd = 2), s = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.