nlmefit compound symmetry covariance pattern?

1 view (last 30 days)
Hi, I am using nlmefit to fit a model of a "repeated measures" kind. The function provides very powerful control over the covariance matrix, but I could not find how to set compound symmetry. I have four measures, indicated in the design matrix as separate columns:
X = [ measure==1 measure==2 measure==3 measure==4 ]
I would like the form
[ x y y y
y x y y
y y x y
y y y x ]
Such that there is a fixed correlation between the four measures. But if I use
'covpattern', eye(4)+1
It doesn't constrain the `y` variances to be constant. When I examine `psi`, they are all free/estimated.

Answers (1)

the cyclist
the cyclist on 15 Feb 2016
My understanding of the "CovPattern" input is that zero/nonzero entries merely indicate which terms can have covariance with each. For example, one of the documentation examples is
P =
1 1 0
1 1 0
0 0 1
and the output covariance is
0.5180 0.1069 0
0.1069 0.0221 0
0 0 0.0454
In your case, you put all nonzero entries -- the magnitudes are irrelevant, I think -- and you got covariance entries for all terms.
I don't know of a way to specify the covariance structure you want.

Community Treasure Hunt

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

Start Hunting!