res_format: Simulation Result Data Cleaning

Description Usage Arguments Details Value Examples

View source: R/Diagnostics.R

Description

Generates cleaned data frames from simulation results.

Usage

1
res_format(config_names, M_range, CI_res_all, chi_orc, alpha)

Arguments

config_names

names of configurations

M_range

a vector of dispersion parameters

CI_res_all

a simulation output matrix, with the number of rows equal to 2 * length(M_range) * length(config_names) and the number of columns equal to number of simulations.

chi_orc

a vector of optimal half-lengths, corresponding to each value in M_range.

alpha

a desired level of non-coverage

Details

This function was created for the purpose of simulations.

Value

a list of two dataframes, corresponding to coverage (cov_data) and half-length (chi_data) results, respectively.

Examples

1
2
3
4
5
6
config_names <- c("a", "b")
M_range <- c(1, 2)
nrow <- 2 * length(M_range) * length(config_names)
CI_res_all <- matrix(rnorm(nrow * 50), nrow, 50)
chi_orc <- c(1, 2)
res_format(config_names, M_range, CI_res_all, chi_orc, 0.05)

koohyun-kwon/OptACI documentation built on Oct. 6, 2020, 8:09 a.m.