mass.t.test: perform mass univariate statistics on an erplist.

Description Usage Arguments Details Value Author(s) References 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 is specified by base2 and numbers2. Several options are available.

Usage

1
2
3
4
5
mass.t.test(base1=NULL, base2=NULL, numbers1=NULL, numbers2=numbers1, startmsec=NULL, 
endmsec=NULL, paired=F, erplist1=NULL, erplist2=erplist1,  electrodes="all", 
to.exclude=NULL, interval=c(startmsec, endmsec), p.adjust.method="none", 
n.permutations=1000, p.crit=0.05, stable.diff=FALSE, crit.msec=NULL, 
crit.npoints=NULL, neighbours=NULL, min_nchans=2, na.rm=TRUE)

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

paired

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

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.

electrodes

A vector with the names of the electrodes that should be influded in the analysis. Default is "all" and all electrodes will be used.

to.exclude

A vector with electrode names that should be excluded from the analsysis.

interval

a vector with a pair of values indicating the interval (in milliseconds) to be plotted.

p.adjust.method

p-value correction methods as in p.adjust. Alternatively "tmax" or "cluster.based.permutation" can be used to perform permutation test as in Groppe et al., 2011.

n.permutations

number of permutation if a permutation test is specified in p.adjust.methods, (currently for "tmax" or "cluster.based.permutation") .

p.crit

the alpha of the t-tests. Default is 0.05.

stable.diff

Logical (default is FALSE). If TRUE, significant results are filtered, and only consecutive sigificant results as specified in crit.msec or crit.npoints are retained.

crit.msec

if stable.diff=TRUE, only sequences of consecutive significant timpoints during at least crit.msec milliseconds will be retained in the results (Overridden if crit.npoints is specified).

crit.npoints

if stable.diff=TRUE, only sequences of consecutive significant timpoints during at least crit.npoints number of timepoints will be retained in the results.

neighbours

An electrode by electrode matrix with 0 and 1 indicating neighbouring electrode (1 = neighbouring, 0 = not neighbouring).

min_nchans

Only used in cluster based permutation. The minimun number of neighbouring channels to consider a cluster. Default is 2 (i.e., a cluster must be composed by at least 2 channels).

na.rm

Logical. Should NA values be removed from the analysis?

Details

This function perform a series of t-tests, according to a Mass Univariate Statistics approach (Groppe et al., 2011)

Value

The function returns results in the form of a list containing a series of objects. param, contains the parameters of the call to mass.t.test. mass.t.results, contains the t.values of the results filtered according to the mass.t.results call. sig is a logical matrix containing the significant results (0 = not significant, 1 = significant). t.mat is a matrix containing all the t-values (not filtered). p.mat is a matrix containing the p.values, unfiltered. If cluster.based.permutation is chosed a different list of results is returned, with seprate results for positive and negative clusters and with cluster identity. If stable.diff=TRUE an additional object containing the list of beginning and end of signficant time windows is included in the ouput.

Author(s)

Giorgio Arcara

References

Groppe, D. M., Urbach, T. P., and Kutas, M. (2011). Mass univariate analysis of event-related brain potentials fields I: a critical tutorial review. Psychophysiology, 48(12), 1711-25.

See Also

erp, erp.t

Examples

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

res = mass.t.test("Exp1_word_subj", "Exp1_nonword_subj", 1:20, 1:20, startmsec=-200, endmsec=1500, 
erplist1=erplistExample, erplist2=erplistExample, paired=T)


## End(Not run)

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