How do you constrain covariances to zero?

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
Corrie
Posts: 5
Joined: Mon Nov 01, 2010 4:41 pm

How do you constrain covariances to zero?

Post by Corrie »

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
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: How do you constrain covariances to zero?

Post by GeorgeLeckie »

Hi Corrie,

Sounds like a big model, we will look into it.

Please send me:

(1) Saved MLwiN worksheet of converged model setup via GUI (so that I know what the final model and estimates should be!)

(2) Do-file and data set to replicate error messages produced by runmlwin

We will then work on a fix

Best wishes

George
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: How do you constrain covariances to zero?

Post by GeorgeLeckie »

Hi Corrie,

Yes there was a small error in the constraints option. Thank you for spotting this. We have now fixed this and this will be available officially in a week or so. We have emailed you a temporary file to fix the problem while you wait for the official released.

However, we were not able to replicate your main error message. We suggest that you update to the latest versions of MLwiN and runmlwin to see whether you still get the same error message.

Code: Select all

. ssc install runmlwin, replace
A word of general advice. When you have models as complex as yours you must really build up to the final model using a series of runmlwin calls to increasingly complex models. For each model you use the parameter estimates from the previous model as starting values for the next. You will need far fewer IGLS iterations per model when you do this and your models will be much more stable. I would strongly recommend doing this.

Best wishes

George
Post Reply