Calculates relative bias, mean squared error (relative mse), and root mean squared error (relative rmse). The function also calculates the associated Monte Carlo standard errors.

calc_relative(
  res_dat,
  estimates,
  true_param,
  perfm_criteria = c("relative bias", "relative mse", "relative rmse")
)

Arguments

res_dat

data frame or tibble containing the simulation results.

estimates

name of the column containing the estimates.

true_param

name of the column containing the true parameters.

perfm_criteria

character or character vector indicating the performance criteria to be calculated.

Value

A tibble containing the number of simulation iterations, performance criteria estimate(s) and the associated MCSE.

Examples

calc_relative(res_dat = t_res, estimates = est, true_param = true_param)
#> # A tibble: 1 x 7 #> K rel_bias rel_bias_mcse rel_mse rel_mse_mcse rel_rmse rel_rmse_mcse #> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 1000 1.00 0.0128 0.163 0.00366 0.403 0.00911