computes a Monte Carlo approximation of an estimator's Bayes risk
risk(
assessment,
loss = function(x, y) abs(x - y),
average_over_parameters = FALSE,
average_over_sample_sizes = TRUE
)a dataframe giving an estimate of the Bayes risk
an object returned by assess() (or the estimates data frame of this object)
a binary operator defining the loss function (default absolute-error loss)
if TRUE, the loss is averaged over all parameters; otherwise (default), the loss is averaged over each parameter separately
if TRUE (default), the loss is averaged over all sample sizes (the column m in df); otherwise, the loss is averaged over each sample size separately
assess(), bias(), rmse()