test_input_val {graphicalMCP} | R Documentation |
Validate inputs for testing and power simulations
test_input_val(
graph,
p,
alpha,
test_groups = list(seq_along(graph$hypotheses)),
test_types = c("bonferroni"),
test_corr,
verbose,
test_values
)
power_input_val(graph, sim_n, power_marginal, test_corr, success)
graph |
An initial graph as returned by |
p |
A numeric vector of p-values (unadjusted, raw), whose values should
be between 0 & 1. The length should match the number of hypotheses in
|
alpha |
A numeric value of the overall significance level, which should be between 0 & 1. The default is 0.025 for one-sided hypothesis testing problems; another common choice is 0.05 for two-sided hypothesis testing problems. Note when parametric tests are used, only one-sided tests are supported. |
test_groups |
A list of numeric vectors specifying hypotheses to test together. Grouping is needed to correctly perform Simes and parametric tests. |
test_types |
A character vector of test types to apply to each test
group. This is needed to correctly perform Simes and parametric
tests. The length should match the number of elements in |
test_corr |
(Optional) A list of numeric correlation matrices. Each
entry in the list should correspond to each test group. For a test group
using Bonferroni or Simes tests, its corresponding entry in |
verbose |
A logical scalar specifying whether the details of the
adjusted p-value calculations should be included in results. When
|
test_values |
A logical scalar specifying whether adjusted significance
levels should be provided for each hypothesis. When |
sim_n |
An integer scalar specifying the number of simulations. The default is 1e5. |
power_marginal |
A numeric vector of marginal power values to use when simulating p-values. See Details for more on the simulation process. |
success |
A list of user-defined functions to specify the success
criteria. Functions must take one simulation's logical vector of results as
an input, and return a length-one logical vector. For instance, if
"success" means rejecting hypotheses 1 and 2, use |
Returns graph
invisibly