Single-Trial Parametric Effect Coding in Single-Study General Linear Model (SS-GLM): Adding “external” factors to the SS-GLM parametric analysis via the extended stimulation protocol and the design matrix builder in BrainVoyager
BrainVoyager version: 22.4.4
Dataset used: simulated data
The protocol file (*.prt) contains all relevant information about the experimental design needed to start a general linear model (GLM) analysis in BrainVoyager. All this information is essential to define the time-course model parameters in a GLM analysis.
When preparing a single-study GLM (SS-GLM) using a task stimulation protocol file (*.prt), the transformation of a PRT condition to (a) GLM predictor(s) in BrainVoyager can be adapted by the user to model the effects that are of main interest for the statistical analysis.
There are four different options for automatic coding of protocol information directly to a GLM design matrix:
- 1-factor design with dummy coding (default)
- 1-factor design with effect coding
- 2-factor design.
- Deconvolution design.
In a 1-factor design with “dummy coding” (default) all but one condition (assuming a baseline condition is included as a first or last condition in the PRT) are one-to-one coded as GLM predictors, which will be 1 during the condition intervals and 0 elsewhere (“box-car” function).
A 1-factor design with “effect coding” assumes that each non-baseline condition produces a separate predictor expressing the difference between this condition and the baseline condition. A variant of the effect coding entails setting up a free coding of multiple conditions in each predictor by manually specifying arbitrary “weights” (via CTRL-right-click) for each condition during a manual definition of the design matrix.
In a 2-factor design the default effect coding is extended from one factor to two factors with the additional option of coding two-factor interactions in extra predictors (i.e. a box-car predictor which is “active” during intervals of activity of one condition and not others and vice versa).
Independently of the condition-to-predictor coding, when building 1- or 2-factor design matrices, the HRF is normally (default) applied (i. e. linear convolution) to the box-car functions.
An alternative to using box-car functions and convolution is the deconvolution design. In this approach, the response to each set of stimuli for each condition can be deconvolved from the data. In fact, in “deconvolution” mode the design builder implements a finite impulse response (FIR) modeling of the event-related responses and each (non-baseline) condition generates a set of stick predictors coding separately the single delays starting from the condition interval onsets.
After GLM estimation, the statistical analysis ends up in translating any linear contrast (e.g. any linear combination of the estimates) into a null hypothesis test of the effects of interest versus 0.
In many circumstances, a parametric question to the data is posed that involves an extra-factor which does not correspond to any of the protocol conditions (e.g. stimulus types). This is the case for pure parametric designs where a “graded” stimulus (e.g. lights of variable intensity) is delivered to the participant or when one wants to model the influence or modulation of confound or behavioral extra-factors (e.g. habituation, reaction times, etc …). How can this be handled in the framework of GLM? How can we optimally integrate some external information from a stimulus grading or an external factor in BrainVoyager?
In all these cases, we are still having a standard one factor (stimulus) design but we would like to explicitly test the presence (and the statistical significance) of any possible continuous or categorical effect on the BOLD response amplitude which could be easily interpreted as a parametric “grading” or “modulation” of the response.
We will show below through a simulation how a generic parametric effect by an extra-factor can be tested in BrainVoyager. We will consider the most general and interesting case that the parametric effect is modeled at the single-trial level.
Although the parametric effect influences the way the conditions and intervals are coded in a design matrix, the most general and portable solution for specifying and storing the values of a parametric extra-factor is not in the SS-GLM but already in the stimulation protocol file (see figure below).
Weights for the modulation of the predictors and therefore the parametric effect coding can be specified not only in the SS-GLM design matrix builder but also in an extended version of the stimulation protocol. The major advantage of this choice consists in the fact that while in the SS-GLM weights can be assigned to single conditions (i.e. normally groups of trials), in the stimulation protocol different weights can be assigned to all single trials of each condition (see figure above).
In standard mode, the design matrix builder of BrainVoyager will detect the presence of weight definitions inside the protocols and besides generating a standard “dummy” coded predictor for each non-baseline condition ('Main'), will also generate a “parametrically” coded predictor where each weight will differentially modulate the box car function of the standard predictor ('Parametric'). As an example, the figure below shows a simple case with two stimulus types and two modulation types (a linear and non-linear one).
In the example above a direct parametric effect coding is shown with the weights specified in the stimulation protocol directly used inside the predictors.
Although this type of parametric effect coding is highly intuitive (i. e. directly visualize in separate predictors a non-modulated and a modulated effect), we will show with the aid of a simplistic simulated dataset that in most cases of interest this approach is not optimal in the sense of specificity, i.e. for “isolating” from noise regions of activity with statistically significant modulation by an extra-factor.
Simulation
A new simulated data set was created where the model signals in the figure presented above where “injected” in two separated regions.
The figure below shows the average time-courses of these regions with linearly (left) and non-linearly (right) modulated activity.
Let us now run a Single Study-GLM analysis using the design matrix builder but considering not one but two alternative ways of coding the parametric effect. One way is using the same weight for the box-car function as shown above. Another way is subtracting the mean weight before applying the modulation to the box-car function (see figure below).
Please note: it is possible to control the creation of the parametric predictor by the design matrix builder as shown in the first figure (“Use weights as defined”) or the current figure (“Subtract mean of weights”) in the options of the Single-Study GLM Options (see figure below).
The reason why we use de-meaned weights is that this way we can avoid the partial co-linearity between main and parametric predictors in the SS-GLM design matrix. The solution in the first approach using the same same weights as defined in the protocol is redundant with regards to this aspect. In fact, since the design matrix is not orthogonal, the parametric predictor will be able to explain a substantial part of the variance regardless of the real parametric effect size. With such co-linear predictors, the isolation of parametrically responding regions becomes more problematic, especially when the parametric effect size is relatively small. The solution with de-meaned weights ensures that the correlation between main and parametric predictors is zero (i.e. the two predictors will be orthogonal). In this case, while the detection power (sensitivity) of the method cannot change (because this is related to the signal-to-noise ratio), we will have a powerful method to isolate truly modulated regions via a conjunction analysis of the main predictor and the parametric predictor that now carry complementary information.
We will show here why the solution of subtracting the mean of the weight series before creation of the predictors should be preferred whenever the focus is on isolating the modulated regions (and therefore why this solution is checked by default in BrainVoyager for single-trial parametric effect coding).
The figure below illustrates two scenarios for the analysis of the simulated data set. Specifically, we can notice that when performing the SS-GLM with the two approaches and selecting the main effect of the parametric predictor, the two resulting t-maps are almost identical. We have deliberately chosen here a very low threshold (p=0.05 uncorrected) to explore what will turn out to be an issue of specificity with respect to parametric effect given that our model cannot have an impact on the sensitivity level. The “true” region of modulated activation is shown beneath the crosshair. Besides a true parametric effect detected, we can easily observe other noisy spots detected at this threshold (false negatives). The false negatives are here due to the fact that the noise fluctuations can easily fit the modulation in the absence of a main response and, unfortunately, this fit can be as good as for the true modulation.
One concrete chance we have to isolate the true modulation effects from the noise is to require that the region respond not only to the modulation but also to the standard main response, in a conjunction analysis. This can be easily obtained by creating two contrasts, one for the main and one for the parametric predictor in the Overlay GLM dialog and specifying a conjunction analysis.
In the next figure the outcome of this conjunction analysis is presented at the same threshold as in the figure shown above.
Keeping the same threshold, it is easy to recognize that while all activation spots are lost for the non-orthogonal case (left), only the true modulated region survives the new conjunction test for the orthogonal case (right), whereas all false negative modulated spots are lost.
A region of interest analysis in the true modulated region highlights the underlying reason for this modulation effect becoming selective in the conjunction analysis with the orthogonal but not with the non-orthogonal design. Namely, the non-orthogonal design (with the same weights as in the PRT) explains all variance in the parametrically modulated region with one predictor only (the main is not significant) and makes the isolation of the two contributions impossible or not easy. Conversely, the orthogonal design shows that both the main and the modulation effect are significant in the truly parametric region, but not in the noise regions. That’s why we can exploit the conjunction test to increase the specificity of our design.
In this example, we manually controlled the scale of the parametric factor. In some applications we might want to use an external measure as extra-factor (e.g. reaction times, physiological responses, ratings, etc ...). In all cases where the extra-factor is not controlled by the user but it is rather derived from the data it might be necessary, besides removing the mean, to scale the weights to their standard deviation across trials. This can be accomplished by checking the third option for the creation of parametric predictors (“standardize weights”).
Note: The creation of parametric single study design matrices (SDMs) from weighted PRTs in BrainVoyager is currently not possible via scripting. However, an example script for automated SDM creation using also extended PRTs can be found in bvbabel (read_prt_write_sdm).