Skip to contents

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

Usage

calc_absolute(
  res_dat,
  estimates,
  true_param,
  perfm_criteria = c("bias", "variance", "mse", "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_absolute(res_dat = t_res, estimates = est, true_param = true_param)
#> # A tibble: 1 × 9
#>       K    bias bias_mcse    var var_mcse    mse mse_mcse  rmse rmse_mcse
#>   <int>   <dbl>     <dbl>  <dbl>    <dbl>  <dbl>    <dbl> <dbl>     <dbl>
#> 1  1000 0.00233   0.00638 0.0407  0.00183 0.0407  0.00183 0.202   0.00556