power2 {nevada} | R Documentation |
Power Simulations for Permutation Tests
Description
This function provides a Monte-Carlo estimate of the power of the permutation tests proposed in this package.
Usage
power2(
model1 = "gnp",
model2 = "k_regular",
n1 = 20L,
n2 = 20L,
num_vertices = 25L,
model1_params = NULL,
model2_params = NULL,
representation = "adjacency",
distance = "frobenius",
stats = c("flipr:t_ip", "flipr:f_ip"),
B = 1000L,
alpha = 0.05,
test = "exact",
k = 5L,
R = 1000L,
seed = 1234
)
Arguments
model1 |
A string specifying the model to be used for generating the
first sample. Choices are |
model2 |
A string specifying the model to be used for generating the
second sample. Choices are |
n1 |
The size of the first sample. Defaults to |
n2 |
The size of the second sample. Defaults to |
num_vertices |
The number of nodes in the generated graphs. Defaults to
|
model1_params |
A named list setting the parameters of the first chosen
model. Defaults to |
model2_params |
A named list setting the parameters of the second chosen
model. Defaults to |
representation |
A string specifying the desired type of representation,
among: |
distance |
A string specifying the chosen distance for calculating the
test statistic, among: |
stats |
A character vector specifying the chosen test statistic(s),
among: |
B |
The number of permutation or the tolerance. If this number is lower
than |
alpha |
Significance level for hypothesis testing. Defaults to |
test |
A character string specifying the formula to be used to compute
the permutation p-value. Choices are |
k |
An integer specifying the density of the minimum spanning tree used
for the edge count statistics. Defaults to |
R |
Number of Monte-Carlo trials used to estimate the power. Defaults to
|
seed |
An integer specifying the random generator seed. Defaults to '1234. |
Details
Currently, six scenarios of pairs of populations are implemented. Scenario 0 allows to make sure that all our permutation tests are exact.
Value
A numeric value estimating the power of the test.
Examples
gnp_params <- list(p = 1/3)
k_regular_params <- list(k = 8L)
power2(
model1_params = gnp_params,
model2_params = k_regular_params,
R = 10,
B = 100,
seed = 1234
)