I am trying to implement a mixed-effects regression model in Matlab to see the correlation between self-reported stress levels and some physiological features. Data comes from a longitudinal study so I have to deal with repeated measures' issues.

I have some knowledge about basic regression models such as OLS or PLSR but I am new to mixed-effects regression models, and I am completely lost. I don't find any good example and I don't know where to start from.

I currently have a data matrix of 34 people with 30 measures of 65 variables for each one of them, and I have several questions.

  • Do I have to select a single/or a few variables to regress or can I try to include all the variables in the model?
  • Do I have to think about a model (formula) or can Matlab automatically create one?
  • Which is(are) the random effect variable? The subjects' id-s?
  • How do I know which interaction term to introduce?
  • How do I know if I should use a random intercept or s random variable?

I would be very grateful if you could give me some steps to follow.


  • 1
    $\begingroup$ It seems to me that this is mostly about the statistics that you want to do, rather than the MATLAB code to do it. If so, you should probably delete MATLAB from the title because questions about software are off topic here. $\endgroup$ – Peter Flom May 2 '16 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.