Abstract
Electrophysiological research with event-related brain potentials (ERPs) in vision is increasingly moving from simple, strictly orthogonal stimulation paradigms towards complex, quasi-experimental designs and naturalistic situations that involve fast, multisensory stimulation and complex motor behavior. Previously, we described a framework to model (potentially confounding) ERP overlap and to statistically control for biased covariate-distributions. Examples for such situations can be found in classical reaction-time experiments, where stimulus and response ERPs overlap in time. Further in combined EEG/eye-tracking experiments during natural vision where fixation-ERPs overlap with each other, in fast multisensory stimulation experiments, movie-watching or in mobile brain/body imaging studies. Here, we introduce Unfold.jl, a reimplementation of our MatLab unfold toolbox in the open-source programming language Julia. Unfold.jl supports both, mass univariate linear models and time-regression (deconvolution) models. It further allows to fit factorial designs and continuous regressors (with or without spline-regression), estimating all of these as either linear models or linear mixed models (LMMs), with LMMs being one of the main advantages over the MatLab implementation. All models can be easily constructed using the popular formula-interface. Wrappers for Python and R exist. Due to an improved modular design of the toolbox we now support custom basis functions, for example HRF-, SCR- or pupil basis functions which complement the default non-structured FIR basis functions. This allows the user to easily apply the same analysis framework to other timeseries signals. The open-source toolbox with documentation and unit-tests is freely available at https://github.com/unfoldtoolbox/unfold.jl.