MCMC starting values
Posted: Tue Dec 10, 2013 2:26 pm
Hello
(- sorry, not sure in which forum this fits best -)
I'm trying to estimate a multilevel mixed response model in MLwiN using MCMC and own starting values (all run through runmlwin). Unfortunately, MLwiN crashes every time. I use the example from the runmlwin help file to illustrate my problem ('Two-level mixed bivariate continuous and binary response probit model (fitted using IGLS MQL1)'). I only get a Windows error message, not one from MLwiN.
I tried this with a bivariate linear model and it worked fine. So I assume this has something to do with constraining the variance of the probit error term to 1?
The matrices BB and V look like this:
Cheers
Nils
(- sorry, not sure in which forum this fits best -)
I'm trying to estimate a multilevel mixed response model in MLwiN using MCMC and own starting values (all run through runmlwin). Unfortunately, MLwiN crashes every time. I use the example from the runmlwin help file to illustrate my problem ('Two-level mixed bivariate continuous and binary response probit model (fitted using IGLS MQL1)'). I only get a Windows error message, not one from MLwiN.
Code: Select all
* Load data
use http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial, clear
generate binlrt = (standlrt>0)
* Run IGLS model (works fine!)
runmlwin (normexam cons, equation(1)) ///
(binlrt cons, equation(2)) ///
, level1(student:(cons, equation(1)) (cons, equation(2))) ///
discrete(distribution(normal binomial) link(probit) denominator(cons cons)) ///
nosort nopause batch mlwinpath("C:\Program Files (x86)\MLwiN v2.28\i386\mlwin.exe") maxiterations(250)
* Run MCMC with IGLS starting values (works fine!)
runmlwin (normexam cons, equation(1)) ///
(binlrt cons, equation(2)) ///
, level1(student:(cons, equation(1)) (cons, equation(2))) ///
discrete(distribution(normal binomial) link(probit) denominator(cons cons)) ///
nosort nopause batch mlwinpath("C:\Program Files (x86)\MLwiN v2.28\i386\mlwin.exe") ///
mcmc(on burnin(50) chain(200)) initsprevious
* Specify own starting values
// Betas
matrix BB = [0,0,1,0.5,1]
// Covariance matrix with last row set to zeros
matrix A = J(2,2,0.125)
matrix B = J(3,3,0.125)
matrix C = J(2,3,0)
matrix A = A, C
matrix B = C', B
matrix V = A \ B
forvalues i = 1/5 {
matrix V[`i',`i'] = 0.125
matrix V[5,`i'] = 0
}
mata: st_replacematrix("V", makesymmetric(st_matrix("V")))
* Run MCMC with own starting values (doesn't work)
runmlwin (normexam cons, equation(1)) ///
(binlrt cons, equation(2)) ///
, level1(student:(cons, equation(1)) (cons, equation(2))) ///
discrete(distribution(normal binomial) link(probit) denominator(cons cons)) ///
nosort nopause batch mlwinpath("C:\Program Files (x86)\MLwiN v2.28\i386\mlwin.exe") ///
mcmc(on burnin(50) chain(200)) initsb(BB) initsv(V)
The matrices BB and V look like this:
Code: Select all
BB[1,5]
c1 c2 c3 c4 c5
r1 0 0 1 .5 1
Code: Select all
symmetric V[5,5]
c1 c2 c1 c2 c3
r1 .125
r2 .125 .125
c1 0 0 .125
c2 0 0 .125 .125
c3 0 0 0 0 0
Nils