random slopes & MCMC

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
Tami90unikoeln
Posts: 5
Joined: Sun Apr 09, 2017 3:19 pm

random slopes & MCMC

Post by Tami90unikoeln »

Hey there,

I am new to runmlwin and encountered some problems I just can't figure out. I want to fit a two-level mutli level model with a binary dependent variable.

(1) I received an error message when I tried using MCMC estimation: Could not load plugin: c:\ado\plus\r\runmlwin_mcmcdiagnpstic . I am using MlwiN trial version 2.36 (it automatically downloaded the 32-bit version). Is there also a 64 bit version? Because my laptop is 64 bit and I am also using stata 14 64-bit version. Is this connected to the problem? Because some else posted the same question and was offered a solution but this didn't work (downloading a 64-bit version of the plugin). My checksum delivered: ...runmlwin_mcmcdiagnostic.plugin=2589902397, size=53248.


(2) I wnated to fit random slope models using mcmc. Mcmc as described in (1) did not work. So i thought I will use quasi-likelihood estimation first. However, when I was introducing two random slopes (so set the slopes for two individual variables at random) the model reported some errors. I used the following command:

runmlwin unempl one female young old second nonwest leduc meduc genatt_cc gdp14_cc c.genatt_cc#i.leduc c_genatt_cc#i.meduc, ///
level2(cntry: one leduc meduc) level1(id:) discrete(distribution(binominal) link(logit) denom(one)) mcmc(on) initsprevious nopause nogroup

Is there anything wrong with it? In a previous model where I only use one random slope the mdel could be estimated.
Is there a problem with using factor notation in runmlwin? So do I need to generate extra variables for the interaction terms? A related question would be if I can use globals in the regresion equation. For example, exchanging all individual level variables in the above equation with $control containing all of them. It does not seem to work, but maybe I just did something wrong?

I would be sooooo greatful for any help or advice:-)
Thanks in advance
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: random slopes & MCMC

Post by ChrisCharlton »

Could you please provided details of any error messages that you are getting?

Chapter 6 of the replication materials for the MCMC manual using Stata (available at http://www.bristol.ac.uk/cmm/software/r ... /examples/) provides examples of random slopes models using MCMC. Can you confirm that these examples work for you?

The model syntax for -runmlwin- should work the same as for other Stata commands, however there are sometimes cases where the xi prefix (see http://www.stata.com/help.cgi?xi) is required when using interactions, which might apply in your case.
Tami90unikoeln
Posts: 5
Joined: Sun Apr 09, 2017 3:19 pm

Re: random slopes & MCMC

Post by Tami90unikoeln »

Hey,
thank you so much for your reply . You seemd to be right about the xi. Then I could use stata's factor notation, so no error messages. Just this before the output: note: 0b.leduc#co.genatt_cc omitted because of collinearity
0b.meduc#co.genatt_cc omitted because of collinearity
However, the interaction effects seemed still to be in the output. So I guess I don't need to worry about that. This did not appear when I did not use factor notation, so....

But I tried to run one simple example from the user manual for MlwiN for random slope with mcmc. I tried it exactly like this:
use "http://www.bristol.ac.uk/cmm/media/runm ... torial.dta", clear
quietly runmlwin normexam cons standlrt, ///
> level2(school: cons standlrt) ///
> level1(student: cons) ///
> nopause
runmlwin normexam cons standlrt, ///
> level2(school: cons standlrt) ///
> level1(student: cons) ///
> mcmc(on) initsprevious nopause

The error message is as follows:
Could not load plugin: c:\ado\plus\r\runmlwin_mcmcdiagnostics.plugin
(error occurred while loading runmlwin_mcmcdiag.ado)
Checksum: Checksum for c:\ado\plus\r\runmlwin_mcmcdiagnostics.plugin = 2589902397, size = 53248

What can I do????
Thank you very much in advance
ChrisCharlton
Posts: 1353
Joined: Mon Oct 19, 2009 10:34 am

Re: random slopes & MCMC

Post by ChrisCharlton »

It's possible that you are missing a required Windows component. Please see my response to your question in the other thread:

viewtopic.php?f=3&t=593#p4650
Tami90unikoeln
Posts: 5
Joined: Sun Apr 09, 2017 3:19 pm

Re: random slopes & MCMC

Post by Tami90unikoeln »

Yes thanks I actually already saw that post and tried that link but I still receive the error message..?
Post Reply