Package 'eegkitdata'

Title: Electroencephalography Toolkit Datasets
Description: Contains the example EEG data used in the package eegkit. Also contains code for easily creating larger EEG datasets from the EEG Database on the UCI Machine Learning Repository.
Authors: Nathaniel E. Helwig <[email protected]>
Maintainer: Nathaniel E. Helwig <[email protected]>
License: GPL (>= 2)
Version: 1.1
Built: 2024-12-15 07:30:33 UTC
Source: CRAN

Help Index


Electroencephalography Toolkit Datasets

Description

Contains the example EEG data used in the package eegkit. Also contains code for easily creating larger EEG datasets from the EEG Database on the UCI Machine Learning Repository.

Details

The data file eegdata contains 64-channel EEG data recorded from 10 alcoholic and 10 control subjects. The funtion geteegdata can be used to create larger EEG datasets from the EEG Database on the UCI Machine Learning Repository.

Author(s)

Nathaniel E. Helwig <[email protected]>

Maintainer: Nathaniel E. Helwig <[email protected]>

References

Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

Begleiter, H. Neurodynamics Laboratory. State University of New York Health Center at Brooklyn.

Helwig, N.E. (2014). eegkit: Toolkit for electroencephalography data. http://CRAN.R-project.org/package=eegkit

Ingber, L. (1997). Statistical mechanics of neocortical interactions: Canonical momenta indicatros of electroencephalography. Physical Review E, 55, 4578-4593.

Ingber, L. (1998). Statistical mechanics of neocortical interactions: Training and testing canonical momenta indicators of EEG. Mathematical Computer Modelling, 27, 33-64.

Examples

# See examples for eegcap, eegtime, eegspace, eegica, and eegsmooth (in package eegkit)

EEG Data from Alcoholic and Control Subjects

Description

Contains 64-channel electroencephalography (EEG) data from 10 alcoholic and 10 control subjects participating in a visual event-related potential (ERP) experiment. Data frame contains 5 trials (replications) from each subject. Data were recorded at 256 Hz for 1 second following the presentation of the visual stimulus.

Usage

data(eegdata)

Format

A data frame with 1638400 observations and the following 7 variables:

subject

Subject identification numbers (factor).

group

Subject group: "a" for alcoholic and "c" for control (factor).

condition

Experimental condition: "S1" (factor).

trial

Trial number for each replication (integer).

channel

Channel from which data was recorded (factor).

time

Time point at which data was recorded: 0,1,...,255 (integer).

voltage

Recorded EEG voltage in microvolts (numeric).

Details

Created from UCI MLR EEG training data using geteegdata with option nt=5.

Author(s)

Nathaniel E. Helwig <[email protected]>

Source

Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

Begleiter, H. Neurodynamics Laboratory. State University of New York Health Center at Brooklyn.

Ingber, L. (1997). Statistical mechanics of neocortical interactions: Canonical momenta indicatros of electroencephalography. Physical Review E, 55, 4578-4593.

Ingber, L. (1998). Statistical mechanics of neocortical interactions: Training and testing canonical momenta indicators of EEG. Mathematical Computer Modelling, 27, 33-64.

Examples

# see examples for eegtime, eegspace, eegica, and eegsmooth (in package eegkit)

# example code to create eegdata (not run):
# #(1)# download and untar SMNI_CMI_TRAIN.tar.gz file from UCI:
#     # http://archive.ics.uci.edu/ml/machine-learning-databases/eeg-mld/
# #(2)# eegdata=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TRAIN/",nt=5)

Create Data Matrix from UCI EEG Database

Description

Creates a data matrix (observations by variables) from the EEG Database on UCI Machine Learning Repository. Data matrix has 7 variables: subject, group, condition, trial, channel, time, and voltage. See eegdata and Details for more information.

Usage

geteegdata(indir, outdir = indir, cond = c("S1", "S2m", "S2n"), nt = NULL,
           filename = "eegdata", filetype = c(".rda", ".csv", ".txt"))

Arguments

indir

Input directory (containing EEG data source folders).

outdir

Output directory (to save EEG data matrix file).

cond

Condition to read-in: S1=single stimulus, S2m=two matching stimuli, S2n=two non-matching stimuli.

nt

Number of trials to read-in for each subject (default is all trials).

filename

Name for EEG data matrix (default eegdata).

filetype

Type of file to save (default is R data file .rda).

Details

EEG Database on UCI website contains 64-channel electroencephalography (EEG) data from alcoholic and control subjects participating in a visual event-related potential (ERP) experiment. Subjects were exposed to three experimental conditions: S1 single visual stimulus, S2m two matching visual stimuli, S2n two non-matching visual stimuli. Each subject participated in multiple trials (replications) of each experimental condition. Data were recorded at 256 Hz for 1 second following the presentation of the visual stimulus/stimuli.

Value

Creates and saves a data matrix file.

Author(s)

Nathaniel E. Helwig <[email protected]>

References

Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

Begleiter, H. Neurodynamics Laboratory. State University of New York Health Center at Brooklyn.

Ingber, L. (1997). Statistical mechanics of neocortical interactions: Canonical momenta indicatros of electroencephalography. Physical Review E, 55, 4578-4593.

Ingber, L. (1998). Statistical mechanics of neocortical interactions: Training and testing canonical momenta indicators of EEG. Mathematical Computer Modelling, 27, 33-64.

Examples

##########   EXAMPLE 1: UCI TRAIN DATA (not run)   ##########

# Note: you need to change 'indir' and 'outdir' in Steps 2-4

# #(1)# download and untar SMNI_CMI_TRAIN.tar.gz file from UCI:
# #   # http://archive.ics.uci.edu/ml/machine-learning-databases/eeg-mld/

##### for Unix/Mac  #####

# #(2)# extract condition "S1" and save as .rda
# eegS1=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TRAIN/",
#                  cond="S1",filename="eegtrainS1")
                   
# #(3)# extract condition "S2m" and save as .rda
# eegS2m=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TRAIN/",
#                   cond="S2m",filename="eegtrainS2m")
                   
# #(4)# extract condition "S2n" and save as .rda
# eegS2n=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TRAIN/",
#                   cond="S2n",filename="eegtrainS2n")

# #(5)# combine conditions
# eegdata=rbind(eegS1,eegS2m,eegS2n)

##### for Windows  #####

# #(2)# extract condition "S1" and save as .rda
# eegS1=geteegdata(indir="C:/Users/Nate/Downloads/SMNI_CMI_TRAIN/",
#                  cond="S1",filename="eegtrainS1")
                   
# #(3)# extract condition "S2m" and save as .rda
# eegS2m=geteegdata(indir="C:/Users/Nate/Downloads/SMNI_CMI_TRAIN/",
#                   cond="S2m",filename="eegtrainS2m")
                   
# #(4)# extract condition "S2n" and save as .rda
# eegS2n=geteegdata(indir="C:/Users/Nate/Downloads/SMNI_CMI_TRAIN/",
#                   cond="S2n",filename="eegtrainS2n")

# #(5)# combine conditions
# eegdata=rbind(eegS1,eegS2m,eegS2n)


##########   EXAMPLE 2: UCI TEST DATA (not run)   ##########

# # Note: you need to change 'indir' and 'outdir' in Steps 2 and 3

# #(1)# download and untar SMNI_CMI_TEST.tar.gz file from UCI:
# #   # http://archive.ics.uci.edu/ml/machine-learning-databases/eeg-mld/

##### for Unix/Mac  #####

# #(2)# extract condition "S1" and save as .rda
# eegS1=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TEST/",
#                  cond="S1",filename="eegtestS1")
                   
# #(3)# extract condition "S2m" and save as .rda
# eegS2m=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TEST/",
#                   cond="S2m",filename="eegtestS2m")
                   
# #(4)# extract condition "S2n" and save as .rda
# eegS2n=geteegdata(indir="/Users/Nate/Downloads/SMNI_CMI_TEST/",
#                   cond="S2n",filename="eegtestS2n")

# #(5)# combine conditions
# eegdata=rbind(eegS1,eegS2m,eegS2n)

##### for Windows  #####

# #(2)# extract condition "S1" and save as .rda
# eegS1=geteegdata(indir="C:/Users/Nate/Downloads/SMNI_CMI_TEST/",
#                  cond="S1",filename="eegtestS1")
                   
# #(3)# extract condition "S2m" and save as .rda
# eegS2m=geteegdata(indir="C:/Users/Nate/Downloads/SMNI_CMI_TEST/",
#                   cond="S2m",filename="eegtestS2m")
                   
# #(4)# extract condition "S2n" and save as .rda
# eegS2n=geteegdata(indir="C:/Users/Nate/Downloads/SMNI_CMI_TEST/",
#                   cond="S2n",filename="eegtestS2n")

# #(5)# combine conditions
# eegdata=rbind(eegS1,eegS2m,eegS2n)


##########   EXAMPLE 3: UCI FULL DATA (not run)   ##########

# #(1)# download and untar eeg_full.tar file from UCI:
# #   # http://archive.ics.uci.edu/ml/machine-learning-databases/eeg-mld/

##### for Unix/Mac  #####

# #(2)# extract condition "S1" and save as .rda
# eegS1=geteegdata(indir="/Users/Nate/Downloads/eeg_full/",
#                  cond="S1",filename="eegfullS1")
                   
# #(3)# extract condition "S2m" and save as .rda
# eegS2m=geteegdata(indir="/Users/Nate/Downloads/eeg_full/",
#                   cond="S2m",filename="eegfullS2m")
                   
# #(4)# extract condition "S2n" and save as .rda
# eegS2n=geteegdata(indir="/Users/Nate/Downloads/eeg_full/",
#                   cond="S2n",filename="eegfullS2n")

# #(5)# combine conditions
# eegdata=rbind(eegS1,eegS2m,eegS2n)

##### for Windows  #####

# #(2)# extract all conditions and save as .rda (default use)
# eegS1=geteegdata(indir="C:/Users/Nate/Downloads/eeg_full/",
#                  cond="S1",filename="eegfullS1")
                   
# #(3)# extract condition "S2m" and save as .rda
# eegS2m=geteegdata(indir="C:/Users/Nate/Downloads/eeg_full/",
#                   cond="S2m",filename="eegfullS2m")
                   
# #(4)# extract condition "S2n" and save as .rda
# eegS2n=geteegdata(indir="C:/Users/Nate/Downloads/eeg_full/",
#                   cond="S2n",filename="eegfullS2n")

# #(5)# combine conditions
# eegdata=rbind(eegS1,eegS2m,eegS2n)