summarize_simulation_scenario | R Documentation |
This wrapper function is compatible with dplyr and can be called in a dplyr chain of arguments.
summarize_simulation_scenario( true_values, simulated_values, lower_cci, upper_cci, SE = NULL, compute_multimodal = FALSE )
true_values |
vector of length n. Contains true population values. |
simulated_values |
vector of length n. Contains simulated values. |
lower_cci |
vector of length n. Upper 95% CCI. |
SE |
vector of length n. Standard Error of the posterior distribution. |
compute_multimodal |
boolean. If TRUE, this function will compute a test on the simulated parameter values to check if the distribution of parameter estimates is multimodal. See modetest. |
data frame containing:
percent bias of the simulation scenario, computed as a percentage relative to the true value.
MCMC standard error of bias estimate, computed as a percentage relative to the bias estimate.
empirical standard error computed from the simulated values.
MCMC standard error of the empirical SE.
model standard error computed from the simulated values.
MCMC standard error of the model SE.
Mean-Squared Error of the simulated values.
MCMC standard error of the simulated values.
Coverage given the 95% CCI.
MCMC standard error of coverage.
Bias-adjusted coverage. Instead of using the true population value, use the mean of the simulated values. Useful to check whether poor coverage is the result of bias. See 'See also' for reference.
MCMC standard error of bias-adjusted coverage.
p-value of the modetest used to check for multimodal distributions.
Morris, Tim P., Ian R. White, and Michael J. Crowther. "Using simulation studies to evaluate statistical methods." Statistics in medicine 38.11 (2019): 2074-2102.
## Not run: tst <- data %>% group_by(scenario_id) %>% # This is how you use the function do(summarize_simulation_metrics(.$true_values, .$simulated_values .$lower_cci, .$upper_cci, FALSE)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.