twosample_power {R2sample} | R Documentation |
Find the power of various two sample tests using Rcpp and parallel computing.
Description
Find the power of various two sample tests using Rcpp and parallel computing.
Usage
twosample_power(
f,
...,
alpha = 0.05,
B = 1000,
nbins = c(100, 10),
maxProcessor = 10,
doMethod = "all"
)
Arguments
f |
function to generate a list with data sets x, y and (optional) vals |
... |
additional arguments passed to f |
alpha |
=0.05, the level of the hypothesis test |
B |
=1000, number of simulation runs for permutation test and power. |
nbins |
=c(100,10), number of bins for chi large and chi small. |
maxProcessor |
=10, maximum number of cores to use. If maxProcessor=1 no parallel computing is used. |
doMethod |
="all", which methods should be included? |
Value
A numeric vector of power values.
Examples
f=function(mu) list(x=rnorm(25), y=rnorm(25, mu))
twosample_power(f, mu=c(0,2), B=100, maxProcessor = 1)
f=function() list(x=table(sample(1:10, size=1000, replace=TRUE)),
y=table(sample(1:10, size=1200, replace=TRUE)), vals=1:10)
twosample_power(f, B=100, maxProcessor = 1)
[Package R2sample version 1.1.0 Index]