How can I change the variance in the Runmlwin Command?

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/
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: How can I change the variance in the Runmlwin Command?

Post by ChrisCharlton »

You can't add a check directly because, as far as I can remember, -runmlwin- doesn't have a way to determine that it is being run in the context of an -mi- command. It would however be possible to add an option to turn the behaviour on or off manually. Probably the simplest way for you do to this would be to define a global that you then check as part of the condition used to determine whether to modify the results.
likestatistic
Posts: 39
Joined: Fri Sep 12, 2014 4:11 pm

Re: How can I change the variance in the Runmlwin Command?

Post by likestatistic »

Great thanks you for your suggestion.
I would like to display c1099 (covariance matrix of fixed parameter estimates) back in stata (for future use if needed) .
It is possible?
If yes, can you please help me?

Many thanks

L
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: How can I change the variance in the Runmlwin Command?

Post by ChrisCharlton »

The values in this column should end up as the first part of the matrix e(V) returned from -runmlwin-. Is this sufficient for what you need, or does it need to still be in the column form?
likestatistic
Posts: 39
Joined: Fri Sep 12, 2014 4:11 pm

Re: How can I change the variance in the Runmlwin Command?

Post by likestatistic »

The format of the matrix displayed in stata (matrix list e(V)) is massive when running the model with a lot of covariables.
Is it possible to collect them in a different ways (like the column way you are suggesting)?

Thanks

L
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: How can I change the variance in the Runmlwin Command?

Post by ChrisCharlton »

Without modifying runmlwin.ado you could extract just the fixed part of the matrix as follows:

Code: Select all

matrix V = e(V)
matrix FP_V = V["FP1:", "FP1:"]
matrix list FP_V
You could convert this to a single column as follows (although this will be the full matrix, rather than the half you get in MLwiN):

Code: Select all

matrix Vcol = vec(FP_V)
matrix list Vcol
If you wanted the values in exactly the same format as in MLwiN, and didn't mind editing the .ado file then you could save the FP_V variable that is brought back with the other model results from MLwiN.
likestatistic
Posts: 39
Joined: Fri Sep 12, 2014 4:11 pm

Re: How can I change the variance in the Runmlwin Command?

Post by likestatistic »

Thank you very much for your help, I Really appreciate it.
All the best

L
Post Reply