Page 1 of 1

random slopes & MCMC

Posted: Mon Apr 10, 2017 6:06 pm
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

Re: random slopes & MCMC

Posted: Tue Apr 11, 2017 12:48 pm
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.

Re: random slopes & MCMC

Posted: Thu Apr 13, 2017 7:06 am
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

Re: random slopes & MCMC

Posted: Thu Apr 13, 2017 10:37 am
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

Re: random slopes & MCMC

Posted: Fri Apr 28, 2017 4:43 pm
by Tami90unikoeln
Yes thanks I actually already saw that post and tried that link but I still receive the error message..?