I have a two-level multinomial model. After fitting my model using MQL1, I want it fit it by MCMC. However I get the following error message:
“error while obeying batch file C:\user… at line number 2183: MCMC 0 500 1 5.8 10 C1411] C1412] 2 2 2 1 1 6”
After reading the materials online, I realize this is due to the negatively defined covariance matrix, and that I need to manually alter the priors. So instead of initsprevious, I need to use initsb() initsv(). But here is the problem.
Using the help file example as an illustration (it doesn’t have any problem with covariance matrix of course):
Code: Select all
use http://www.bristol.ac.uk/cmm/media/runmlwin/bang, clear
generate lc1 = (lc==1)
generate lc2 = (lc==2)
generate lc3plus = (lc>=3)
runmlwin use4 cons lc1 lc2 lc3plus, level2(district: cons) ///
level1(woman) ///
discrete(distribution(multinomial) link(mlogit) denom(cons) basecategory(4)) ///
nopause
Code: Select all
matrix b = e(b)
matrix V = e(V)
runmlwin use4 cons lc1 lc2 lc3plus, level2(district: cons) ///
level1(woman) ///
discrete(distribution(multinomial) link(mlogit) denom(cons) basecategory(4)) ///
mcmc(on) initsb(b) initsv(V) ///
nopause
Here I haven’t tried to modify the priors yet, which is supposed to come at next step. But I got the following error message:
Code: Select all
“The row vector b of initial values in initsb() is of length 22, but -runmlwin- expects the row vector to be of length 21.”