Skip to content

ebrlab/Bayesian_MGRW_LKJ_ERP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Bayesian Multivariate Gaussian Random Walk Regression for ERP Estimation with LKJ prior

The present analysis implements a multivariate Gaussian random walk (MGRW) using a Lewandowski-Kurowicka-Joe (LKJ) prior distribution for estimating event-related potentials (ERPS).

Model

The present model attempts to estimate event-related potentials (ERPs) across the whole epoch and capture electrodes covariation/correlations at the same time. To that aim, we use an MGRW prior to model the voltage changes across time plus a Gaussian noise parameter. We reparametrised the gaussian random walk by simplifying to the assumption of an independent random walk per electrode, related via the covariance of a multivariate Gaussian. So that we could write the GRWs in the form β = wσt, where w ~ Normal(0,1), sigma ~ HalfNormal(1) being a second moment parameter, and t = √times (i.e. the squared root of each of 295 sampled times from the start fo the baseline time0 to the end of the epoch timeS, S=295). Covariance is modelled as a Cholesky decomposition, where the Cholesky factor comes from a LKJ prior. A normal distribution (likelihood) is used for the observed voltages with a half-normal distribution as error parameter.

L1...LC, ϱ1...ϱC, SD1...SDC = LKJ(n=E, η=6)

Σ1...ΣC = LcLcT

w1... wC ~ Normal(0,1) , S × E

σ1... σC ~ HalfNormal(1) , S × 1

tc,s = √timec,0... √timeC,S

βc = wcσctc

B = Σcβc , E × S

αc,s ~ Normal(0, 1)

μc = αc,s + B

ϵc ~ HalfNormal(0.05) + 1

yc ~ Normal(μc, ϵc)

Where C = 4 mandarin tones (tone 1... tone 4), E = EEG electrodes (32), and S = number of samples (282, 100ms baseline, 1s epoch). Data comes from a tone detection oddball task (Tone 4 was the deviant target, 25% of total stimuli), completed by learners and non-learners of Chinese Mandarin. We fit two models, as described above, to data from each group: learners and non-learners.

We sampled the model using Markov chain Monte Carlo (MCMC) No U-turn sampling (NUTS) with 2000 tuning steps, 2000 samples, 4 chains. The model sampled well, with 1.01 > R̂ > 0.99; BFMIs > 0.9, and bulk ESS > 1000 for all parameters (few parameters, 3-6 per model, however, were below 500 effective samples; which may indicate some sampling issues). Note that due to the high number of parameters, the trank/ folder contains traceplots and autocorrelation plots from parameters below 10% (1600) ESS instead (these plots show good mixing).

Results

The estimates from learners indicate that the target tone (tone 4) induced a strong positive voltage deflection after ~200ms respect to the non-target tones at Pz (i.e., tone 4 induced a P3b). Image below shows the contrasts between tone 4 and each other tone from posterior distributions.

The estimates from non-learners indicate that the target tone (tone 4) induced a milder positive voltage deflection after ~200ms respect to the non-target tones at Pz. Image below shows the contrasts between tone 4 and each other tone from posterior distributions.

Predictions from the posterior for learners indicate more uncertainty but the P3b is still present. Image below shows contrasts between tone 4 and each other tone from Pz predictions.

Predictions from the posterior for non-learners also indicate more uncertainty but there is still a mild P3b. Image below shows contrasts between tone 4 and each other tone from Pz predictions.

Images below show posterior distributions from the learners’ model as scalp topographies (posterior of tone 4 minus all other tones combined).

5% highest density intervals (HDI)

Posterior means

95% highest density intervals (HDI)

Images below show posterior distributions from the non-learners’ model as scalp topographies (posterior of tone 4 minus all other tones combined).

5% highest density intervals (HDI)

Posterior means

95% highest density intervals (HDI)

Correlations across electrodes per tone indicate that the target tone (Tone 4) shows strong correlations between the electrode showing maximum P3b amplitude Pz and surrounding electrodes (PO4, PO3, P4, P3, CP1, CP2). Pz is also moderately anticorrelated with frontal electrodes (as commonly observed for P3b). Differently, non-target tones show very low correlations and anti-correlations. This may indicate that these tones do not generate a P3b, i.e. their activity remains around zero independent of scalp topography, as electrodes do not capture activity corresponding to an elicited ERP. Images below show topomaps of correlations to Pz.

Learners: correlations to Pz

Non-learners: correlations to Pz

Conclusion

The estimates show that there is a difference of P3b amplitude between learners and non-learners, but predictions remain somewhat uncertain. The present model includes a correlation matrix for electrodes, solving one problem from our previous model (https://github.com/ebrlab/Bayesian_MGRW_LKJ_ERP). However, there are minor sampling issues that may require more work on priors. Further work on developing a scientific model which can better model voltage activity is a relevant additional step.

About

Bayesian multivariate gaussian random walk with LKJ prior for ERP estimation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages