Cannot have number of chains for variance or coefficient bigger than 1

Dear Sir/Madam,

I am working on an MS-BVAR model.

I can run the model smoothly when I set the number of chain for variance = 1 and the number of chain for coefficient = 1.

I encounter problem when I set the number of chains for variance = 2 while keeping the number of chain for coefficient = 1.
The following error messages are displayed:

Error reading data after line identifier //== Number of states for state_variable[2] ==//.
Error in MS-SBVAR MEX file.

Error using mexErrCheck (line 41)
Error encountered in: ms_sbvar_create_init_file.

Error in ms_sbvar_setup (line 432)
mexErrCheck(‘ms_sbvar_create_init_file’,err);

Error in ms_estimation (line 40)
ms_sbvar_setup(options_);

Error in msbvar.driver (line 106)
[options_, oo_] = ms_estimation(M_, options_, oo_);

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

Kindly please help me with this.
I attached the files.

Thank you very much for your help.

Best regards,
Eric

msbvar.mat (6.8 KB) msbvar.mod (885 Bytes)

My guess is that the two need to be consistent.

Dear Prof. Pfeifer,

Thank you very much for your answer.

I will try to use the same number of chains for variance and the coefficient to make them more consistent, then.

Best regards,
Eric

Dear Prof. Pfeifer,

I have tried to set equal number of chains for the variance and the coefficients (e.g. variance = 2, coefficient = 2; (3,3), etc.) , but still receive the same error messages.

I may misunderstood what you meant by consistency.
Kindly please let me know about the consistency that you referred to.

Or may be I have to accept the error as a sign of limitation to my model, i.e. it can only run for number of chain of variance = 1 and coefficient = 1.

I also wonder whether the error comes from the non-modelling issue, e.g. my computer server denies dynare to save due to the big size of the MEX file.

Thank you very much for your answer, Prof. Pfeifer.

Best regards,
Eric

The problem is that this is externally developed code which I have a hard time debugging. I contacted the authors but did not yet get a reply.

Dear Prof. Pfeifer,

Well noted about the issue.

Thank you very much for contacting the author.
I really appreciate your help.

Best regards,
Eric

Dear Prof. Pfeifer,

Still for the same case about I cannot set chain for variance or the coefficient bigger than 1 in the Hakkio model.
I tried to change coefficients of prior hyperparameters to see whether the problem comes from there.
By making the all the six coefficients smaller, the model can run more iterations to 48 iterations (from 32 in the initial coding) but cannot go further as improvement < crit termination.
The error message are displayed below.
I attach the mod file and the data as well.
It possible to lower to crit termination to enable the model to run?

Thank you very much for your answer.

Best regards,
Eric


Improvement on iteration 47 =        0.000000001
-----------------
-----------------
f at the beginning of new iteration,      6347.4239213651
x =    0.0006295044  0.00040519441  2.6815897e-05 -0.00040465661  0.00063034509
 -9.0167244e-05 -0.00027130291 -4.0049188e-05  -0.0014191614  3.9996363e-05
  0.00042205712 -0.00091225216
Predicted improvement:        0.000000000
lambda =          1; f =         6347.4239214
Norm of dx 3.4241e-09

ih =

     1

----
Improvement on iteration 48 =        0.000000000
improvement < crit termination
    0.5000         0
         0    1.0000
    0.5000         0

Error reading data after line identifier //== Number of states for state_variable[2] ==//.
Error in MS-SBVAR MEX file.

Error using mexErrCheck (line 41)
Error encountered in: ms_sbvar_create_init_file.

Error in ms_sbvar_setup (line 432)
mexErrCheck('ms_sbvar_create_init_file',err);

Error in ms_estimation (line 40)
    ms_sbvar_setup(options_);

Error in msbvar.driver (line 106)
[options_, oo_] = ms_estimation(M_, options_, oo_);

Error in dynare (line 293)
evalin('base',[fname '.driver']) ;

msbvar.mat (6.8 KB) msbvar.mod (897 Bytes)

Unfortunately, that is not the solution. Having improvement < crit termination simply means the step has successfully concluded. The problem is after that.

Dear Prof. Pfeifer,

Thank you for your answer.
Noted that the problem lies after that stage.

I will examine the coding and the data again.

Best regards,
Eric