how does one specify a nested covariance pattern in fitlme?
14 views (last 30 days)
Show older comments
i'm new to mixed effects models to begin with, but i'm having an impossible time understanding how to specify nested covariance patterns in fitlme. my current understanding is that with 'CovariancePattern', {'Full','Diagonal'} i'm actually specifying two patterns, one for each of two separate groupings, i.e. one grouping gets 'Full' and the other 'Diagonal'...
i thought the block example in the fitlmematrix documentation might help, but it showed me nothing new... which could very well be from my lack of knowledge in this arena. i'm trying to specify a covariance pattern that has matrices only along the diagonal, each of which has its own Full pattern (i.e. correlated locations are represented in the smaller matrices that each correspond to one animal, which is uncorrelated to other animals i have, which are all represented in the larger matrix.)
let me know if that wasn't confusing enough... thanks, b s
0 Comments
Answers (4)
Gautam Pendse
on 18 Nov 2015
Hi Ben,
Look at the example titled "Split-Plot Experiment" at:
Does this help?
Gautam
Gautam Pendse
on 23 Nov 2015
Hi Ben,
The specification "(Pitx*DV|animal:APxML)" above has only 1 grouping variable - namely "animal:APxML". So 'CovariancePattern' could be {'Diagonal'} for example.
Suppose you have a model say 'y ~ 1 + (x | A) + (z | B)' then this model has two grouping variables A and B - now it would make sense to use 'CovariancePattern' equal to {'Diagonal','Full'}.
Hope this helps,
Gautam
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!