powered by
A function for computing power of two-sided tests corresponding to z-scores for a given significance level. alpha (or corresponding cut-off z-score a)
alpha
a
z_to_power( z, alpha = 0.05, a = stats::qnorm(alpha/2, lower.tail = FALSE), two.sided = TRUE )
A vector of z-scores
Level of significance alpha
Or, alternatively a z-score corresponding to alpha
Whether directionality of the effect size should be taken into account.
# mean powers corresponding to the mean components of KD2 z_to_power(0:6, alpha = .05)
Run the code above in your browser using DataLab