| adapt.a {NetworkToolbox} | R Documentation | 
Adaptive Alpha
Description
Compute an alpha value adjusted for sample size. The adjusted value is based on Perez and Pericchi's (2014) formula (equation 11, see below) using a reference sample, which can be defined a priori or estimated using the sample size calculation from power.
\frac{\alpha * \sqrt{n_0 \times (log(n_0) + \chi^{2}_{\alpha}(1))}}{\sqrt{n^* \times (log(n^*) + \chi^{2}_{\alpha}(1))}}
Usage
adapt.a(
  test = c("anova", "chisq", "cor", "one.sample", "two.sample", "paired"),
  ref.n = NULL,
  n = NULL,
  alpha = 0.05,
  power = 0.8,
  efxize = c("small", "medium", "large"),
  groups = NULL,
  df = NULL
)
Arguments
test | 
 Type of statistical test being used. Can be any of the tests listed  | 
ref.n | 
 n0 in the above equation. Reference sample size. If sample size was determined a priori, then the reference number of participants can be set. This removes the calculation of sample size based on power  | 
n | 
 n* in the above equation. Number of participants in the experiment sample (or per group)  | 
alpha | 
 
  | 
power | 
 Power (  | 
efxize | 
 Effect size to be used to estimate the reference sample size.
Effect sizes are based on Cohen (1992).
Numeric values can be used.
Defaults to   | 
groups | 
 Number of groups (only for   | 
df | 
 Number of degrees of freedom (only for   | 
Value
A list containing the following objects:
adapt.a | 
 The adapted alpha value  | 
crit.value | 
 The critical value associated with the adapted alpha value  | 
orig.a | 
 The original alpha value  | 
ref.n | 
 The reference sample size based on alpha, power, effect size, and test  | 
exp.n | 
 The sample size of the experimental sample  | 
power | 
 The power used to determine the reference sample size  | 
test | 
 The type of statistical test used  | 
Author(s)
Alexander Christensen <alexpaulchristensen@gmail.com>
References
Cohen, J. (1992). A power primer. Psychological Bulletin, 112, 155-159.
Perez, M. E., & Pericchi, L. R. (2014). Changing statistical significance with the amount of information: The adaptive a significance level. Statistics & Probability Letters, 85, 20-24.
Examples
#ANOVA
adapt.anova <- adapt.a(test = "anova", n = 200, alpha = .05, power = .80, groups = 3)
#Chi-square
adapt.chisq <- adapt.a(test = "chisq", n = 200, alpha = .05, power = .80, df = 3)
#Correlation
adapt.cor <- adapt.a(test = "cor", n = 200, alpha = .05, power = .80)
#One-sample t-test
adapt.one <- adapt.a(test = "one.sample", n = 200, alpha = .05, power = .80)
#Two-sample t-test
adapt.two <- adapt.a(test = "two.sample", n = 200, alpha = .05, power = .80)
#Paired sample t-test
adapt.paired <- adapt.a(test = "paired", n = 200, alpha = .05, power = .80, efxize = "medium")