Some questions, few answers

Hello all,
I have some questions where I don’t find “the” answer. In some papers, I find “an” answer, but never “the” answer. So in this forum of specialists, I think that there is one good guy able to give me “the” right answer

1/
I would like to know which parameters values Dynare takes into account in order to compute a stoch_simul after an estimation command.
Does Dynare take the calibrated parameters, the results from posterior maximization, or the results from the Bayesian estimation?

2/
I try to use the model_comparison() command but in the log file I see this:
model_comparison:: The user supplied prior distribution over models is improper…
model_comparison:: The distribution is automatically rescaled!

Is it important (I think yes but tell me) ? and if it is, how to specify a “prior distribution over models”, practically and theoretically ?

3/
I obtain a Log data density of -282.723580
This result is negative, but is it an important thing ? I mean, if I have -282 with model 1 and -300 with model 2, could I say that model 1 is “better” than model 2 ? or does the log data density always need to be positive in order to compare models ?

Thank u in advance
Jonathan

Thank you Jonathan for your questions, it’s exactly what i need !!!

Thank u very much. I hope we get some answers…

I have an other question: when I run my model’s estimation, with mh_nblocks=1, it’s fine. But when I run with mh_nblocks=2, then dynare stops and tell that:

MCMC Diagnostics: Univariate convergence diagnostic, Brooks and Gelman (1998):
??? Error: File: McMCDiagnostics_core.m Line: 36 Column: 8
Functions cannot be indexed using {} or . indexing.

Error in ==> McMCDiagnostics at 100
fout = McMCDiagnostics_core(localVars,1,npar,0);

Error in ==> dynare_estimation_1 at 1055
McMCDiagnostics(options_, estim_params_, M_);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> mymodel at 247
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Is someone have any idea how to solve this issue ?

Thank u in advance for your responses.
Jonathan

No one can help me ?

Hi,

  1. if the instruction stoch_simul appears after the block estimation, it will be computed from the parameters’ estimated value.

  2. the error msg u got might be due to the priors associated with each model u wanna compare. Make sure the sum of weights is equal to unity. By default the comparison is based on the Laplace approximation.

  3. if ur log density is negative, it means ur likelihood is less than 1, then taking the log give naturally a negative number.
    Since you wanna select the model with the higher likelihood, in ur example it means that model 1 ‘fit better’ than model 2…

Regarding the MH block issue, I might need ur mod-file to reproduce the error… could you post it plz?

Best

Thank u very much but your answers are not satisfying me for 2 and 3 :wink:

2/ OK, but how to specify a “prior distribution over models”, practically and theoretically? I mean, following your answer, how to specify the “weights” in my .mod file ? What is the signification of these “weights” ?

3/ OK, I know that my likelihood is less than 1, but is it significant ? Is the fact that my likelihood is less than one give me some information about my model?

4/ Concerning the mh_nblocks issue, I enclose the .mod file

5/ I have another question: In “classical” estimations (fiml, gmm, ols …), we have a determination coefficient (R2), student tests or Akaike criterion for examples, in order to say that our estimation is “good or not”. What are the main indicators to look at in bayesian estimations? Are the student tests given by the “POSTERIOR MAXIMISATION” in Dynare bayesian estimation (just before MH iterations) are relevant ?

Thank u very much for all of your past and future answers :smiley:

Sincerly yours
Jonathan
model.mod (2.24 KB)

I’m sorry, I’ve forgotten the corresponding datafile
Thanks for all

ps: change the filename in .mat after downloading in the same folder than model.mod (why .mat is not allowed in the forum attachments ?)

Sincerly yours
Jonathan
data.m (4.92 KB)

Have u tried to run your .mod with different prior distributions???

yes, but there is no significant changes…

thank u blur for your help and tell me if you find something or if you can answer to my questions

Hi,

This message simply warns you that the sum of probabilities (associated to the different models) does not sum to one. Dynare then rescales the distribution, so that the probabilities add to one. There is a huge statistical literature about the choice of a prior distribution over models. I have no precise reference in mind right now, but if you google model comparison bayesian prior you will find tons of papers about this problem. You can start with a uniform distribution…

Best,
Stéphane.

Hi,

[quote=“jonathanb”]

I have an other question: when I run my model’s estimation, with mh_nblocks=1, it’s fine. But when I run with mh_nblocks=2, then dynare stops and tell that:

MCMC Diagnostics: Univariate convergence diagnostic, Brooks and Gelman (1998):
??? Error: File: McMCDiagnostics_core.m Line: 36 Column: 8
Functions cannot be indexed using {} or . indexing.

Error in ==> McMCDiagnostics at 100
fout = McMCDiagnostics_core(localVars,1,npar,0);

Error in ==> dynare_estimation_1 at 1055
McMCDiagnostics(options_, estim_params_, M_);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> mymodel at 247
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Is someone have any idea how to solve this issue ?

Thank u in advance for your responses.
Jonathan[/quote]

I have already seen this bug. Are you using matlab version 7.0 or an older version ? A quick workaround is to use option nodiagnostics with the estimation command (Dynare won’t compute the convergence diagnostics).

Best, Stéphane.

I use the R2009B 64bits

Thank u very much for your answers.