Description Usage Arguments Details Value Author(s) Examples
Generates random samples from any two specified distributions and compares the samples by a Wilcoxon rank sum test. Power is calculated as the proportion of tests that correctly reject the null hypothesis.
1 2 |
n |
Total sample size |
... |
two distribution functions should be entered. See 'Details'. |
weights |
a list of vectors giving the proposed weights for the two groups. Each vector will be normalized. |
alpha |
Significance level for the test. |
nsim |
Number of simulations to run per set of conditions |
seed |
The value of the random number generator seed (for reproducibility) |
ncores |
The number of cores to use in parallel processing. |
Distribution functions should be entered as a valid random variable
generating function, but excluding the first argument. For example, to
sample from a Poisson distribution with a mean of 3, one would enter
rpois(lambda=3)
. Multiple values may be given to an argument to
generate power under multiple conditions, such as
rpois(lambda=c(3, 5, 7))
.
Returns a data frame with the following fields:
n_total
Total sample size
n1
Group 1 sample size
n2
Group 2 sample size
k
The proportion of the total sample size allotted to Group 1
alpha
Significance level
power
Estimate of simulated power
nsim
Number of simulations performed
pop1_param
Parameters for the random sampling of group 1
pop2_param
Parameters for the random sampling of group 2
pop1_dist
Random sampling function for group 1
pop2_dist
Random sampling function for group 2
Benjamin Nutter
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.