plot_fa: Visualization of the results using adaptive...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot_fa.R

Description

the function plot fa performs factor-adjusted multiple testing of ERP curves in the linear model framework (Causeur et al, 2012) and display results the same way as that of plot_tete.

Usage

1
2
3
4
5
6
plot_fa(data, frames = NULL, uV, subject = NULL, channel = NULL,
  test = NULL, mode = c("test", "test_signal"), curve.col = NULL,
  labs = list(x = "Time (ms)", y = "Amplitude (microvolt)"), ggtheme = NULL,
  order = F, scalp = FALSE, coord.mat = NULL, ylim = c(-20, 20),
  significant.col = "darkgoldenrod", significant.alpha = 0.1,
  design = NULL, design0 = NULL, ...)

Arguments

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 ("test","test_signal") of the functions control the kind of plots to be made.

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

order

Reordering the plots by the similarities between the curves using TSclust package.

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.

significant.col

The color used to indicated the significant time point.

significant.alpha

The alpha of the significant.col that used to indicated the significant time point.

design

Design matrix of the full model for the relationship between the ERP and the experimental variables. Typically the output of the function model.matrix (see the R package Causeur, David, Ching-Fan Sheu, and Mei-Chen Chu. "Significance analysis of ERP data." (2014).)

design0

Design matrix of the null model. Typically a submodel of the full model, obtained by removing columns from design. Default is NULL, corresponding to the model with no covariates. (see the R package Causeur, David, Ching-Fan Sheu, and Mei-Chen Chu. "Significance analysis of ERP data." (2014).)

...

Other parameters in erpfatest.

Value

Plot A "ggplot2" plot will automatically generate.

Test_Rst A same testing results of erpfatest.

Author(s)

Chi-Lin Yu <psychilinyu@gmail.com>, Ching-Fan Sheu <csheu@mail.ncku.edu.tw>

See Also

plot_tete plot_coord erpfatest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(DirectedForgetting)
time_pt <- seq(-200, 1000, 1)

dta_c <- DirectedForgetting %>%
         filter(Channel %in% c("FZ","CZ","PZ")) %>%
         droplevels()

plot_fa(data = dta_c, 
        frames = time_pt,
        channel = 5, subject = 1, uV = 6:1206, test = 4,
        mode = "test_signal",
        design = (~Subject + Condition), design0 = (~Subject), nbf = 5)

PsyChiLin/ERPplot documentation built on May 20, 2019, 3:34 p.m.