How do you constrain covariances to zero?
Posted: Wed Oct 05, 2011 12:50 pm
Hi,
I've got a multivariate response model with two levels (measurement occasion within individuals) and I'm trying to set some of the covariances of the individual level random effects to be zero. I've tried this with the elements() option at level 2 and have either got the error:
"Run-time error `6':
Overflow"
or the model has run but not constrained any of the covariances to zero. When I fit the model in MLwiN without running from Stata it converges OK so I don't think this is the problem. I'm not sure if I'm specifying the matrix in the right way, I've done it like this:
matrix A = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1)
runmlwin ...., level2(id: (variable list, eq(1)) (variable list, eq(2)), elements(A)) ...
I've also tried using the constraints command to constrain some of the elements of the variance-covariance matrix to be zero, and this seems to work if it is one of the first 10 or so elements of the matrix but the constraints don't seem to have any effect on later elements of the matrix.
Any help would be much appreciated!
Thanks
Corrie
I've got a multivariate response model with two levels (measurement occasion within individuals) and I'm trying to set some of the covariances of the individual level random effects to be zero. I've tried this with the elements() option at level 2 and have either got the error:
"Run-time error `6':
Overflow"
or the model has run but not constrained any of the covariances to zero. When I fit the model in MLwiN without running from Stata it converges OK so I don't think this is the problem. I'm not sure if I'm specifying the matrix in the right way, I've done it like this:
matrix A = (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1)
runmlwin ...., level2(id: (variable list, eq(1)) (variable list, eq(2)), elements(A)) ...
I've also tried using the constraints command to constrain some of the elements of the variance-covariance matrix to be zero, and this seems to work if it is one of the first 10 or so elements of the matrix but the constraints don't seem to have any effect on later elements of the matrix.
Any help would be much appreciated!
Thanks
Corrie