Page 1 of 1

logistic variance covariance matrix

Posted: Tue Jan 12, 2016 9:09 am
by ali482002
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-.

Re: logistic variance covariance matrix

Posted: Tue Jan 12, 2016 2:41 pm
by ChrisCharlton
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

Re: logistic variance covariance matrix

Posted: Wed Jan 13, 2016 9:25 am
by ali482002
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

Re: logistic variance covariance matrix

Posted: Wed Jan 13, 2016 9:50 am
by ChrisCharlton
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.