Learn R Programming

icaOcularCorrection (version 1.3)

icaOcularCorrection-package: Package to perform Independent Components Analysis (ICA) based eye-movement correction.

Description

Removes eye-movements artifacts as well as (a portion of) of other noise using the fastICA package. The correction methods is based on Flexer, Bauer, Pripfl, and Dorffner (2005). Using the icaDEN.fnc function, the EEG is first decomposed into indepedent components (ICs), then the correlation between the EOG and each of the ICs is calculated. Any IC with a correlation at or above threshold (default is 0.4) is zeroed out and the EEG is finally reconstructed. The functions batch.icDEN.fnc and mc.batch.icaDEN.fnc allow for batch processing.

Arguments

Details

ll{ Package: icaOcularCorrection Type: Package Version: 1.3 Date: 02-11-2011 License: GPL-2 LazyLoad: yes } icaDEN.fnc batch.icaDEN.fnc mc.batch.icaDEN.fnc plotICs.fnc batch.plotICs.fnc defineElectrodeSet.fnc

References

Flexer, A., Bauer, H., Pripfl, J. & Dorffner, G. (2005). Using ICA for removal of ocular artifacts in EEG recorded from blind subjects. Neural Networks, 18, 998-1005.

See Also

defineElectrodeSet.fnc; eeg; den; icaDEN.fnc; batch.icaDEN.fnc; mc.batch.icaDEN.fnc; plotICs.fnc; batch.plotICs.fnc

Examples

Run this code
data(eeg)
head(eeg)
# Create icaOcularCorrection object
den = icaDEN.fnc(eeg, epoch.length = 192, 
    method = "all", electrodes = c("Fp1", 
    "Fp2", "AF3", "AF4", "F7", "F3", "Fz", 
    "F4", "F8", "FC5", "FC1", "FC2", "FC6", 
    "T7", "C3", "Cz", "C4", "T8", "CP5", 
    "CP1", "CP2", "CP6", "P7", "P3", "Pz", 
    "P4", "P8", "PO3", "PO4", "O1", "Oz", 
    "O2"), eogs = list(VEOG = c("BE", "TE"), 
    HEOG = c("LC", "RC")), threshold = 0.4, 
    n.comp = 16, ret.SAWK = TRUE, 
    verbose = TRUE)
names(den)
den$snr.ica

# Plot ICs
plotICs.fnc(den, epoch.length = 192, cor.only = 
    FALSE, whichEOG = c("VEOG", "HEOG"), 
    method = "all", dir.create.path = paste(getwd(), 
    "/figs/", sep = ""), dir.create.name = "IC.plots", 
    threshold = NA, nplots = c(2, 2), ask = TRUE, 
    plot.EOG = TRUE, pdf.it = FALSE, pdf.prefix = 
    "ICs_")

Run the code above in your browser using DataLab