Calculates the power curve (d x power) for an experiment with a fixed number of instances. See calc_instances() for details.

calc_power_curve(ninstances, sig.level = 0.05, alternative = "two.sided",
  test.type = "t.test", d.range = c(0.1, 2), npoints = 100)

Arguments

ninstances

the number of instances to be used in the experiment.

sig.level

significance level (alpha) for the experiment

alternative

type of alternative hypothesis ("two.sided" or "one.sided")

test.type

type of test ("t.test", "wilcoxon", "binomial")

d.range

vector c(dmin, dmax) with range of effect sizes to consider for the power calculations.

npoints

number of points for the power curve.

Value

an object of class caiser.powercurve containing fields d, the (standardized) effect size; and power, the (expected) power to detect each effect size in d.

Examples

my.cpc <- calc_power_curve(ninstances = 10) summary(my.cpc)
#> #==================================== #> Number of points: 100 #> power = 0.5 for d = 0.69 #> power = 0.8 for d = 1 #> power = 0.95 for d = 1.3 #> #====================================
plot(my.cpc)
#> #==================================== #> Number of points: 100 #> power = 0.5 for d = 0.69 #> power = 0.8 for d = 1 #> power = 0.95 for d = 1.3 #> #====================================