Error while obeying batch file

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/
Post Reply
bhaskarstatistics
Posts: 3
Joined: Wed Jun 24, 2015 11:33 am

Error while obeying batch file

Post by bhaskarstatistics »

Dear All,

I am a beginner of runmlwin and trying to execute the random coefficient model through this via MCMC method of estimation. For fitting the model using MCMC, Initial values of the parameter were specified from the previous model based on IGLS (through the default MQL1) method of estimation. For the previous model based on IGLS (through the default MQL1), there were no errors displayed.

The the code for the previous model is

Code: Select all

runmlwin pnmr caste_sc caste_st caste_obc treated_water fuel mother_age20_24 ///
mother_age_less_20 mother_age_gr_eq_30 w_edu5_9 w_edu_ls_5 hus_edu5_9 hus_edu_ls_5 ///
b_order2 b_order3 b_order4 new_born_sex anc_when_2nd_trim anc_when_1st_trim ///
days_ifa_upto90 days_ifa_gr_90 num_tet1_2 num_tet_gr_2  swelling ///
abnormal_foetus_position no_d_sign1_3 no_d_sign4_7 colostrum first_bf_within_24h ///
first_bf2_3days first_bf_after_3days diarr_know_score1 diarr_know_score2 ///
diarr_know_score_eq_gr_3 dist_num_anc_d cons, level2(id_dist2: cons dist_num_anc_d) level1(hhno) ///
discrete(distribution(binomial) link(logit) denominator(cons)) maxiterations(50) nopause 
After the execution of above code, I tried to execute the code for the model based on MCMC estimation procedure.

The code for the subsequent model is

Code: Select all

runmlwin pnmr caste_sc caste_st caste_obc treated_water fuel mother_age20_24 ///
mother_age_less_20 mother_age_gr_eq_30 w_edu5_9 w_edu_ls_5 hus_edu5_9 hus_edu_ls_5 ///
b_order2 b_order3 b_order4 new_born_sex anc_when_2nd_trim anc_when_1st_trim ///
days_ifa_upto90 days_ifa_gr_90 num_tet1_2 num_tet_gr_2  swelling ///
abnormal_foetus_position no_d_sign1_3 no_d_sign4_7 colostrum first_bf_within_24h ///
first_bf2_3days first_bf_after_3days diarr_know_score1 diarr_know_score2 ///
diarr_know_score_eq_gr_3 dist_num_anc_d cons, level2(id_dist2: cons dist_num_anc_d) level1(hhno) ///
discrete(distribution(binomial) link(logit) denominator(cons)) mcmc(burnin(5) chain(50)) ///
initsprevious nopause nogroup
Here dist_num_anc_d is the level2 covariate. When I executed the code for the subsequent model based on MCMC, I got an error on the MlwiN window. The error was like this.
ERROR:
error while obeying batch file
C:\Users\hp\AppData\Local\Temp\ST_00000008.tmp at line number
1497:
WEST

Unable to invert va.

After that I changed the MlwiN path from "global MLwiN_path C:\Program Files\MLwiN v2.33\i386\mlwin.exe" to "global MLwiNScript_path C:\Program Files\MLwiN v2.33\i386\mlnscript.exe" and re-executed both the previous model and subsequent model. I got the same error message.

My MLwiN is version 2.33.
My Stata is version 12.1 (IC 32-bit).


Please suggest me how to fix it. Thank you very much for this help
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Error while obeying batch file

Post by ChrisCharlton »

This could indicate a problem with the starting values for the random part covariance matrix. What do the results from the IGLS model you are using for this look like? If this is the case you could work around this by providing your own values.
bhaskarstatistics
Posts: 3
Joined: Wed Jun 24, 2015 11:33 am

Re: Error while obeying batch file

Post by bhaskarstatistics »

Thank you very much for sparing your valuable time on my problem. As you told perhaps estimated variances in the previous model are creating problem. Variances can not be negative but here in my result lower limit of the 95% CI's corresponding to the intercept variance and slope variance are negative. Please find the attachment of the initial result estimated by IGLS (MQL1 method). If the problem is same as you guessed than how to fix it. I mean how to initialize values in code sh that the issue will be solved.

Thanks in advance

Bhaskar
Attachments
attachment.pdf
(52.81 KiB) Downloaded 539 times
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Error while obeying batch file

Post by ChrisCharlton »

You appear to have added the diagonal option to the IGLS model you provided results for. Does the MCMC model work if you do likewise there? Have you tried using this modified model specification to provide starting values for the MCMC model that was giving you trouble previously?
bhaskarstatistics
Posts: 3
Joined: Wed Jun 24, 2015 11:33 am

Re: Error while obeying batch file

Post by bhaskarstatistics »

Thank you very much sir for your kind help. It works when I add diagonal option in the MCMC model (the same what I used in the previous model estimated by IGLS).

Thank you once again.

Your Bhaskar
Post Reply