adapt.a | R Documentation |
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.
α * √(n0 times (log(n0) + χ^2_α(1))) / √(n* times (log(n*) + χ^2_α(1)))
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 )
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 |
α in the above equation.
Alpha value to adjust.
Defaults to |
power |
Power (1 - β) value.
Used to estimate the reference sample size (n0).
Defaults to |
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 |
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 |
Alexander Christensen <alexpaulchristensen@gmail.com>
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.
#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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.