calc_relative_bias: Calculate Relative Bias and its Monte Carlo Standard Error
Description
Computes the relative bias of a set of estimates with respect to a true parameter value,
along with the Monte Carlo Standard Error (MCSE) of the relative bias. Relative bias is
the ratio of the mean of the estimates to the true parameter, providing a scale-independent
measure of bias. This function is particularly useful for evaluating the accuracy of estimates
in situations where the magnitude of the true parameter is crucial to the interpretation of bias.
The function gracefully handles cases where the true parameter is zero by returning `NA` for
both relative bias and its MCSE, avoiding division by zero errors.
Usage
calc_relative_bias(estimates, true_param)
Value
A list with two components: `rel_bias`, the calculated relative bias of the estimates, and
`rel_bias_mcse`, the Monte Carlo Standard Error of the relative bias. If `true_param` is zero,
both `rel_bias` and `rel_bias_mcse` will be `NA`.
Arguments
estimates
A numeric vector of estimates from a simulation or sampling process.
true_param
The true parameter value that the estimates are intended to approximate.
Note that `true_param` must not be zero, as relative bias calculation involves division by
the true parameter value.