Use of constraints with runmlwin

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
rdmcdowell
Posts: 31
Joined: Mon Apr 02, 2012 3:26 pm

Use of constraints with runmlwin

Post by rdmcdowell »

Hello. I have recently started using runmlwin within Stata-how much more efficient it is for multilevel modelling in terms of computation time! I have a couple of queries about the syntax:

a) can constraints be defined and used within the runmlwin Stata syntax? For example, I might have 3 random effects, and rather than estimate all covariances, impose constraints that some are equal, some zero etc.

b) where can I find the loglikelihood in the Stata output? Do I need to specify an option for this?

c) on a more mlwin related issue, can Mlwin handle models with excess zeros, such as truncated normal models or two-part models?

Many thanks indeed!

Ron McDowell
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: Use of constraints with runmlwin

Post by ChrisCharlton »

a) Yes, constraints can be used when fitting the models with (R)IGLS using the standard Stata commands. For an example of this see the replication materials for chapter 18 of the MLwiN user guide (http://www.bris.ac.uk/cmm/media/runmlwi ... d_Data.log).

b) The log-likelihood should be reported by default just after the grouping information for normal response models. It is also available in e(ll) after estimation. Non-normal estimation in (R)IGLS uses quasi-likelihood and therefore the likelihood cannot be accurately calculated.

c) I don't believe that you can fit the models that you mentioned, although there's possibly a parametrisation that would provide the equivalent model. One of my more statistical colleagues would need to confirm whether this is the case.
rdmcdowell
Posts: 31
Joined: Mon Apr 02, 2012 3:26 pm

Re: Use of constraints with runmlwin

Post by rdmcdowell »

Thanks a lot for your response. I'll be able to make use of that constraint feature now!
rdmcdowell
Posts: 31
Joined: Mon Apr 02, 2012 3:26 pm

Re: Use of constraints with runmlwin

Post by rdmcdowell »

Thanks for that information, which I have been able to make use of. I wondered if there is an equivalent process for imposing constraints on parameters when fitting the model using mcmc, as the constraints option is not recognised.

I also wondered if anyone could advice on whether it is appropriate to test whether the means of random effects are significantly different from each other without consideration of the variances? For example, I have a bivariate model with non-normal outcomes, and a common predictor x. I'm interested in testing the hypothesis whether the mean effect associated with x differs between outcomes. Do I need to consider whether the variances differ first/simultaneously? If anyone could fill in this gap in my knowledge, it would much appreciated! Thanks.
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Use of constraints with runmlwin

Post by GeorgeLeckie »

Hi Ron McDowell,

I'm afraid there is no way to implements constraints in MLwiN when using MCMC estimation. The exception is in multivariate response models and ordered and unordered multinomial models where for each covariate you can impose common or separately estimated coefficients for each response or log-odds contrast.

I wasn't entirely clear what you wanted to do in terms of your second query. If you want to see whether one predicted random effect is significantly different from another, you could retrieve the MCMC chain for each predicted random effect. Subtract one from the other and examine to what extent the difference differs from zero.

Best wishes

George
Post Reply