View source: R/compute_criterion.R
| compute_criterion | R Documentation |
Given a vector of per-iteration estimates and the true parameter value, computes bias, empirical SE, MSE, RMSE, coverage, and Monte Carlo SEs following Morris et al. (2019).
compute_criterion(estimates, true_value, ci_lower = NULL, ci_upper = NULL)
estimates |
Numeric vector of per-iteration parameter estimates. May contain NAs (non-converged iterations), which are excluded. |
true_value |
Single numeric value. The data-generating (true) parameter value. |
ci_lower |
Optional numeric vector (same length as |
ci_upper |
Optional numeric vector (same length as |
A named list with elements:
Mean estimate minus true value.
Sample standard deviation of estimates (n-1 denominator).
Mean squared error: mean((estimate - true_value)^2).
Root mean squared error: sqrt(mse).
Proportion of CIs containing the true value, or NULL
if CIs not provided. NAs in CIs are excluded from the denominator.
Monte Carlo SE of bias: empirical_se / sqrt(K).
Monte Carlo SE of MSE: sd((est - true)^2) / sqrt(K).
Morris, T. P., White, I. R., & Crowther, M. J. (2019). Using simulation studies to evaluate statistical methods. Statistics in Medicine, 38(11), 2074–2102. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.8086")}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.