Mixed effects model with (lagged) autocorrelation or similar?

13 views (last 30 days)
Dear fellow Matlab users,
Recently I have made good use of Matlab's built-in functions for making linear mixed effects. Currently I am trying to model time-series data (neuronal activity) from cognitive experiments with the fitlme() function using two continuous fixed effects (linear speed and acceleration) and several, hierarchically nested categorical random factors (subject identity, experimental session and binned linear location).
I have tried several variations of the following basic formula: 'Activity ~ Speed*Acceleration + (1|Animal) + (1|Recording session) + (Speed*Acceleration|Location)'
To cut a long story short, I have the impression that the temporal dependencies in this kind of time-series require a method capable of taking into account (lagged) autocorrelations in the data. The relative differences in the amounts of variance explained by models using different combinations of correlated/uncorrelated, interacting/independent random effects, follow my predictions, but the total amount of variance explained is never more than 1.5%.
I have been trying to find a way to model time-series data with Matlab while also taking into account the influence of the random factors. I find the explanations on the Mathworks website on this topic relate mostly to financial analysis. Those articles provide few examples and I'm having trouble translating the information in those articles to the specifics of my problem.
I was wondering if anyone could point me in the right direction.
Specifically I'm looking for a method to determine the size and significance of an effect of speed and/or acceleration on neural activity, taking into account significant inter-subject variability from a design with limited number of subjects but a large amount of data per subject.
Any advice is greatly appreciated!
Best, Paul

Accepted Answer

Paul on 19 Sep 2018
Ok so I figured something out myself that works reasonably well.
I simply add history terms as fixed effects. I add three fixed effects, the first being the activity one temporal bin earlier, the second being the activity two temporal bins earlier etc. This leads to a model explaining about 81% of the variance which I think is very reasonable. Thank you all for your attention.
Paul on 21 Dec 2018
Hi Simone,
1) Yes, but it is a bit more specific. In linear mixed effect models (or mixed models for short) there are two broad classes of predictor variables; fixed and random. Fixed effects are continuous variables where I expect a systematic relationship/correlation with the current firing rate, regardless of which subject or recording electrode the measurement was taken from. If you would like more info let met know, there's some good tutorials around.
2) Yes, I found that adding a 4th term did not lead to enough extra explained variance than a model with 3 terms to warrant inclusion. But the difference between 2 and 3 terms was higher so that's why I settled on 3 terms.

Sign in to comment.

More Answers (0)


Find more on Conditional Mean Models in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by