Question using anovan for two way repeated measures ANOVA

6 views (last 30 days)
I am trying to run an analysis on my epilepsy data and could use some help. I have thirteen subjects from which I have collected connectivity data, and I am trying to run a two-way repeated measures ANOVA with two within-subject factors. I have a connectivity score which is my dependent variable. I also have a subject identifier variable 'subject' and two categorical variables which are 'state' (values = 1,2,3,4) corresponding to the time state at which the connectivity score was collected and 'region' (values = 1,2,3,4) corresponding to the epileptogenicity of the region from which the connectivity score was collected. For each patient/state/region combination, there are many (tens to hundreds of) measurements, not just one, and the number of measurements is not the same from one combination of patient/state/region to the next (which is why I avoided using ranova since I don't know how I would get all the data for one subject in one row).
I have created a matrix a, in which the first column is the connectivity score, the second column is subject identifier, the third column is the categorical 'state' variable, and the fourth variable is the cateogorical 'region' variable. Is the following code correct for running this analysis?
p = anovan(a(:,1),{a(:,2) a(:,3) a(:,4)},'model',2,'varnames',{'subject','state','region'},'random',1);
  4 Comments
Scott MacKenzie
Scott MacKenzie on 25 Feb 2022
Well, I think my previous suggests stands. If you have 30-second epochs spanning 30 minutes, that's potentially another factor called "epoch" with 60 levels. Is there a particular research interest in testing for an "epoch effect" on the connectivity score? Maybe, maybe not. But these measurements are only for one of the four states (resting) so perhaps not.
Is it not the case that multiple EEG channels of data are gathered to smooth over differences and get a more stable and reliable measure? If that's the case, I see no reason why you can't just work with the mean of the measures over the different channels.
Really, all these issues should be considered and decided on before running an experiment. As a start, why not just collapse the data as I suggested and look for the main effects of state and region and a State x Region interaction effect. In this case you have a 4 x 4 within-subjects design with 13 participants. You could use ranova or anovan.

Sign in to comment.

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!