erp.cor: plot the timepoint correlations between ERPs (single...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function performs a series of correlations on each timepoint between ERP voltages and an external (typically a behavioral) variable. The set of ERP data frames is specified by base and numbers. The behavioral variable is specified as a vector (of length equal to numbers) as the argument external. The function returns a plot of a single electrode showing the results of the correlation tests.

Usage

1
2
3
4
	erp.cor(base, numbers, electrode, erplist=NULL,startmsec=NULL, 
	endmsec=NULL, external=NULL, smo=NULL, alpha=0.05, 
	method = c("pearson", "kendall", "spearman"),  sig=NULL,  
	main=electrode, ...)

Arguments

base

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

numbers

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

electrode

the electrode to be plotted.

erplist

a list containing the ERP data frames specified in base and numbers.

startmsec

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

endmsec

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

external

a vector indicating the values of the external variable (typically a behavioural variable). This vector must be of the same length of numbers

smo

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

alpha

the alpha of the correlation tests.

method

the method of the correlations.
Available methods are "pearson", "kendall", "spearman".

sig

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

main

plot title.

...

further parameters to be passed to link{erp}.

Value

This function plots a scalp map of the ERP waveforms in an array resembling the topographic locations of electrodes on the scalp. The waveforms represent the average of the first set of data frames specified. Timepoints with a positive (and significant) correlation are highlighted by red bars. Timepoints with a negative (and significant) correlation are highlighted by blue bars. The function also returns an object with the correlation results. This object can be used in future plots with erp.cor or scalp.cor, by specifying it as the argument sig.

Author(s)

Giorgio Arcara

See Also

scalp.cor

Examples

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

#generate some simulated RT data 

RT=rnorm(20, mean = 500, sd = 100)
erp.cor("Exp1_word_subj", numbers=1:20, electrode="Fp1",  
erplist=erplistExample, external=RT, ylim=c(-6,6))

## End(Not run)

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