R: The Guthrie-Buchwald procedure for significance analysis of...
gbtest
R Documentation
The Guthrie-Buchwald procedure for significance analysis of ERP data
Description
Monte-Carlo implementation of the Guthrie-Buchwald procedure (see Guthrie and Buchwald, 1991) which accounts for the
auto-correlation among test statistics to control erroneous detections of short intervals.
Data frame containing the ERP curves: each column corresponds to a time frame and each row to a curve.
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
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.
graphthresh
Graphical threshold (see Guthrie and Buchwald, 1991). Default is 0.05. As the FDR control level, the smaller is the graphical threshold, the more conservative is the
procedure.
nbsamples
Number of samples in the Monte-Carlo method to estimate the residual covariance. Default is 1000.
Details
The Guthrie-Buchwald method starts from a preliminary estimation of r, the lag-1 autocorrelation, among test statistics.
Then, the null distribution of the lengths of the intervals $I_alpha = t : pvalue_t <= alpha $, where alpha is the
so-called graphical threshold parameter of the method, is obtained using simulations of p-values $p_t$ associated to
auto-regressive t-test process of order 1 with mean 0 and auto-correlation r. Such an interval $I_alpha$ is declared
significant if its length exceeds the $(1-alpha)-$quantile of the null distribution. Note that the former method is
designed to control erroneous detections of short significant intervals but not to control any type-I error rate.
Value
nbsignifintervals
Number of significant intervals.
intervals
List of length nbsignifintervals which components give the indices of each significant intervals.
significant
Indices of the time points for which the test is positive.
signal
Estimated signal: a pxT matrix, where p is the difference between the numbers of parameters in the full and null models and T the number of frames.
rho
Estimated lag-1 auto-correlation.
r2
R-squared values for each of the T linear models.
Author(s)
David Causeur - david.causeur@agrocampus-ouest.fr and Mei-Chen Chu (National Cheng-Kung University, Tainan, Taiwan)
References
Guthrie, D. and Buchwald, J.S. (1991). Significance testing of difference potentials. Psychophysiology, 28, 240-244.
Sheu, C.-F., Perthame, E., Lee Y.-S. and Causeur, D. (2016). Accounting for time dependence in large-scale multiple testing of event-related potentials data. To appear in Annals of Applied Statistics.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ERP)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ERP/gbtest.Rd_%03d_medium.png", width=480, height=480)
> ### Name: gbtest
> ### Title: The Guthrie-Buchwald procedure for significance analysis of ERP
> ### data
> ### Aliases: gbtest
> ### Keywords: ERP Guthrie-Buchwald procedure Multiple testing
>
> ### ** Examples
>
> require(mnormt)
Loading required package: mnormt
> data(erpcz)
> data(simerp)
>
> # Paired comparison of ERP curves
>
> tests = gbtest(erpcz[,1:251],design=model.matrix(~Subject+Instruction,data=erpcz),
+ design0=model.matrix(~Subject,data=erpcz),nbsamples=500)
>
> frames = seq(0,1001,4)
> plot(frames,tests$signal,type="l",xlab="Time (ms)",
+ ylab="Difference ERP curves")
> points(frames[tests$significant],rep(0,length(tests$significant)),
+ pch=16,col="blue")
> title("Paired comparison at electrode CZ")
>
> # Tests for significance of correlations
>
> tests = gbtest(simerp[,1:251],design=model.matrix(~y,data=simerp),nbsamples=500)
> plot(frames,sign(tests$signal)*sqrt(tests$r2),type="l",xlab="Time (ms)",
+ ylab="Correlation",ylim=c(-1,1))
> points(frames[tests$significant],rep(-1,length(tests$significant)),
+ pch=16,col="blue")
> title("Simulation")
>
>
>
>
>
> dev.off()
null device
1
>