Azzera filtri
Azzera filtri

anovan or fitlme for experiment with complex combination of factors

5 visualizzazioni (ultimi 30 giorni)
The details of my experiment are as follows: Rats are split into four treatment groups. EEG data is recorded simultaneously at 23 regularly spaced depths within the rat brain for 50 minutes. The recording data is processed via fourier transform to provide 10 spectra representing 10 consecutive 5 minute periods. Power at a particular frequency range is extracted from each spectrum. Each datapoint is the average power over a 5 minute period (timepoint) at a given depth. What we are trying to learn are the effects on the DV (power at a specific frequency) of treatment over time and depth.
There are therefore three IVs: treatment group, timepoint, and depth. Timepoint and depth are both repeated measures because data at multiple timepoints and depths are sampled from the same animals.
I am unsure of how to approach this analysis. I have tried anovan with nesting but I don't know if it this is the correct approach.
Approach 1: treating depth and time as random variables and nesting depth within time
nesting = [0 0 0;0 0 0;0 1 0];
[p,~,stats] = anovan(datapower,{factorgroup factortime factordepth},'model','interaction','nested',nesting,'random',[2 3],'varnames',{'group','time','depth'});
Approach 2: treating depth and time as random variables, as well as creating a separate "animal" factor, and nesting that factor within the group factor
nesting = [0 0 0 0;1 0 0 0;0 0 0 0;0 0 0 0];
[p,~,stats] = anovan(datapower,{factorgroup factoranimal factortime factordepth},'model','interaction','nested',nesting,'random',[3 4],'varnames',{'group','animal','time','depth'});
Do either of these approaches get close to correctly gauging the primary and interaction effects? Should I try fitlme instead? In which case I am not at all certain how to construct the formula representing the model I want. fitlme seems to be built under the assumption that I am going to run a regression, which is not exactly what I want to do. I'm mainly confused about what an "intercept effect" is.
Would any of the following be an appropriate representation of my experimental setup?
'Power ~ Group + (Time|Animal) + (Depth|Animal)'
'Power ~ Group + Time + (Time|Animal) + Depth + (Depth|Animal)'
'Power ~ Group + (Time-1|Animal) + (Depth-1|Animal)'
'Power ~ Group + Time + (Time-1|Animal) + Depth + (Depth-1|Animal)'
I'm not sure how to proceed, and any help is appreciated!

Risposte (2)

Ben
Ben il 22 Lug 2016
i feel your pain... i do similar experiments, and the biostats people here suggested mixed effects models (fitlme), although that could've been primarily due to the "unbalanced" nature of various levels in various groups of the hierarchy...
recently they told me that (due to not so many observations while trying to estimate too many terms) i should allow ONLY the intercept to vary randomly (by animal, i.e. each animal gets its own intercept, regardless of genotype or other effects taken into account already, because each animal may have a different "baseline", i.e. the intercept represents the response at zero treatment and?or zero depth and?or zero time...). this was after i "reduced" depth to a categorical variable (dorsal or ventral) so that i wouldn't have to worry about random effects of which depth i was sampling from. i imagine you could do the same with at least your depths...
there's a great youtube video on hierarchical linear models you could search called "HLM II: The General Linear Model and the Linear Mixed Model" from "methods consultants of ann arbor" that goes over how ANOVA and regression are mathematically identical somehow i didn't fully comprehend but it's certainly been useful for understanding mixed models.
the split plot experiment (tomato, soil, etc.) in the fitlme documentation (NOT fitlmematrix, although that may be useful for other reasons to you) might be appropriate for what you're looking for in terms of specifying random effects.
i know it's not much, but fwiw
  1 Commento
Andrew Chang
Andrew Chang il 22 Lug 2016
Ben, thanks for taking the time to answer. It's definitely confusing, and I'm starting to think there isn't any right or wrong only more or less commonly accepted.
Regarding intercepts, I've actually started normalizing all the data from each individual animal to the baseline values derived from that animal. This allows me to observe change in activity rather than absolute activity. I wonder if this is considered ok procedure.
I've currently reduced my depths to 6 levels, which is much more manageable than the original 23.
I'll take a look at the video from Ann Arbor and the fitlme documentation. I actually gave up on MATLAB for the stats analysis a little while ago and I'm currently using SPSS, but it may be more efficient in the long run to figure out how to do these analyses on MATLAB as it's much more flexible and modular.

Accedi per commentare.


Lima Parhiz
Lima Parhiz il 15 Gen 2020
Hello Andrew
I know this question is from a while ago but did you find out how to do the analysis? I have a somewhat similar data as you and I have to perform a similar analysis and have some issues with to proceed.

Categorie

Scopri di più su Biotech and Pharmaceutical in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by