Description Usage Arguments Author(s) See Also Examples
This fucntion generates routine visualization of individual or summarized ERP curves for selected channels conditioned on a factor variable with or without a grouping variable.
1 2 3 4 5 6 7 | plot_tete(data, frames = NULL, uV, subject = NULL, channel = NULL,
test = NULL, mode = c("raw", "mean", "bootci"), order = F,
curve.col = NULL, labs = list(x = "Time (ms)", y =
"Amplitude (microvolt)"), ggtheme = NULL, scalp = FALSE,
coord.mat = NULL, ylim = c(-20, 20), curve.fun = function(x, d) {
return(mean(x[d])) }, boot.num = 200, boot.intval = c(0.025, 0.975),
ci.alpha = 0.3)
|
data |
a data frame with ERP data |
frames |
The time point of the ERP data |
uV |
The corresponding column indices within the input data frame for the ERP amplitudes |
subject |
The corresponding column index for the subject variables (factor) |
channel |
The corresponding column index for the channel variables (factor) |
test |
The corresponding column index for the variables you want to compare. It could be a factor (i.e, Condition) or numeric variable (i.e, Score). |
mode |
The options ("raw","mean","bootci") of the functions control the kind of plots to be made. |
order |
Reordering the plots by the similarities between the curves using TSclust package. |
curve.col |
The color for the curves. Numbers must match. (e.g. two conditions need two colors) |
labs |
The labs of the plot |
ggtheme |
The theme setting for ggplot2 |
scalp |
Logical variable. Plot the curve on the scalp location (follow the coord.mat option). |
coord.mat |
Read users' own coordinate matrix. Default is the full 10/10 system. |
ylim |
The limits of the plot on Y axis. The setting is same for ggplot2. |
curve.fun |
The function you want to aggreagate when model == mean or bootci. For example, curve.fun = function(x, d)return(mean(x[d])). See |
boot.num |
The number of bootstrap replicates (when mode == bootci). Usually this will be a single positive integer (Default is 200). |
boot.intval |
A scalar or vector containing the confidence levels (when mode == bootci), i.e, boot.intval = c(0.025,0.975). |
ci.alpha |
The alpha value (the ggplot2 setting) for the ribbon area of the confidence interval (when mode == bootci). |
Chi-Lin Yu <psychilinyu@gmail.com>, Ching-Fan Sheu <csheu@mail.ncku.edu.tw>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(DirectedForgetting)
time_pt <- seq(-200, 1000, 1)
plot_tete(data = DirectedForgetting,
frames = time_pt,
channel = 5, subject = 1, uV = 6:1206, test = 4,
mode = "mean", scalp = TRUE)
dta_c <- filter(DirectedForgetting,
Channel %in% c("FZ", "FCZ", "CZ", "PZ"))
%>% droplevels()
plot_tete(data = dta_c,
frmaes = time_pt,
channel = 5, subject = 1, uV = 6:1206, test = 4,
mode = "raw")
dta_c <- filter(DirectedForgetting,
Channel == "CZ" )
%>% droplevels()
plot_tete(data = dta_c,
frames = time_pt,
channel = 5, subject = 1, uV = 6:1206, test = 4,
mode = "bootci")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.