erp.t: plot t-test comparisons at all timepoints between two sets of...

Description Usage Arguments Value Note Author(s) See Also Examples

Description

This function performs a series of t-tests on each timepoint comparing two sets of ERP data frames. The first set is specified by base1 and numbers1. The second set is specified by base2 and numbers2.

Usage

1
2
3
4
erp.t(base1, base2, numbers1, numbers2 = numbers1, startmsec = NULL, 
endmsec=NULL, electrode, smo = NULL, paired = TRUE, alpha = 0.05, 
erplist1 = NULL, erplist2 = erplist1, sig = NULL, main = electrode, 
col = c("blue", "red"), p.adjust.method="none", ...)

Arguments

base1

a string indicating the beginning of the name of the first set of ERP data frames.

base2

a string indicating the beginning of the name of the second set of ERP data frames.

numbers1

the numbers of the subjects of the first set of ERP data frames.

numbers2

The numbers of the subjects of the second set of ERP data frames.

startmsec

the start time (in ms) of the ERP vector.

endmsec

the end time (in ms) of the ERP vector.

electrode

a string indicating the electrode to be considered in the analysis.

smo

the smoothing parameter to apply (see smooth.spline). Default is NULL and no smoothing is applied.

paired

logical. This argument specifies if the t-tests are paired or not.

alpha

the alpha of the t-tests.

erplist1

a list containing the ERP data frames specified in base1 and numbers1.

erplist2

a list containing the ERP data frames specified in base2 and numbers2.

sig

if NULL, then a series of t-tests is computed. If an appropriate object is specified (i.e. the object returned by erp.t or scalp.t) then the results are retrieved by this object and the function simply plots the results.

main

plot title.

col

the colors of the waveforms.

p.adjust.method

p-value correction method as in p.adjust. Alternatively "tmax" can be used to perform permutation test as in Groppe et al., 2011. See mass.t.test for details.

...

further parameters to be passed to erp.

Value

The function plots two ERP waveforms. One is an average of the first set of specified data frames, and the other is an average of the second set of specified data frames. The colors of the waveforms are specified in color.list. Timepoints on which the t-test is significant are highlighted by grey bars. The function also returns an object with the results of the t-tests. This object can be used for future plots with erp.t or scalp.t, by specifying it as the argument sig.

Note

There is also a function scalp.infl able to perform the t-tests on all the electrodes, and not only on a single one.

Author(s)

Giorgio Arcara

See Also

erp, scalp.t, ~~~

Examples

1
2
3
4
5
6
7
8
## Not run: 
data(erplistExample)

erp.t("Exp1_word_subj", "Exp1_nonword_subj", 1:20, 1:20, 
electrode="Fp1", ylim=c(-10,10), erplist1=erplistExample, 
erplist2=erplistExample, col=c("blue", "red"))

## End(Not run)

erpR documentation built on June 7, 2019, 3 a.m.