Calculate power at a given significance level

Description

Function to calculate power at a given significance level. Uses the data structure returned by run.tests

Usage

1
calculate.power(vals, alpha = 0.95, comp = `>`)

Arguments

vals

list, values as returned by run.tests

alpha

significance level at which to return power

comp

comparison function, for alpha < .5, it should probably be set to '<'

Details

power is calculated as the fraction of tests that are higher or lower than (according to comp) than the significance level. The significance level is fixed on data generated under the null hypothesis.

Value

returns the power for applicable data from the structure vals, usually for each test it returns the power for all types of dependence and all noise levels.

Author(s)

Sebastian D├╝mcke duemcke@mpipz.mpg.de

See Also

run.tests

Examples

1
2
3
mycor = function(...) cor(...)^2
vals = run.tests(mycor,list(),1:2,cbind(c(.3,.4,6),c(.3,.5,4)),100)
drop(calculate.power(vals))