Package ERP. December 14, 2015



Similar documents
Package dunn.test. January 6, 2016

Statistical issues in the analysis of microarray data

False Discovery Rates

Package empiricalfdr.deseq2

The Bonferonni and Šidák Corrections for Multiple Comparisons

Simple Linear Regression Inference

Package HHG. July 14, 2015

Pearson's Correlation Tests

DEPARTMENT OF PSYCHOLOGY UNIVERSITY OF LANCASTER MSC IN PSYCHOLOGICAL RESEARCH METHODS ANALYSING AND INTERPRETING DATA 2 PART 1 WEEK 9

Multiple Linear Regression

MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS

Descriptive Statistics

Using R for Linear Regression

False discovery rate and permutation test: An evaluation in ERP data analysis

Section 13, Part 1 ANOVA. Analysis Of Variance

Cancer Biostatistics Workshop Science of Doing Science - Biostatistics

Regression Analysis: A Complete Example

Regression step-by-step using Microsoft Excel

Additional sources Compilation of sources:

A direct approach to false discovery rates

Package bigdata. R topics documented: February 19, 2015

Least Squares Estimation

Package EstCRM. July 13, 2015

STATISTICA Formula Guide: Logistic Regression. Table of Contents

Tests for Two Survival Curves Using Cox s Proportional Hazards Model

Gene Expression Analysis

2013 MBA Jump Start Program. Statistics Module Part 3

1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

Point Biserial Correlation Tests

Example: Credit card default, we may be more interested in predicting the probabilty of a default than classifying individuals as default or not.

Package changepoint. R topics documented: November 9, Type Package Title Methods for Changepoint Detection Version 2.

Final Exam Practice Problem Answers

Package neuralnet. February 20, 2015

Tutorial for proteome data analysis using the Perseus software platform

Two-Sample T-Tests Allowing Unequal Variance (Enter Difference)

Gene expression analysis. Ulf Leser and Karin Zimmermann

SAS Software to Fit the Generalized Linear Model

From Reads to Differentially Expressed Genes. The statistics of differential gene expression analysis using RNA-seq data

Statistical Analysis. NBAF-B Metabolomics Masterclass. Mark Viant

Package cpm. July 28, 2015

Package MDM. February 19, 2015

Chapter 13 Introduction to Linear Regression and Correlation Analysis

Regression Analysis (Spring, 2000)

Analysis of Variance. MINITAB User s Guide 2 3-1

Statistical Models in R

Two-Sample T-Tests Assuming Equal Variance (Enter Means)

Data Analysis Tools. Tools for Summarizing Data

Package erp.easy. September 26, 2015

MISSING DATA TECHNIQUES WITH SAS. IDRE Statistical Consulting Group

Didacticiel - Études de cas

Package ATE. R topics documented: February 19, Type Package Title Inference for Average Treatment Effects using Covariate. balancing.

Part 2: Analysis of Relationship Between Two Variables

Simple Regression Theory II 2010 Samuel L. Baker

Package dsstatsclient

HYPOTHESIS TESTING WITH SPSS:

Finding statistical patterns in Big Data

Generalized Linear Models

Multivariate Analysis of Variance (MANOVA)

MIC - Detecting Novel Associations in Large Data Sets. by Nico Güttler, Andreas Ströhlein and Matt Huska

Service courses for graduate students in degree programs other than the MS or PhD programs in Biostatistics.

Strong control, conservative point estimation and simultaneous conservative consistency of false discovery rates: a unified approach

Likelihood Approaches for Trial Designs in Early Phase Oncology

Study Guide for the Final Exam

False Discovery Rate Control with Groups

SCHOOL OF HEALTH AND HUMAN SCIENCES DON T FORGET TO RECODE YOUR MISSING VALUES

Minitab Tutorials for Design and Analysis of Experiments. Table of Contents

One-Way Analysis of Variance

Psychology 205: Research Methods in Psychology

Package SurvCorr. February 26, 2015

Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

POLYNOMIAL AND MULTIPLE REGRESSION. Polynomial regression used to fit nonlinear (e.g. curvilinear) data into a least squares linear regression model.

Acknowledgments. Data Mining with Regression. Data Mining Context. Overview. Colleagues

Non-Inferiority Tests for One Mean

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

II. DISTRIBUTIONS distribution normal distribution. standard scores

Package MixGHD. June 26, 2015

Statistical Functions in Excel

Applied Statistics. J. Blanchet and J. Wadsworth. Institute of Mathematics, Analysis, and Applications EPF Lausanne

How To Test For Significance On A Data Set

Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software

Fallback tests for co-primary endpoints

Principles of Hypothesis Testing for Public Health

Correlation and Simple Linear Regression

Testing for Lack of Fit

Premaster Statistics Tutorial 4 Full solutions

1. The parameters to be estimated in the simple linear regression model Y=α+βx+ε ε~n(0,σ) are: a) α, β, σ b) α, β, ε c) a, b, s d) ε, 0, σ

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

Package missforest. February 20, 2015

MULTIPLE REGRESSION EXAMPLE

Package lmertest. July 16, 2015

HYPOTHESIS TESTING: POWER OF THE TEST

Correlational Research

Package GSA. R topics documented: February 19, 2015

Transcription:

Type Package Package ERP December 14, 2015 Title Significance Analysis of Event-Related Potentials Data Version 1.1 Date 2015-12-11 Author David Causeur (Agrocampus, Rennes, France) and Ching-Fan Sheu (National Cheng- Kung University, Tainan, Taiwan) Maintainer David Causeur <david.causeur@agrocampus-ouest.fr> Description The functions provided in the package ERP are designed for the significance analysis of ERP data in a linear model framework. The possible procedures are either the collection of FDR or FWER controlling methods available in the generic function p.adjust, the same collection combined with a factor modeling of the time dependence among tests (see Sheu, Perthame, Lee and Causeur, 2016) and the Guthrie and Buchwald (1991) test. License GPL (>= 2) Imports fdrtool,mnormt NeedsCompilation no Repository CRAN Date/Publication 2015-12-14 17:19:08 R topics documented: ERP-package........................................ 2 erpavetest.......................................... 4 erpcz............................................. 6 erpfatest........................................... 7 erpplot............................................ 10 erptest............................................ 11 gbtest............................................ 13 simerp............................................ 15 Index 17 1

2 ERP-package ERP-package Significance analysis of ERP data Description The package provides multiple testing procedures designed for Event-Related Potentials (ERP) data in a linear model framework. These procedures are reviewed and compared in Sheu, Perthame, Lee and Causeur (2016). Some of the methods gathered in the package are the classical FDRand FWER-controlling procedures, also available using function p.adjust. The package also implements the Guthrie-Buchwald procedure (Guthrie and Buchwald, 1991), which accounts for the auto-correlation among t-tests to control erroneous detections of short intervals. The Adaptive Factor-Adjustment method is an extension of the method described in Causeur, Chu, Hsieh and Sheu (2012). It assumes a factor model for the correlation among tests and combines adptatively the estimation of the signal and the updtating of the dependence modelling (see Sheu et al., 2016 for further details). Details Package: ERP Type: Package Version: 1.0 Date: 2014-04-01 License: GPL (>=2) Apart from the function erpplot, which is just a wrapper for matplot to display the ERP curves, all the functions in the package implement multiple testing procedures of ERP data in a linear model framework (F-tests for the comparison of two nested models). The function gbtest implements the Guthrie-Buchwald procedure (see Guthrie and Buchwald, 1991). The function erptest can be used for the classical FDR- and FWER-controlling multiple testing of ERP data: especially the Benjamini-Hochberg (see Benjamini and Hochberg, 1995) and Benjamini-Yekutieli (see Benjamini and Yekutieli, 2001) procedures, with the possible extension proposed by Storey and Tibshirani (2003) including a non-parametric estimation of the proportion of true nulls. The function erpavetest first partition of the entire interval of ERP observations into a predetermined number equally-spaced intervals before performing siginificance testing using the averaged ERPs. Author(s) David Causeur, (Agrocampus, Rennes, France), Ching-Fan Sheu (National Cheng Kung University, Tainan, Taiwan), and Mei-Chen Chu (National Cheng Kung University, Tainan, Taiwan) Maintainer: David Causeur, http://math.agrocampus-ouest.fr/infogluedeliverlive/membres/david.causeur, mailto: david.causeur@agrocampus-ouest.fr

ERP-package 3 References Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 289-300. Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics 29, 1165-1188. Causeur, D., Chu, M.-C., Hsieh, S. and Sheu, C.-F. (2012). A factor-adjusted multiple testing procedure for ERP data analysis. Behavior Research Methods, 44, 635-643. Friguet, C., Kloareg, M. and Causeur, D. (2009). A factor model approach to multiple testing under dependence. Journal of the American Statistical Association, 104, 1406-1415. Guthrie, D. and Buchwald, J.S. (1991). Significance testing of difference potentials. Psychophysiology, 28, 240-244. Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6, 65-70. Hommel, G. (1988). A stagewise rejective multiple test procedure based on a modified Bonferroni test. Biometrika, 75, 383-386. Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika, 75, 800-803. Shaffer, J. P. (1995). Multiple hypothesis testing. Annual Review of Psychology, 46, 561-576. Sarkar, S. (1998). Some probability inequalities for ordered MTP2 random variables: a proof of Simes conjecture. Annals of Statistics, 26, 494-504. Sarkar, S., and Chang, C. K. (1997). Simes method for multiple hypothesis testing with positively dependent test statistics. Journal of the American Statistical Association, 92, 1601-1608. 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. Wright, S. P. (1992). Adjusted P-values for simultaneous inference. Biometrics, 48, 1005-1013. Examples ### simulated ERPs for 20 subjects (rows) and 251 ERPs measured at ### every 4 milliseconds plus a behavior score (columns) data(simerp) ### Plot raw ERP curves erpplot(simerp[,1:251],frames=seq(0,1001,4),xlab="time (ms)", ylab=expression(erp),col="black",main="simulated ERP") ### Test of averaged ERPs over a pre-determined number of equal intervals frames = seq(0,1001,4) tests = erpavetest(simerp[,1:251],design=model.matrix(~y,data=simerp)) plot(frames,sign(tests$signal)*sqrt(tests$r2),type="l",

4 erpavetest xlab="time (ms)",ylab="correlation",ylim=c(-1,1)) points(frames[tests$significant],rep(-1,length(tests$significant)), abline(v=frames[tests$breaks],lty=2,col="darkgray") title("simulation") ### Guthrie-Buchwald test 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)), title("simulation") ### Benjamini-Hochberg Significance testing tests = erptest(simerp[,1:251],design=model.matrix(~y,data=simerp)) 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)), title("simulation") ### AFA significance testing tests = erpfatest(simerp[,1:251],design=model.matrix(~y,data=simerp),nbf=5,min.err=1e-01,maxiter=10) 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)), title("simulation") erpavetest Significance testing of averaged ERPs. The entire ERP recording time is first partitioned into a pre-determined number of equal intervals. The averaged ERPs for each time intervals are the input for analysis. Description The function first calculates averaged ERP values within a predetermined number of equally-spaced intervals then tests for significance of the relationship between averaged ERPs and covariates in a linear model framework. Usage erpavetest(dta, design, design0 = NULL, nintervals = 10, method = "none", alpha = 0.05)

erpavetest 5 Arguments Value dta design design0 nintervals method Data frame containing the ERP curves: each column corresponds to a time frame and each row to a curve. Design matrix of the full model for the relationship between the ERP and the experimental variables. Typically the output of the function model.matrix 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. Number of intervals in the partition of the whole interval of observation. Default is 10. FDR- or FWER- controlling multiple testing procedures as available in the function p.adjust. Default is "none". alpha The FDR or FWER control level. Default is 0.05 pval correctedpval significant segments breaks test df1 df0 signal r2 p-values of the tests. Corrected p-values, for the multiplicity of tests. Depends on the multiple testing method (see function p.adjust). Indices of the time points for which the test is positive. Factor giving the membership of timepoints to each interval in the partition. Breakpoints of the partition. F-statistics. Residual degrees of freedom for the full model. Residual degrees of freedom for the null model. 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. R-squared values for each of the T linear models. Author(s) David Causeur - david.causeur@agrocampus-ouest.fr See Also erptest, erpfatest, gbtest, p.adjust, pval.estimate.eta0 Examples require(mnormt) require(fdrtool) data(erpcz) data(simerp)

6 erpcz # Paired t-tests for the comparison of ERP curves between two groups tests = erpavetest(erpcz[,1:251],design=model.matrix(~subject+instruction,data=erpcz), design0=model.matrix(~subject,data=erpcz)) 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)), abline(v=frames[tests$breaks],lty=2,col="darkgray") title("paired comparison at electrode CZ") # Tests for significance of correlations tests = erpavetest(simerp[,1:251],design=model.matrix(~y,data=simerp)) 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)), abline(v=frames[tests$breaks],lty=2,col="darkgray") title("simulation") erpcz ERP dataset from a directed forgetting experiment as presented in detail in Sheu, Perthame, Lee and Causeur (2016) Description Usage Format Details The experiment was conducted using an experimental paradigm similar to that described in Lee, Lee and Fawcett (2013). The objective of the study was to examine the electrophysiological process associated with directed forgetting. data(erpcz) 40 ERP curves obtained at electrode CZ for 20 subjects in two experimental conditions (TBR and TBF), each curve lasting for one thousand milliseconds (ms) with one record per 4ms. The last two columns, Subject and Instruction, provide the subject identifier and the group membership respectively. In the study phase of the experiment, 20 participants were instructed (with a + or X cue, respectively) to either remember or forget a stimulus word that was presented on a computer screen. ERPs were recorded throughout each of 90 trials - half for to-be-remembered (TBR) and half for

erpfatest 7 to-be-forgotten (TBF). ERPs from nine electrode positions - 3 each from frontal, central and posterior regions - during the study phase were analyzed. The curent dataset provides the ERP curves at electrode CZ (central on the miline). The corresponding experimental covariates (subject and instruction) are provided in the last two columns. Source Sheu, C.-F., Perthame, E., Lee Y.-S. and Causeur, D. 2016. Accounting for time dependence in large-scale multiple testing of event-related potential data. To appear in Annals of Applied Statistics. References Lee, Y-S., Lee, H.M., Fawcett, J.-M. (2013). Intentional forgetting reduces color-naming interference: evidence from item-method directed forgetting. Journal of Experimental Psychology. Learning, Memory and Cognition, 39 (1), 220-236. Examples data(erpcz) erpplot(erpcz[,1:251],frames=seq(0,1001,4),xlab="time (ms)", ylab="erp",main="erp at electrode CZ") erpfatest Adaptive Factor-Adjustement for multiple testing of ERP data Description An adaptive factor-adjusted FDR- and FWER-controlling multiple testing procedures for ERP data. The procedure is described in detail in Sheu, Perthame, Lee, and Causeur (2016). Usage erpfatest(dta, design, design0 = NULL, method = "BH", nbf = NULL, nbfmax = 15, alpha = 0.05, pi0 = 1, wantplot = FALSE, s0 = NULL, min.err = 0.001, maxiter = 5, verbose = FALSE) Arguments dta design design0 Data frame containing the ERP measurements: each column corresponds to a time frame and each row to a curve. Design matrix of the full model for the relationship between the ERP and the experimental variables. Typically the output of the function model.matrix 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.

8 erpfatest method nbf nbfmax FDR- or FWER- controlling multiple testing procedures as available in the function p.adjust. Default is "BH", for the Benjamini-Hochberg procedure (see Benjamini and Hochberg, 1995). Number of factors in the residual covariance model. Default is NULL: the number of factors is determined by minimization of the variance inflation criterion as suggested in Friguet et al. (2009). Only required if nbf=null. The largest possible number of factors. alpha The FDR or FWER control level. Default is 0.05 pi0 wantplot s0 Details Value min.err An estimate of the proportion of true null hypotheses, which can be plugged into an FDR controlling multiple testing procedure to improve its efficiency. Default is 1, corresponding to the classical FDR controlling procedures. If NULL, the proportion is estimated using the function pval.estimate.eta0 of package fdrtool, with the method proposed by Storey and Tibshirani (2003). If TRUE, a diagnostic plot is produced to help choosing the number of factors. Only active if nbf=null. Prior knowledge of the time frames for which no signal is expected. For example, s0=c(1:50, 226:251) specifies that the first 50 time frames and time frames between 226 and 251 are known not to contain ERP signal. s0 can also be specified by giving the lower and upper fraction of the entire time interval in which the signal is to be searched for. For example: s0=c(0.2, 0.9) means that ERP signals are not expected for for the first 20 percent and last 10 percent of the time frames measured. Defaul is NULL and it initiates a data-driven determination of s0. Control parameter for convergence of the iterative algorithm. Default is 1e-03. maxiter Maximum number of iterations in algorithms. Default is 5. verbose If TRUE, details are printed along the iterations of the algorithm. Default is FALSE. The method is described in Sheu et al. (2016). It combines a decorrelation step based on a regression factor model as in Leek and Storey (2008), Friguet et al. (2009) or Sun et al. (2012) with an adaptive estimation of the ERP signal. The multiple testing corrections of the p-values are described in the help documentation of the function p.adjust of package stats. pval correctedpval significant pi0 test p-values of the Adaptive Factor-Adjusted tests. Corrected p-values, for the multiplicity of tests. Depends on the multiple testing method (see function p.adjust). Indices of the time points for which the test is positive. Value for pi0: if the input argument pi0 is NULL, the output is the estimated proportion of true null hypotheses using the method by Storey and Tibshirani (2003). Factor-Adjusted F-statistics.

erpfatest 9 df1 df0 nbf signal r2 Residual degrees of freedom for the full model. Residual degrees of freedom for the null model. Number of factors for the residual covariance model. 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. R-squared values for each of the T linear models. Author(s) David Causeur - david.causeur@agrocampus-ouest.fr References Causeur, D., Chu, M.-C., Hsieh, S., Sheu, C.-F. 2012. A factor-adjusted multiple testing procedure for ERP data analysis. Behavior Research Methods, 44, 635-643. Friguet, C., Kloareg, M., Causeur, D. 2009. A factor model approach to multiple testing under dependence. Journal of the American Statistical Association, 104, 1406-1415. Leek, J.T., Storey, J.D. 2008. A general framework for multiple testing dependence. Proceedings of the National Academy of Sciences of the United States of America, 105, 18718-18723. Sheu, C.-F., Perthame, E., Lee Y.-S. and Causeur, D. 2016. Accounting for time dependence in large-scale multiple testing of event-related potential data. To appear in Annals of Applied Statistics. Storey, J. D., Tibshirani, R. 2003. Statistical significance for genome-wide experiments. Proceedings of the National Academy of Sciences of the United States of America, 100, 9440-9445. Sun, Y., Zhang, N.R., Owen, A.B. 2012. Multiple hypothesis testing adjusted for latent variables, with an application to the AGEMAP gene expression data. The Annals of Applied Statistics, 6, no. 4, 1664-1688. See Also erpavetest, erptest, gbtest, p.adjust, pval.estimate.eta0 Examples require(mnormt) require(fdrtool) data(erpcz) data(simerp) # Paired t-tests for the comparison of ERP curves between two groups tests = erpfatest(erpcz[,1:251],design=model.matrix(~subject+instruction,data=erpcz), design0=model.matrix(~subject,data=erpcz),nbf=3,s0=c(1:50,226:251),min.err=1e-01) 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)),

10 erpplot title("paired comparison at electrode CZ") # Tests for significance of correlations tests = erpfatest(simerp[,1:251],design=model.matrix(~y,data=simerp), nbf=5,min.err=1e-01,maxiter=10) 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)), title("simulation") erpplot Plot of ERP curves. Description Usage Wrapper for matplot (package graphics) to display ERP curves. erpplot(dta, frames = NULL, ylim = NULL,...) Arguments Value dta frames ylim Data frame containing the ERP curves: each column corresponds to a time frame and each row to a curve. Sequence of time frames. Default is NULL, in which case frames is just the sequence of intergers between one and the total number of frames. Limits for the y-axis. Default is NULL (set into the function).... Graphical parameters (see par) and any further arguments of plot, typically plot.default, may also be supplied as arguments to this function. Hence, the high-level graphics control arguments described under par and the arguments to title may be supplied to this function. The function generates a plot, but does not return any other numerical outputs. Author(s) David Causeur (Agrocampus, Rennes, France), Ching-Fan Sheu (National Cheng-Kung University, Tainan, Taiwan) and Mei-Chen Chu (National Cheng-Kung University, Tainan, Taiwan) See Also matplot

erptest 11 Examples data(erpcz) erpplot(erpcz[,1:251],frames=seq(0,1001,4),xlab="time (ms)", ylab="erp",main="erp at electrode CZ") data(simerp) erpplot(simerp[,1:251],frames=seq(0,1001,4),xlab="time (ms)", ylab="erp",main="simulated ERP") erptest FDR- and FWER-controlling Multiple testing of ERP data Description Classical FDR- and FWER-controlling multiple testing procedures for ERP data in a linear model framework. Usage erptest(dta, design, design0 = NULL, method = "BH", alpha = 0.05, pi0 = 1) Arguments dta design design0 method Data frame containing the ERP curves: each column corresponds to a time frame and each row to a curve. Design matrix of the full model for the relationship between the ERP and the experimental variables. Typically the output of the function model.matrix 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. FDR- or FWER- controlling multiple testing procedures as available in the function p.adjust. Default is "BH", for the Benjamini-Hochberg procedure (see Benjamini and Hochberg, 1995). alpha The FDR or FWER control level. Default is 0.05 pi0 An estimate of the proportion of true null hypotheses, which can be plugged into an FDR controlling multiple testing procedure to improve its efficiency. Default is 1, corresponding to the classical FDR controlling procedures. If NULL, the proportion is estimated using the function pval.estimate.eta0 of package fdrtool, with the method proposed by Storey and Tibshirani (2003). Details The multiple testing corrections of the p-values are described in the help documentation of the function p.adjust du package stats.

12 erptest Value pval correctedpval significant pi0 test df1 df0 signal r2 p-values of the tests. Corrected p-values, for the multiplicity of tests. Depends on the multiple testing method (see function p.adjust). Indices of the time points for which the test is positive. Value for pi0: if the input argument pi0 is NULL, the output is the estimated proportion of true null hypotheses using the method by Storey and Tibshirani (2003). F-statistics. Residual degrees of freedom for the full model. Residual degrees of freedom for the null model. 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. R-squared values for each of the T linear models. Author(s) David Causeur - david.causeur@agrocampus-ouest.fr References Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 289-300. Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics 29, 1165-1188. Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6, 65-70. Hommel, G. (1988). A stagewise rejective multiple test procedure based on a modified Bonferroni test. Biometrika, 75, 383-386. Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika, 75, 800-803. Shaffer, J. P. (1995). Multiple hypothesis testing. Annual Review of Psychology, 46, 561-576. Sarkar, S. (1998). Some probability inequalities for ordered MTP2 random variables: a proof of Simes conjecture. Annals of Statistics, 26, 494-504. Sarkar, S., and Chang, C. K. (1997). Simes method for multiple hypothesis testing with positively dependent test statistics. Journal of the American Statistical Association, 92, 1601-1608. Sheu, C.-F., Perthame, E., Lee Y.-S. and Causeur, D. (2016). Accounting for time dependence in large-scale multiple testing of event-related potential data. To appear in Annals of Applied Statistics. See Also Wright, S. P. (1992). Adjusted P-values for simultaneous inference. Biometrics, 48, 1005-1013. erpavetest, erpfatest, gbtest, p.adjust, pval.estimate.eta0

gbtest 13 Examples require(mnormt) require(fdrtool) data(erpcz) data(simerp) # Paired comparison of ERP curves tests = erptest(erpcz[,1:251],design=model.matrix(~subject+instruction,data=erpcz), design0=model.matrix(~subject,data=erpcz)) 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)), title("paired comparison at electrode CZ") # Independent two-group comparison of ERP curves tests = erptest(erpcz[,1:251],design=model.matrix(~instruction,data=erpcz)) 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)), title("independent comparison at electrode CZ") # Tests for significance of correlations tests = erptest(simerp[,1:251],design=model.matrix(~y,data=simerp)) 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)), title("simulation") gbtest 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.

14 gbtest Usage gbtest(dta, design, design0 = NULL, graphthresh = 0.05, nbsamples = 1000) Arguments dta design design0 graphthresh nbsamples Data frame containing the ERP curves: each column corresponds to a time frame and each row to a curve. Design matrix of the full model for the relationship between the ERP and the experimental variables. Typically the output of the function model.matrix 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. 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. 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 significant signal rho r2 List of length nbsignifintervals which components give the indices of each significant intervals. Indices of the time points for which the test is positive. 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. Estimated lag-1 auto-correlation. 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)

simerp 15 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. See Also erpavetest, erpfatest, erptest Examples require(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)), 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)), title("simulation") simerp ERP dataset from a simulation study presented in detail in Sheu, Perthame, Lee and Causeur (2016) Description The dataset contains 20 ERP curves (time frames every 4 ms from 0 to 1000 ms) and a variable y for behavioral score.

16 simerp Usage Format Details Source data(simerp) A sample of 20 simulated ERP curves, each curve lasting for one thousand milliseconds (ms) with one record per 4ms. The last column gives a behavioral score for the directed forgetting experiment described in Sheu, Perthame, Lee and Causeur (2016). The dataset is simulated under assumption of a multivariate regression model with normal residuals. The covariate, y, is a recognition score, as observed in a directed forgetting experiment described in Sheu, Perthame, Lee and Causeur (2016). Only the slope coefficients corresponding to time points in the interval [450 ms ; 550 ms] are true non-nulls, with a peak at 500 ms. The residual covariance of the model mimics the sample residual covariance of the ERP datasets collected in the directed forgetting experiment. Sheu, C.-F., Perthame, E., Lee Y.-S. and Causeur, D. 2016. Accounting for time dependence in large-scale multiple testing of event-related potential data. To appear in Annals of Applied Statistics. Examples data(simerp) erpplot(simerp[,1:251],frames=seq(0,1001,4),xlab="time (ms)", ylab="erp",main="simulated ERP")

Index Topic ERP data erpavetest, 4 erpfatest, 7 erptest, 11 Topic ERP ERP-package, 2 gbtest, 13 Topic FDR erpavetest, 4 erpfatest, 7 erptest, 11 Topic Factor-adjustment erpfatest, 7 Topic Guthrie-Buchwald procedure gbtest, 13 Topic Multiple testing erpavetest, 4 erpfatest, 7 erptest, 11 gbtest, 13 Topic datasets erpcz, 6 simerp, 15 Topic package ERP-package, 2 Topic significance analysis ERP-package, 2 pval.estimate.eta0, 5, 9, 12 simerp, 15 ERP (ERP-package), 2 ERP-package, 2 erpavetest, 4, 9, 12, 15 erpcz, 6 erpfatest, 5, 7, 12, 15 erpplot, 10 erptest, 5, 9, 11, 15 gbtest, 5, 9, 12, 13 matplot, 10 p.adjust, 5, 9, 12 17