peakAnova: ANOVA on individual peaks

Description Usage Arguments Details Value Note

View source: R/anova.R

Description

peakAnova performs automatic peak detection and runs traditional ANOVA on them

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
peakAnova(
  .arraydat,
  factordef,
  peakdef,
  bwdat = NULL,
  verbose = TRUE,
  avg_around_peak = 2,
  nperm = 1,
  useparallel = FALSE,
  ncores = NULL,
  par_method = c("snow", "mc"),
  cl = NULL,
  iaterms_last = TRUE,
  seed = NULL
)

Arguments

.arraydat

a numeric array with named dimnames containing the EEG (or other) data. Missing values are not allowed.

factordef

a named list of factor definitions, containing the following elements:

  • "between""character vector of between-subject factors (default: NULL)"

  • "within""character vector of within-subject factors (default: NULL)"

  • "w_id""name of the dimension which identifies the subjects (default: "id")

peakdef

a named list of peak definitions. A peak definition is a three-element integer vector which specifies the time window (start and end point) and the polarity (1 for positivity and -1 for negativity).

bwdat

a data.frame which contains the identification codes (factordef$w_id) and the group memberships (factordef$between) of the subjects. Missing values are not allowed.

verbose

logical value indicating whether means for each factor level should be also returned

avg_around_peak

integer value which specifies the number of data points which are considered +- in the "mean around the peak" measure

nperm

integer value giving the number of permutations (default: 999L)

useparallel

logical value; if TRUE (default), computations are done in parallel

ncores

integer value corresponding to the number of cores; if NULL (default), it is set to the maximum number of cores available

par_method

parallelization method; can be "snow" (default) or "mc" (multicore)

cl

a cluster definition for snow-type parallelization; if NULL (default), it is set up automatically

iaterms_last

logival variable whether all interaction terms should follow all main effect terms (default: TRUE)

seed

an integer value which specifies a seed (default: NULL)

Details

OLD VERSION, DO NOT USE IT! updates will follow...

Value

A list object.

Note

The function computes type I p-values - this is correct if the design is fully balanced and orthogonal (if the number of between-subject factors is one, it may have slightly unequal group sizes).


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.