ANOVA_power: Simulation function used to perform the simulation

Description Usage Arguments Value References Examples

View source: R/ANOVA_power.R

Description

Simulation function used to perform the simulation

Usage

1
2
ANOVA_power(design_result, alpha_level = 0.05, correction = "none",
  p_adjust = "none", nsims = 1000, seed = NULL, verbose = TRUE)

Arguments

design_result

Output from the ANOVA_design function

alpha_level

Alpha level used to determine statistical significance

correction

Set a correction of violations of sphericity. This can be set to "none", "GG" Grennhouse-Geisser, and "HF" Huynh-Feldt

p_adjust

Correction for multiple comparisons

nsims

number of simulations to perform

seed

Set seed for reproducible results

verbose

Set to FALSE to not print results (default = TRUE)

Value

Returns dataframe with simulation data (p-values and effect sizes), anova results and simple effect results, plots of p-value distribution, p_adjust = p_adjust, nsims, and alpha_level.

References

too be added

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Set up a within design with 2 factors, each with 2 levels,
## with correlation between observations of 0.8,
## 40 participants (who do all conditions), and standard deviation of 2
## with a mean pattern of 1, 0, 1, 0, conditions labeled 'condition' and
## 'voice', with names for levels of "cheerful", "sad", amd "human", "robot"
design_result <- ANOVA_design(design = "2w*2w", n = 40, mu = c(1, 0, 1, 0),
      sd = 2, r = 0.8, labelnames = c("condition", "cheerful",
      "sad", "voice", "human", "robot"))
power_result <- ANOVA_power(design_result, alpha_level = 0.05,
      p_adjust = "none", seed = 2019, nsims = 10)

Lakens/ANOVApower documentation built on Jan. 9, 2020, 5:32 p.m.