Linking neurophysiological processes of action monitoring to post-response speed-accuracy adjustments in a neuro-cognitive diffusion model

The cognitive system needs to continuously monitor actions and initiate adaptive measures aimed at increasing task performance and avoiding future errors. To investigate the link between the contributing cognitive processes, we introduce the neuro-cognitive diffusion model, a statistical approach that allows a combination of computational modelling of behavioural and electrophysiological data on a single-trial level. This unique combination of methods allowed us to demonstrate across three experimental datasets that early response monitoring (error negativity; Ne/c) was related to more response caution and increased attention on task-relevant features on the subsequent trial, thereby preventing future errors, whereas later response monitoring (error positivity, Pe/c) maintained the ability of responding fast under speed pressure. Our results suggest that Pe/c-related processes might keep Ne/c-related processes in check regarding their impact on post-response adaptation to reconcile the conflicting criteria of fast and accurate responding.


Introduction
Human beings have to adapt their behaviour immediately in response to myriad events, often finding themselves in situations in which they have to reconcile conflicting goals in order to ensure optimal future behaviour. For example, in many contexts, it is desirable to respond as fast as possible while also making sure that the intended response is flawlessly executed (a dilemma termed speedaccuracy trade off; Fitts, 1966 ;Wickelgren, 1977 ). To this end, the cognitive system continuously monitors actions for goal achievement ( Yeung and Summerfield, 2012 ) and takes corrective measures if necessary ( Maier et al., 2011 ). To increase the still limited knowledge about the link between monitoring a response outcome and the subsequent adaptation, electrophysiological indicators such as the error negativity (Ne; Falkenstein et al., 1991 ;Gehring et al., 1993 ), its equivalent in correct trials, the correct response negativity (Nc; Vidal et al., 2003 ; or Ne/c), and the error positivity (Pe; Pc for correct trials; or Pe/c) have been used. These components of the event-related potential (ERP) -with a peak 100 and 250 ms after a response, respectively ( Gehring et al., 2012 ) -are usually quantified in averaged waveforms, which makes a joint investigation of neural markers and behaviour on a trial-by-trial basis within computational cognitive models impossible.
On the behavioural level, corrective measures after imprecise actions, so-called post-response adaptation, are often indicated by posterror slowing (PES), i.e. increased response times (RTs) following er- Fig. 1. A neuro-cognitive diffusion model (NCDM) for adaptive behaviour A model that statistically links post-response adaptation in two subsequent trials on three conceptual levels (neural, cognitive, and behavioural) on a single-trial basis. Trial n provides the predictors for the statistical model, i.e. the response type (error vs. correct) and indicators of subsequent action monitoring (Ne/c and Pe/c amplitude). Trial n + 1 provides the criteria for the statistical model, i.e. the post-response time and the post-response accuracy. Furthermore, the response on trial n + 1 is modelled mathematically in terms of the diffusion model ( Ratcliff and McKoon, 2008 ), the parameters of which also serve as criteria for the statistical model.
should be reflected by a drift rate decrease in the following trial (see also Dutilh et al., 2012 ). Controlled PRAM, such as increased response caution, should be reflected in an increased decision threshold, while a retooled task-set should lead to an increased drift rate.
We aimed to elucidate the complex nature of behavioural adaptation by linking neural indicators of action monitoring to indicators of PRAM derived from computational modelling on a trial-by-trial basis within one model ( Fig. 1 ). If it was possible to predict the DM parameters by the single-trial Ne/c and the single-trial Pe/c of the preceding trial, we would be able to more thoroughly understand the mechanisms underlying post-response adaptation and its relation to preceding action monitoring. To this end, we reanalysed data of a flanker task (Base Dataset: published in Stahl et al., 2015 ) and two additional datasets (Speed Dataset and Accuracy Dataset: Bode and Stahl, 2014 ;Kummer et al., 2020 ) that served for replication attempts. We obtained single-trial estimates of the ERP amplitudes by employing a combination of wavelet filtering and multiple linear regression to model the singletrial signal ( Hu et al., 2011 ). We then used a (Bayesian) multilevel approach to predict the RT, response accuracy, and diffusion model indicators of PRAM (i.e. drift rate, decision threshold, non-decision time) of a given trial by the response type (error vs. correct), Ne/c, and Pe/c amplitudes of the preceding trial ( Fig. 1 ). This elaborate approach allowed us to thoroughly investigate the link between action monitoring and post-response adaptation.

Participants
Prior to the study's conduction, ethical approval was given by the ethics committee of the German Psychological Society (DGPs). A total of 94 participants took part in the original study ( Stahl et al., 2015 ). Five participants had to be excluded from the subsequent analyses because, after the trial selection criteria had been applied (see below), they did not have any error trials left and were thus lacking one condition. The final sample comprised 89 participants (age: M = 24.15, SD = 5.29 years; 40 males, 49 females).

Procedure and experimental task
The exact procedure is described in Stahl et al. (2015) . Here, we only present the aspects that are relevant to the purpose of this paper.
Participants completed an Eriksen flanker task ( Eriksen and Eriksen, 1974 ). On each trial, one of four stimuli (HHHHH, SSSSS, HHSHH, or SSHSS) was presented and participants were instructed to respond to the central letter as fast and accurately as possible by pressing the corresponding key with one index finger. The stimulus-response assignment was balanced across participants. The stimulus was presented for 84 ms and the participants had a maximum time window of 1000 ms to give their response. After the time window had terminated, a feedback was displayed for 400 ms informing the participants whether their response was right, wrong, or too slow (for more details on the feedback, see Stahl et al., 2015 ). The next trial began after 200 ms. Participants completed eight blocks of 48 trials.

Trial selection
Following Schiffler et al. (2017) , we only analysed trials that were preceded by two correct responses. This approach ensured that our results were not biased by successive errors. In addition to this restriction, we could only analyse artefact-free trials. We only analysed trials X and P that were part of the following sequence: CCXP, where C indicates a correct response, X indicates the correct or incorrect reference trial (providing the predictors: response type on trial n , Ne/c amplitude, and Pe/c amplitude), and P indicates the post-response trial (providing the criteria: RT and response accuracy on trial n + 1).
Trials with an RT greater than 1000 ms were excluded from the analyses, regardless of the trial type (C, X, or P in the terms defined above). Furthermore, for each participant, we excluded trials P with a log-transformed RT above/below the mean of the log-transformed RT ± three standard deviations ( Voss et al., 2015 ). With this approach, we aimed to reduce the impact of RT outliers, which is especially problematic for diffusion model analyses ( Voss et al., 2015 ). After the trial selection, on average, 218 trials per participant ( SD = 69.51) were left for the analyses (about 57% of all trials).

Electroencephalography recording and data preprocessing
The electroencephalography (EEG) signal was recorded at 61 scalp electrode sites at a sampling rate of 500 Hz using active Ag/AgCl electrodes (Brain Products) and a BrainAmp DC amplifier (Brain Products; for more details, see Stahl et al., 2015 ). The electrodes were referenced against the left mastoid.
The preprocessing of the EEG data was done with BrainVision analyser 2.0 software (Brain Products). First, a DC detrend correction was applied to the continuous EEG signal. Next, the data was epoched starting 100 ms before response onset and ending 900 ms after response onset. Then, a baseline correction (-100 to 0 ms) and ocular correction ( Gratton et al., 1983 ) were applied to the epochs. Finally, after a second baseline correction (because the ocular correction violated the baseline), epochs in which the EEG signal at the FCz or Cz site was greater than ± 150 V were removed.

Single trial ERP estimates
To obtain the single trial estimates for the Ne/c and Pe/c amplitude, we employed a method introduced by Hu et al. (2010) . First, we denoised the data using a wavelet filter. Next, we estimated single trial peaks by performing a method denoted as multiple linear regression with distortion parameter by Hu et al. (2011 ;see also Hu et al., 2010 ;Mayhew et al., 2006 ; for details, see below). Both steps were conducted in the MATLAB toolbox Letswave 6 ( Moureaux et al., 2016 ), and only the EEG signal recorded at the FCz and Cz sites -where neural correlates of error processing are usually investigated ( Overbeek et al., 2005 ;Wessel, 2012 ) -was used.
In order to remove all signals that were not systematically linked to processes related to the experimental task, specifically to error processing, we built a wavelet filter based on all error trials covering the frequencies from 1 to 30 Hz in steps of 0.3 Hz and with the Letswave default cutoff of 0.85 (ranging from 0 to 1.0; Hu et al., 2010 ). While raising this cutoff would have increased the specificity (i.e. even more noise would have been removed at the cost of also removing EEG signals of interest), decreasing the cutoff would have increased the sensitivity (i.e. even fewer EEG signals of interest would have been removed at the cost of not removing large parts of the noise). The cutoff of 0.85 aimed to maintain a good balance between sensitivity and specificity (i.e. 0 and 1, respectively). This filter (see fourth column of Fig. 2 ) was then applied to both the error trials and the correct trials. This procedure was performed for the FCz and Cz site separately.
Next, we modelled the filtered single trial signal using the multiple linear regression method proposed by Mayhew et al. (2006) and further developed by Hu et al. (2011) . To this end, we employed a set of three regressors that modelled the filtered single trial signal. The first regressor captured the overall ERP waveform, the second regressor captured the variability in latency and the third regressor captured the variability in morphology -i.e. whether the waveform was stretched or compressed on the horizontal axis. A different set of regressors is usually employed for each participant, and the regressors are derived from the averaged waveform of each participant. However, not all participants showed a Nc-like or a Pc-like deflection in the averaged EEG signal, which would have decreased the quality of our regressors; hence, we derived the set of regressors from the grand-average. Given that this approach might artificially reduce the variability in latency on the single trials, we allowed for more single trial variability by increasing the corresponding parameter in the estimation procedure (from 0.05 to 0.10). For more details on how these regressors are derived, see Hu et al. (2011) . The summarized procedure is illustrated in Fig. 3 and further described in the Supplementary material.
Given that the Ne/c and Pe/c at least partially dispose of different generators ( Gehring et al., 2012 ;Herrmann et al., 2004 ), we modelled both ERP components separately, following recommendations by Hu et al. (2011) . Furthermore, we modelled the Ne and the Nc separately from each other. The same applies to the Pe and Pc. In total, we derived four sets of regressors (one each for the Ne, Nc, Pe, and Pc), which were all based on the corresponding grand-average waveforms. We modelled the signal in an interval of 100 ms before the response onset and 500 ms after the response onset, by regressing the wavelet filtered single trial signal onto the set of three regressors described above. Based on the resulting multiple linear regression model, we generated the fitted single trial signal and searched for the Ne/c and Pe/c peak in this fitted signal. Given that it is likely that the variability in peak latency is larger on the single trial level than on the aggregate participants level, we increased the intervals that are usually used to detect the Ne/c and Pe/c peaks. For the Ne/c, we detected the peak amplitude in the interval from the response onset until 200 ms after the response onset. For the Pe/c, we detected the peak amplitude in the interval from 100 to 400 ms after the response onset.
The full estimation procedure of single trial peaks is described by Hu et al. (2011) . In simulation studies, the authors demonstrated that the method yields reliable and unbiased estimates for the single trial peak amplitudes.

Statistical analyses
The typical Ne/c (|Ne| > |Nc|) and Pe/c effects (Pe > Pc) were tested by two multilevel models with the response type (contrast coded: error = 1 vs. correct = -1) as a fixed effect predictor on level 1. Participants were included as random effects in the model.
In the main analyses, we computed a multilevel model for postresponse times, i.e. RTs on the following trial. Predictors on level 1 were single trial estimates of the Ne/c and the Pe/c amplitudes 1 and the response type (error vs. correct). Furthermore, we included the Ne/c-byresponse type interaction, and the Pe/c-by-response type interaction as predictors in the model, to account for ERP effects following errors but not correct responses and vice versa. The Ne/c and Pe/c amplitudes were centred around the participants' mean. The response type was contrast coded with 1 = error and -1 = correct. These predictors were treated as fixed effects and nested in participants, who were treated as random effects on level 2. We allowed for random intercepts for the level 1 predictors, but not for random slopes because this approach would have made the model very complex and caused convergence issues in the maximum likelihood estimation procedure. Crucially for our research question, we analysed the RT on trial n + 1 using the predictors mentioned above on trial n . All statistical analyses were conducted in the open-source software ( R Core Team, 2017 ) using the lme4 package ( Bates et al., 2015 ) for fitting the multilevel models, and the lmerTest package ( Kuznetsova et al., 2017 ) for computing the statistical significance for the fixed effects using the Satterthwaite's approximation to denominator degrees of freedom.
We analysed the post-response accuracy in a similar way to the postresponse times. The only difference was that, given the dichotomous criterion (response accuracy: correct vs. error), we computed a multilevel logistic regression instead of a linear regression. Apart from the The left column displays the grand-average waveform of erroneous and correct responses at the electrode FCz in the three datasets. The second column from the left illustrates the topographical maps of the Ne/c and Pe/c for both response types at the time point of the respective peak amplitude. Both ERP components can be observed at the FCz electrode site. The third column displays the time-frequency transform of the investigated epoch for erroneous responses which served as the basis for the wavelet filter displayed in the last column. In short, the wavelet filters keep data at frequencies and time points where an increase in amplitude was observed across trials (white area in the filter), while it discards data at frequencies and time points at which no consistent variation in amplitude could be observed (black area in the filter).
type of regression, the model specifications and analysis procedure were identical to the analysis of post-response times.

Diffusion model analyses
We fitted the diffusion model to our data using the HDDM toolbox ( Wiecki et al., 2013 ), which employs a Bayesian parameter estimation approach. This tactic allowed us to estimate the diffusion model parameters even for participants who yielded a relatively small number of error trials. Furthermore, the toolbox allowed us to model the relationship between external predictors (here: the Ne/c and Pe/c amplitude) and the diffusion model parameters on a trial-by-trial basis. The model specifications were as follows. The starting point z was fixed to 0.5 a , i.e. we assumed that the evidence accumulation process would start at equal distances from both decision thresholds. Due to the randomised and balanced stimulus presentation, we had no theoretical reason to assume a biased starting point.
The inter-trial variability parameters for the starting point, the drift rate, and the non-decision time were fixed to 0. We allowed the decision threshold a , the drift rate v , and the non-decision time t 0 to vary as a function of the response type (correct vs. error), Ne/c amplitude, Pe/c amplitude, as well as the interaction between the response type and the Ne/c amplitude, and the response type and the Pe/c amplitude. Accordingly, the diffusion model parameters were allowed to differ between correct and erroneous responses (main effect: response type), to corre-late with the Ne/c and Pe/c (main effects: Ne/c amplitude, Pe/c amplitude), and to correlate with both of them differently, i.e. depending on whether the response type was a correct response or an error (interaction effects). Analogous to the post-response time and post-response accuracy analyses, the reported regression coefficients refer to the centred Ne/c and Pe/c amplitudes and the contrast-coded response type (-1: correct, 1: error).
Importantly, the parameters on a given trial were predicted by the response type (correct vs. error) and the amplitudes of the Ne/c and Pe/c on the previous trial. In other words, we predicted the cognitive processes underlying the response on a given trial by the behaviour and neurophysiological processes on the previous trial. This design allowed us to link response monitoring, as reflected by the Ne/c and Pe/c amplitude, to post-error adaptation on a trial-by-trial basis.
To estimate the diffusion model parameters, we used the default priors implemented in HDDM, which are based on several studies described in a previous study ( Matzke and Wagenmakers, 2009 ). We drew 25,000 samples from the joint posterior distribution of the parameters using Markov Chain Monte Carlo (MCMC) sampling and discarded the first 5000 parameters as the burn-in period. To reduce autocorrelation, we thinned the remaining 20,000 draws by keeping every tenth draw, resulting in a total of 2000 draws from the joint posterior distribution of the parameters. The model fit and convergence checks are reported in the Supplementary Notes. Fig. 3. Illustration of the single trial estimation procedure of ERP peak amplitudes A) ERP images of the error trials before (upper row) and after (lower row) the wavelet filter was applied. The blue area around 100 ms indicates the error negativity, the read area around 200 ms indicates the error positivity. The signal-to-noise ratio of both ERP components is clearly enhanced by the wavelet filtering. B) Steps in the single trial estimation procedure and exemplary single trial waveforms. After wavelet filtering (1), the single trials are aggregated to the grand-average (2) which serves as the basis for the variation matrix (3). After a PCA decomposition of this matrix (see Supplementary material) (4), the first three resulting components are used to model the wavelet filtered single trial waveforms in a multiple regression (5). The Ne/c and Pe/c peaks are extracted from the fitted single trial waveforms.
Although the parameters were estimated simultaneously on both the individual participant level and the group level, we only analysed the posterior parameter distributions on the group level. We interpret differences in diffusion model parameters between errors and correct responses as substantial when more than 95% of the posterior distribution of the parameter for errors are larger/smaller than the posterior distribution of the parameter for correct responses (i.e. P > 95%). Similarly, we assume a substantial relationship of the Ne/c and Pe/c amplitude with the diffusion model parameters when 95% of the posterior distribution for the regression coefficient are above or below zero ( Wiecki et al., 2013 ).

Accuracy dataset and speed dataset
To corroborate the results of the Base Dataset, we repeated the analyses on two new datasets that were derived from the same experiment employing a flanker task: in one half of the experiment, response speed was emphasised (speed condition), whereas in the other half, response accuracy was emphasised (accuracy condition). We analysed both conditions separately for the following reasons. First, we were not primarily interested in the differences between the speed and the accuracy instruction, but rather in the relationship between response monitoring and post-response adaptation processes. Second, including the instruction as a factor in the statistical analyses would have inflated the complexity of the design, perhaps causing convergence issues in the multilevel models and especially in the diffusion model analyses. We thus report the results of the analyses for the speed instruction as the Speed Dataset and the results of the analyses for the accuracy instruction as the Accuracy Dataset. The data have been published in Bode and Stahl (2014 ;Speed Dataset) and Kummer et al. (2020 ; Speed and Accuracy Datasets).

Participants
Ethical approval was given by the ethics committee of the German Psychological Society (DGPs). In the original study, the order of the speed and accuracy instruction was varied between participants. Given that there were order effects, we only analysed the data of those participants that were assigned to the order condition with the largest number of participants, i.e. speed instruction first and accuracy instruction second. A total of 61 participants (age: M = 25.56, SD = 5.80 years; 31 males, 30 females) performed the task in this order.

Procedure and experimental task
The participants performed a modified Flanker Task ( Eriksen and Eriksen, 1974 ). They were presented with three digits (1 to 8) displayed next to each other in the centre of the screen and were instructed to indicate whether the central digit was odd or even. The flanking digits were identical but never the same as the central digit. The assignment of the response (odd vs. even) to the response keys (left vs. right index finger) was balanced across participants. The stimulus, consisting of three digits as described above, was presented for 67 ms, followed by a response window of 1133 ms. Next, a feedback was presented for 200 ms; it informed the participants whether the response was correct or incorrect. In the Speed Dataset, participants further received feedback when their response was too slow. After an inter-trial interval of 1500 ms, the next trial started. The speed and accuracy conditions consisted of 10 blocks each and each block comprised 40 trials. More information on the procedure and experimental task can be found in Bode and Stahl (2014) .

Trial selection
In the Accuracy Dataset, a response was defined as 'too slow' when the RT exceeded 850 ms. In the Speed Dataset, the RT criterion was set to 85% of the average RT in the first block for each participant. To ensure comparability between the two datasets, for the analyses, we adopted the same RT criterion as in the Accuracy Dataset, i.e. 850 ms. Apart from comparability, this approach also largely increased the number of trials that we could use for our analyses. Except for the RT criterion, the trial selection procedure was the same as in the Base Dataset. On average, 112 trials per participant ( SD = 42.17) were left for the analyses in the Speed Dataset and 287 trials per participant ( SD = 48.92) were left in the Accuracy Dataset (about 28% and 72% of all trials, respectively). Note that the number of usable trials was lower in the Speed Dataset than in the Accuracy Dataset because the speed instruction led to a higher error rate (26.73% vs. 5.22%), a phenomenon that decreased the number of trials that were preceded by two correct trials.

Statistical analyses
All steps of the statistical analyses were the same as in the Base Dataset.

Ne/c and Pe/c amplitude
We performed multilevel model analyses with response type (error vs. correct) as a fixed effect and participant as a random effect to check whether the Ne/c amplitudes and Pe/c amplitudes (both estimated on single trials) were more pronounced on error trials compared with correct trials. We found that, in the Base Dataset, the Ne/c peaked higher on error trials than on correct trials (descriptive statistics in Table 1 ; b ± SE = -4.40 ± 0.06, t (19,370.22) = -70.63, p < .001). This finding was replicated in the Speed and Accuracy Datasets ( b = -2.82 ± 0.15, t (6856.13) = -18.29, p < .001, and b = -3.63 ± 0.15, t (17,488.96) = -24.50, p < .001 respectively). Similarly, the Pe/c was also more pronounced on error trials compared with correct trials in all Experiments (Base Dataset: b = 1.09 ± 0.08, t (19,369.90) = 13.60, p < .001; Speed Dataset: b = 2.01 ± 0.12, t (6858.39) = 16.76, p < .001; Accuracy Dataset: b = 2.72 ± 0.11, t (17,483.85) = 25.60, p < .001). We found the wellestablished differences in Ne/c and Pe/c peak amplitude reported in the literature, providing first evidence that our single trial estimation procedure was successful ( Fig. 2 ).

Post-Response time and post-response accuracy
In the first part of our main analyses, we investigated behavioural indicators of post-response adaptation by computing a multilevel model with post-response time and post-response accuracy as criteria. Predictors on level 1 were single trial estimates of the Ne/c and the Pe/c amplitudes and the response type (error vs. correct). Furthermore, we included the Ne/c-by-response type interaction, and the Pe/c-by-response type interaction as predictors in the model, to account for ERP effects following errors but not correct responses and vice versa. These predictors were treated as fixed effects and nested in participants, who were treated as random effects on level 2. The results are summarised in Table 2 . Since the main effect of the response type was not the focus of our work, we report the corresponding results in this table and discuss them in the Supplementary Discussion. We tested for multicollinearity in all analyses using the variance inflation factor (VIF) provided in the performance package ( Lüdecke et al., 2021 ). All VIFs were smaller than 10 (Post-Response Time: Base Dataset: 1.37 to 3.71; Speed Dataset: 1.11 to 2.29; Accuracy Dataset: 1.34 to 5.41; Response Accuracy: Base Dataset: 1.21 to 2.91; Speed Dataset: 1.08 to 2.04; Accuracy Dataset: 1.10 to 3.57), indicating the absence of a serious and consequential multicollinearity problem ( Eid et al., 2013 , p. 687).
For the post-response times in the Base Dataset, the multilevel model yielded significant effects for the Ne/c amplitude ( b = -0.64 ± 0.14, t (19,294.66) = -4.57, p < .001) and Pe/c amplitude ( b = -0.58 ± 0.18, t (19,288.97) = -3.29, p = .001). Whereas more negative Ne/c amplitudes were associated with slower subsequent responses, larger Pe/c amplitudes were associated with a faster response on the subsequent trial. Hence, more pronounced Ne/c amplitudes were associated with Note. n.a. (not applicable). post-response slowing and larger Pe/c amplitudes were associated with post-response speeding. The findings of larger Ne/c amplitudes being associated with slower responses on the following trial were successfully replicated in both the Speed and the Accuracy Dataset ( b = -2.99 ± 0.25, t (6795.88) = -12.07, p < .001, and b = -0.46 ± 0.17, t (17,457.49) = -2.73, p = .006, respectively). For the Pe/c amplitude, the findings were more heterogeneous. In the Speed Dataset, the model yielded a significant main effect for the Pe/c amplitude ( b = -3.76 ± 0.33, t (6798.67) = -11.27, p < .001), which was qualified by a significant interaction between the Pe/c amplitude and the response type ( b = 2.32 ± 0.34, t (6811.02) = 6.90, p < .001). We further explored this interaction by performing multilevel model analyses for correct responses and errors separately (as in the previous analysis, including the Ne/c amplitude and the Pe/c amplitude as predictors). We found that for both correct responses and errors, the Pe/c amplitude was a good predictor for the RT on the following trial ( b = -6.09 ± 0.36, t (5071.69) = -16.78, p < .001; and b = -1.71 ± 0.53, t (1689.67) = -3.20, p < .001, respectively). The larger the Pe/c amplitude was, the faster the responses were on the following trial. This relationship was stronger for correct responses than for errors, as indicated by the significant interaction effect. In the Accuracy Dataset, the Pe/c was not significantly related to the post-response time ( b = -0.12 ± 0.24, t (17,457.64) = -0.52, p = .602).
For post-response accuracy, the analyses of the Base Dataset only yielded and effect of the Ne/c amplitude ( b = -0.02 ± 0.01, z = -2.44, p = .015). The more negative the Ne/c amplitude was, the higher the probability of a correct response was on the subsequent trial. The Pe/c amplitude was not associated with the probability of a correct response on the subsequent trial ( b = -0.004 ± 0.008, z = -0.48, p = .632). Again, the Ne/c effect on post-response accuracy was successfully replicated in the Speed and Accuracy Datasets ( b = -0.02 ± 0.004, z = -4.63, p < .001, and b = -0.02 ± 0.008, z = -2.57, p = .010) respectively). The more pronounced the Ne/c amplitude was, the higher the probability of giving a correct response was on the following trial. Furthermore, in the Speed Dataset, a significant main effect for the Pe/c ( b = -0.02 ± 0.005, z = -4.79, p < .001) was again qualified by a significant interaction between the Pe/c and the response type ( b = 0.02 ± 0.005, z = 3.75, p < .001). We investigated the interaction by conducting separate multilevel analyses for correct responses and errors, including the Ne/c and Pe/c amplitudes as predictors in the models. We found an effect for the Pc amplitude ( b = -0.04 ± 0.006, z = -7.15, p < .001); this result indicated that larger Pc amplitudes were associated with a lower probability of giving the correct response on the following trial. For errors, there was no statistically significant relationship ( b = -0.003 ± 0.008, z = -0.46, p = .643). Finally, in the Accuracy Dataset, the Pe/c amplitude was not significantly related to the post-response accuracy ( b = 0.0009 ± 0.01, z = 0.08, p = .938).

Model including only the Pe/c amplitude
In the Base and Speed Datasets, we found that larger Pe/c amplitudes were associated with faster responses on the following trial. This finding deviates from studies in the literature which tend to report the opposite effect (e.g. Hajcak et al., 2003 ), i.e. slower responses following larger Pe/c amplitudes similar to the pattern observed for the Ne/c amplitudes. We argue that this positive relationship between the Pe/c amplitude and post-response time may actually be driven by shared variance with the Ne/c amplitude. Both ERP components occur temporally and spatially close to each other. It is thus likely that the variance of the Pe/c amplitude comprises variance that is unique to the Pe/c amplitude, but also shared variance with the Ne/c amplitude. When including only the Pe/c amplitude as predictor in the model (as done by previous studies, e.g. Fischer et al., 2015 ), it is unclear whether the observed relationship with post-response time is based on the unique or the shared variance of the Pe/c amplitude. If it was based on the shared variance, one would expect to find Pe/c effects which are similar to the Ne/c effects, as is reported in the literature. One strength of our statistical design is that it controls for effects of the Ne/c amplitude by including both ERP components as predictors in a single regression model and thus eliminating shared variance. Unlike studies using only the Pe/c amplitude as a predictor, our results reflect the unique contribution of the Pe/c process to PRAM. To demonstrate the impact this choice of statistical design has, we performed a multilevel analysis in which we only included the Pe/c amplitude, the response type, and their interaction term to predict the post-response time.
Thus, when only including the Pe/c amplitude and the response type as predictors in a multilevel model for post-response times, we find a negative relationship between the Pe/c amplitude and the response time on the following trial after correct responses in the Base and Speed Datasets. The larger the Pc is, the faster the subsequent responses are. Following errors, larger Pe amplitudes were associated with slower responses, similar to the Ne/c effect. Although the latter finding did not reach the level of statistical significance, the pattern of results highlights the need to control for the Ne/c amplitude when investigating Pe/cspecific effects on PRAM to avoid that Pe/c effects are due to shared variance with the Ne/c amplitude. We will elaborate on this in the Discussion. For the sake of completeness, we report the full results of models including only one ERP component in the Supplementary material.

Diffusion model analyses
In the following, we report the findings related to the link of the Ne/c and Pe/c amplitude with diffusion model indicators of PRAM. The findings related to the response type are reported in Table 3 and discussed in the Supplementary Discussion.
In the Base Dataset, the amplitude of the Ne/c was significantly associated with the decision threshold ( b = -0.0042, 95% HDI [-0.0070, -0.0011], P = 99.60%) the drift rate, ( b = -0.0171, 95% HDI [-0.0277, -0.0063], P = 99.95%), and the non-decision time, ( b = -0.0003, 95% HDI [-0.0006, < 0.0001], P = 97.95%). The more negative the Ne/c was, the higher the decision threshold and the drift rate and the larger the non-decision time were on the subsequent trial. We did not find a difference in the strength or direction of these relationships between previous correct or erroneous responses (non-significant findings, see Table 3  In the Base Dataset, the amplitude of the Pe/c was negatively associated with the decision threshold, ( b = -0.0031, 95% HDI [-0.0065, 0.0002], P = 96.05%). The higher the Pe/c amplitude was, the lower the decision threshold was on the following trial. This relationship did not depend on the response type. We did not find a significant relationship between the Pe/c and the drift rate on the following trial. For the non-decision time, we found a moderation effect of response type ( b = 0.0004, 95% HDI [ > 0.0001, 0.0008], P = 98.05%). If the previous response was correct, the Pc amplitude was negatively related to the non-decision time ( b = -0.0002, 95% HDI [-0.0004, -0.0001], P = 99.25%). The higher the Pc amplitude was on correct trials, the shorter the non-decision time was on the next trial. If the previous response was an error, however, there was no substantial relationship between the Pe amplitude and the non-decision time on the subsequent trial ( b = 0.0006, 95% HDI [-0.0002, 0.0014], P = 93.45%). In the Speed Dataset, we replicated the main effect for the Pe/c on the decision threshold ( b = -0.0077, 95% HDI [-0.0101, -0.0055], P > 99.99%), which was now qualified by an interaction effect ( b = 0.0034, 95% HDI [0.0011, 0.0059], P = 99.70%). For correct responses, the relationship between the Pe/c amplitude and the decision threshold was stronger than for errors ( b = -0.0111, 95% HDI [-0.0134, -0.0186], P > 99.99%; and b = -0.0042, 95% HDI [-0.0081, > 0.0000], P = 97.40%, respectively). However, for both response types, the Pe/c significantly predicted the decision threshold on the subsequent trial. A larger Pe/c amplitude was associated with a lower decision threshold. Furthermore, we found a main effect of the Pe/c for the drift rate ( b = -0.0109, 95% HDI [-0.0197, -0.0031], P = 99.50%), which was also qualified by a significant interaction effect ( b = 0.0112, 95% HDI [0.0032, 0.0194], P = 99.80%). Only for correct responses was the Pe/c amplitude significantly associated with a smaller drift rate in the following trial ( b = -0.0221, 95% HDI [-0.0308, -0.0136], P > 99.99%). There was no significant relationship between the Pe/c amplitude and the drift rate for errors ( b = 0.0004, 95% HDI [-0.0145, 0.0139], P = 51.05%). In the Accuracy Dataset, there was no relationship between the Pe/c amplitude and the decision threshold or the drift rate on the following trial. For both the Speed Dataset and the Accuracy Dataset, there was a relationship between the Pe/c amplitude and the non-decision time ( b = -0.0007, 95% HDI [-0.0012, -0.0002], P = 99.45%, and b = -0.0011, 95% HDI [-0.0018, -0.0004], Table 3 Regression coefficients (b), standard error for the regression coefficients (SE), and posterior probability (P) for decision threshold, drift rate and non-decision time. The reported standard error equals the standard deviation of the posterior distribution of the parameters.

Discussion
To investigate the fundaments of post-response adaptation, we combined state-of-the-art methods in a neuro-cognitive diffusion model ( Fig. 1 ) in a reanalysis of three large scale ERP datasets ( Bode and Stahl, 2014 ;Kummer et al., 2020 ;Stahl et al., 2015 ). Our endeavour allowed us to associate neural correlates of action monitoring (Ne/c and Pe/c) with diffusion model estimates of PRAM on individual trials within one (statistical) model, which is a unique way of granting novel insight into mechanisms underlying post-response adaptation and their neuro-cognitive links to preceding action monitoring.
Our results consistently showed that larger single-trial Ne/c amplitudes were followed by slower responses (for the Ne [but not Nc]: Beatty et al., 2021 ;Debener et al., 2005 ;Fischer et al., 2015 ;Gehring et al., 1993 ;West and Travers, 2008 ) and a higher probability of correct responses. Furthermore, the more pronounced the Ne/c was, the higher the decision threshold and the drift rate were. The increase in decision threshold and drift rate can be interpreted as PRAM: While an increase in threshold prevents future errors by accumulating more evidence before the decision is made, an increase in drift rate indicates a stronger focus on the task-set and the task-relevant features of the stimulus (as opposed to the distractors; Fischer et al., 2018 ;Novikov et al., 2017 ;Steinhauser et al., 2017 ). These results suggest that the more intense early response monitoring is (reflected by a larger Ne/c amplitude), the more likely the processes result in PRAM, which holds also for other types of adaptive response strategies, for example, a pupil dilatation in the subsequent trial ( Murphy et al. (2016) .
It seems that the Ne/c is related to processes that improve future performance both by ensuring that more evidence is accumulated before making the next decision and by retooling the task-set ( Wessel, 2018 ). A frontal midline theta power increase ( Cavanagh and Frank, 2014 ) and an increase in anterior cingulate cortex activity ( Hester et al., 2005 ) -the postulated neural generator of the Ne/c ( Ridderinkhof et al., 2004 ) -have been suggested to signal the need for higher levels of cognitive control and further supports this consideration. More cognitive control can be implemented by elevating the decision threshold ( Cavanagh and Frank, 2014 ), increasing the processing of task-relevant features ( King et al., 2010 ), and preventing the processing of taskirrelevant features ( Maier et al., 2011 ) or a combination of two or more factors.
Importantly, the relationship between the Ne/c amplitude and PRAM was not restricted to error trials. This observation suggests that although the averaged Ne is usually larger compared to the Nc (e.g. Falkenstein et al., 1991 ;Gehring et al., 1993 ), the single-trial Ne/c amplitudes may reflect a general need for higher levels of cognitive control in the corresponding trial ( Cavanagh and Frank, 2014 ;Hester et al., 2005 ), regardless of the response type ( Hoffmann and Falkenstein, 2010 ). In cases of conflict or uncertainty about a trial's correctness, the process underlying the Ne/c seems to initiate PRAM also after correct responses.
For response monitoring as reflected by the Pe/c amplitude, we were only able to replicate two findings. In the Base Dataset and the Speed Dataset, larger Pe/c amplitudes were associated with lower decision thresholds and with shorter post-response times. Both results may initially seem counterintuitive given that the Pe is assumed to reflect processing of aware errors ( Nieuwenhuis et al., 2001 ;Steinhauser and Yeung, 2012 ), which should lead to adaptation processes such as increasing the threshold and thus, slow down responding. Yet, we found a relationship in the opposite direction. In the literature, researchers have usually either reported an increase in RTs after a more pronounced Pe ( Fischer et al., 2015 ;Hajcak et al., 2003 ) or no change in RTs as a function of the Pe amplitude on the previous trial ( Beatty et al., 2018 ;Endrass et al., 2007 ). Despite extensive effort, we only found one study that related the Pe amplitude to post-error speeding ( Buzzell et al., 2017 ).
The inconsistency of our results with findings reported in the literature may be partially due to two methodological improvements we aimed to implement in our study: the adequate level of analysis and the isolation of the effect of interest. First, researchers have often resorted to between-participants analyses based on averaged ERP waveforms when Fig. 4. Dynamics between the Ne/c and Pe/c-related processes and the decision-threshold on the following trial in the neuro-cognitive diffusion model framework The Ne/c-specific process is related to an increase in decision threshold a on the following trial, potentially increasing response accuracy but also response time. When the response speed is relevant (left) -e.g. because of a speed instruction or a response time limit -the Pe/c-specific process decreases the decision threshold concurrently. This phenomenon ensures that responses can be given in accordance with the speed requirement and that appropriate response monitoring can occur on the following trial ( Steinhauser and Yeung, 2012 ). When the response speed is not relevant (right) -e.g. because of an accuracy instruction or a liberal response time limit -the Pe/c-specific process is not related to the decision threshold (hence the more transparent background in the illustration).
investigating post-response adaptation (e.g. Hajcak et al., 2003 ). However, the mechanism under investigation acts on a trial-by-trial basis and should thus be analysed on a single-trial level within participants. Accordingly, it is possible that the effects across participants reported in the literature differ from the more informative effects we found within participants ( Kievit et al., 2013 ). Second, many studies have computed two separate regression models for the Ne/c and Pe/c amplitudes (e.g. Beatty et al., 2018 ;Fischer et al., 2015 ). Given that both components occur spatially and temporally close to each other, it is reasonable to assume that they partially reflect the same processes. However, when studying the Ne/c and Pe/c as indicators of response monitoring, the goal is to draw conclusions regarding relations to PRAM that are specific to the Ne/c or Pe/c. To this end (and unlike the studies cited above), we included both components as predictors in one regression model, thus controlling for the effect of one component when examining the effect of the other component. This approach allowed us to isolate the unique contribution of the Pe/c amplitude to PRAM. In fact, we were able to demonstrate that when excluding the Ne/c amplitude from the analyses of post-response times, the Pe amplitude after errors was not related to faster responses on the following trial anymore. Instead, there was even a clear albeit not statistically significant tendency of larger Pe amplitudes being associated with slower responses on the following trial. This is clear evidence for our suggestion that the effects of the Pe/c process on PRAM reported in the literature may partially reflect effects which are actually related to the Ne/c process produced by spatial and temporal overlap of the Ne/c and Pe/c processes.
Considering the methodological benefits of our study, our findings suggest that the Pe/c counteracts the Ne/c regarding the decision threshold on the following trial when response speed is relevant (see model in Fig. 4 ). While the Ne/c was associated with an increased decision threshold on the subsequent trial, the Pe/c amplitude was associated with a decreased decision threshold in the Base and Speed Datasets, speeding up responses. Thus, the Pe/c might be associated with a mechanism that ensures the instructed fast responding -especially in the speed taskis still possible by decreasing the decision threshold and thus counteracting the Ne/c. In other words, the Ne/c and Pe/c might keep each other in check regarding the optimal decision threshold when speed is relevant. In the Accuracy Dataset in which an accuracy instruction was given to the participants, we did not find a negative association between the Pe/c and the decision threshold on the following trial. It seems that when the focus is explicitly on response accuracy or when no RT limit is provided, the balance is shifted towards response accuracy. Note that this mechanism might also have an impact on response monitoring itself. Steinhauser and Yeung (2012) showed that an increased decision threshold during a task reduced subsequent response monitoring because a high decision threshold reduces and delays the emergence of a response conflict or of a representation of the correct response. This implies that for effective and efficient response selection and monitoring, an optimal decision threshold needs to be adopted. Hence, while the Ne/c process may aim at future response accuracy, the Pe/c process may aim at facilitating fast responding and keeping response monitoring up. The interplay of the Ne/c-and Pe/c-related mechanisms seems to reconcile the conflicting demands of response speed and accuracy which are placed on optimal future behaviour. Consequently, our results do not merely add to the literature that suggests that the Ne/c and Pe/c might reflect two at least partially independent systems of response monitoring ( Chang et al., 2014 ;Di Gregorio et al., 2018 ). They also move beyond this claim by suggesting that these systems may have an opposing impact on post-response adaptation, ensuring an adequate balance between fast and accurate responses.

Limitations
It is noteworthy that in all datasets, participants received trial-bytrial feedback about the accuracy of their responses. In other words, their post-response behaviour may have been influenced not only by internal response monitoring systems but also by external information. This may be problematic if internal and external information contradicted each other. However, in simple flanker tasks like the ones that were used in our datasets, participants are usually aware of the accuracy of their responses ( Steinhauser and Yeung, 2012 ) and they detect up to 90% of their errors ( Hughes and Yeung, 2011 ). In other words, internal and external information is largely congruent and the fact that the participants received feedback should not have had an impact on the relationship between response monitoring and post-response behaviour. Nevertheless, the role of the Pe/c deserves special attention in this context because it has been linked to error awareness. It is crucial to make sure that the results we find for the Pe/c are due to variations in the ERP component itself and not due to a confound with error awareness -the external feedback. If the observed relationships between the Pe/c and post-response behaviour were caused by the feedback, the relationships should not be modulated by the instruction (speed vs. accuracy), because trial-by-trial feedback was given in both the Speed and the Accuracy Dataset. However, we do find differential relationships in both datasets, suggesting that the feedback did not bias our results. Furthermore, for the Ne/c, it has been shown that trial-by-trial feedback does not impact its amplitude ( Olvet and Hajcak, 2009 ). Despite these considerations, it is desirable to replicate our results in datasets in which participants did not receive trial-by-trial feedback.
Since our results heavily rely on single-trial estimates of the Ne/c and Pe/c amplitude, it is important to ensure that the estimation procedure is valid and reliable. Several studies have demonstrated that the procedure produces reliable and unbiased single-trial estimates ( Hu et al., 2010( Hu et al., , 2011. In the Supplementary material, we provide theoretical and empirical evidence that we validly applied the single-trial estimation procedure to our data. The Pe/c component is sometimes divided into an early, more frontal Pe/c and a late, more parietal Pe/c. Some studies suggest that they might have different functional significances (e.g. Endrass et al., 2007 ). It should be noted that the Pe/c we investigated in the present study resembled more the early Pe/c considering its rather frontal distribution. Unfortunately, it is not possible to apply our single-trial estimation procedure to the late Pe/c because this component does not have a clearly identifiable peak ( Endrass et al., 2007 ;Ruchsow et al., 2005 ) which is a prerequisite for the approach we employed in our study ( Hu et al., 2011 ). Hence, the results regarding the Pe/c may be restricted to the early Pe/c, and the late Pe/c may show different relationships with postresponse adaptation than the ones we found in our study.

Conclusion
The cognitive system needs to monitor actions and initiate adaptive measures aimed at increasing task performance and avoiding future errors. We investigated the link between response monitoring and postresponse adaptation using a combination of neural data, behavioural data, and computational modelling. While early response monitoring was linked to slower and more accurate responses on the following trial, later response monitoring was associated with faster responses when response speed was relevant. The interplay of both mechanisms may aim at balancing the conflicting demands of response speed and accuracy in subsequent behaviour. Future studies may resort to a similar combination of methods and data to better understand cognitive processes on a single-trial level.

Declaration of Competing Interest
The authors declare no competing financial interests.

Data and code availability statement
The data and analysis scripts are available on OSF: https://osf.io/8nbd4/ .

Funding
This research was supported by the German Research Foundation (STA 1035/7-1).