calc_relative_var {simhelpers} | R Documentation |
Calculate jack-knife Monte Carlo SE for variance estimators
Description
Calculates relative bias, mean squared error (relative mse), and root mean squared error (relative rmse) of variance estimators. The function also calculates the associated jack-knife Monte Carlo standard errors.
Usage
calc_relative_var(
data,
estimates,
var_estimates,
criteria = c("relative bias", "relative mse", "relative rmse"),
winz = Inf,
var_winz = winz
)
Arguments
data |
data frame or tibble containing the simulation results. |
estimates |
vector or name of column from |
var_estimates |
vector or name of column from |
criteria |
character or character vector indicating the performance
criteria to be calculated, with possible options |
winz |
numeric value for winsorization constant. If set to a finite
value, estimates will be winsorized at the constant multiple of the
inter-quartile range below the 25th percentile or above the 75th percentile
of the distribution. For instance, setting |
var_winz |
numeric value for winsorization constant for the
variance estimates. If set to a finite value, variance estimates will be
winsorized at the constant multiple of the inter-quartile range below the
25th percentile or above the 75th percentile of the distribution. For
instance, setting |
Value
A tibble containing the number of simulation iterations, performance criteria estimate(s) and the associated MCSE.
Examples
calc_relative_var(data = alpha_res, estimates = A, var_estimates = Var_A)