nlmefit compound symmetry covariance pattern?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (1)
the cyclist
le 15 Fév 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
nlmefit(...,'CovPattern',P)
and the output covariance is
PSI =
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.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!