## logistic variance covariance matrix

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/
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

### logistic variance covariance matrix

Hi all ,
I have a two-level model with multiple imputed data. After fitting IGLS model when i want to fit it using MCMC, i got the following error. I also tried to change the vectors size but i still get the error messege. My syntax are as below. Why this happen? Any help please.

quietly mi est, cmdok: runmlwin Response cons V1 V2 V3, level2 (District: cons) level1(id:) discrete(dist (binomial) link(logit) denom (cons)) mlwinsettings(optimat) nopause

matrix b = e(b_mi)
matrix v = e(v_mi)

mi est, cmdok: runmlwin Response cons V1 V2 V3, level2 (District: cons) level1(id:) discrete(dist (binomial) link(logit) denom (cons)) mcmc(on) initsb(b) initsv(v) mlwinsettings(optimat) nopause
r(198);
The matrix of initial variance values in initsv() is of a different length to that expected by -runmlwin-.
ChrisCharlton
Posts: 1252
Joined: Mon Oct 19, 2009 10:34 am

### Re: logistic variance covariance matrix

This may be to do with capitalisation as I believe that the covariance matrix for the imputed models is stored in e(V_mi) rather than e(v_mi). You can confirm this by checking whether it contains any values with the following command:

Code: Select all

``matrix list v``
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

### Re: logistic variance covariance matrix

Thanks. I revised the command and it worked OK, but after that, my model didn't converge and i got following error message:
model did not converge on m=1
Last edited by ali482002 on Wed Jan 13, 2016 1:52 pm, edited 1 time in total.
ChrisCharlton
Posts: 1252
Joined: Mon Oct 19, 2009 10:34 am

### Re: logistic variance covariance matrix

As MCMC does not converge to a single estimate we do not set the e(converged) output to one after running the model, which is probably what is causing the message you are seeing. For a workaround see the last post in the following thread: https://www.cmm.bristol.ac.uk/forum/viewtopic.php?t=868.