ANOVA_design: Design function used to specify the parameters used in the...

Description Usage Arguments Value References Examples

View source: R/ANOVA_design.R

Description

Design function used to specify the parameters used in the simulation

Usage

1
2
ANOVA_design(design, n, mu, sd, r = 0, labelnames = NULL,
  plot = TRUE)

Arguments

design

String specifying the ANOVA design.

n

Sample size in each condition

mu

Vector specifying mean for each condition

sd

standard deviation for all conditions

r

Correlation between dependent variables (single value or matrix)

labelnames

Optional vector to specifying factor and condition names (recommended, if not used factors and levels are indicated by letters and numbers)

plot

Should means plot be printed (defaults to TRUE)

Value

Returns Single data-frame with simulated data, design, design list, factor names, formulas for ANOVA, means, sd, correlation, sample size per condition, correlation matrix, covariance matrix, design string, labelnames, labelnameslist, factor names, meansplot

References

too be added

Examples

1
2
3
4
5
6
7
## 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", and "human", "robot"
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"))

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