Skip to contents

Calculates rejection rate. The function also calculates the associated Monte Carlo standard error.

Usage

calc_rejection(data, p_values, alpha = 0.05, format = "wide")

Arguments

data

data frame or tibble containing the simulation results.

p_values

Vector or name of column from data containing p-values.

alpha

Scalar or vector indicating the nominal alpha level(s). Default value is set to the conventional .05.

format

Option "wide" (the default) will produce a tibble with one row, with separate variables for each specified alpha. Option "long" will produce a tibble with one row per specified alpha.

Value

A tibble containing the number of simulation iterations, performance criteria estimate and the associated MCSE.

Examples

calc_rejection(data = t_res, p_values = p_val)
#>   K_rejection rej_rate rej_rate_mcse
#> 1        1000    0.702    0.01446361