Description Usage Arguments Value Note Author(s) References Examples
Creates plot of single-channel electroencephalography (EEG) time course with optional confidence interval. User can control the plot orientation, line types, line colors, etc.
1 2 3 4 5 6 7 | eegtime(time, voltage, flipvoltage = TRUE, vlty = 1, vlwd = 2,
vcol = "blue", voltageSE = NULL, slty = NA, slwd = 1,
scol = "cyan", salpha = 0.65, conflevel = 0.95,
plotzero = TRUE, zlty = 1, zlwd = 0.5, zcol = "black",
xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL,
nxtick = 6, nytick = 6, xticks = NULL, yticks = NULL,
add = FALSE, ...)
|
time |
Vector of time points at which EEG was recorded. |
voltage |
Vector of recorded EEG voltage at each point in |
flipvoltage |
If |
vlty |
Line type for |
vlwd |
Line width for |
vcol |
Line color for |
voltageSE |
Vector of standard errors of EEG voltage at each point in |
slty |
Line type for |
slwd |
Line width for |
scol |
Polygon or line color for |
salpha |
Transparency value for |
conflevel |
Confidence level to use for confidence intervals. Default forms 95% CI. |
plotzero |
If |
zlty |
Line type for reference line. Ignored if |
zlwd |
Line width for reference line. Ignored if |
zcol |
Line color for reference line. Ignored if |
xlim |
Plot limits for |
ylim |
Plot limits for |
xlab |
Plot label for |
ylab |
Plot label for |
nxtick |
Approximate number of axis ticks for |
nytick |
Approximate number of axis ticks |
xticks |
x-axis ticks for |
yticks |
y-axis ticks |
add |
If |
... |
Optional inputs for |
Produces plot of EEG time course with NULL
return value.
Confidence intervals are formed using the normal (Gaussian) distribution.
Nathaniel E. Helwig <helwig@umn.edu>
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. http://www.downstate.edu/hbnl/
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ########## EXAMPLE ##########
# get "PZ" electrode from "eegdata" data
data(eegdata)
idx <- which(eegdata$channel=="PZ")
eegdata <- eegdata[idx,]
# get average and standard error (note se=sd/sqrt(n))
eegmean <- tapply(eegdata$voltage,list(eegdata$time,eegdata$group),mean)
eegse <- tapply(eegdata$voltage,list(eegdata$time,eegdata$group),sd)/sqrt(50)
# plot results with legend
tseq <- seq(0,1000,length.out=256)
eegtime(tseq,eegmean[,2],voltageSE=eegse[,2],ylim=c(-10,6),main="Pz")
eegtime(tseq,eegmean[,1],vlty=2,vcol="red",voltageSE=eegse[,1],scol="pink",add=TRUE)
legend("bottomright",c("controls","alcoholics"),lty=c(1,2),
lwd=c(2,2),col=c("blue","red"),bty="n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.