DSGE_VAR prior weight equals inf not allowed? bugs?


When I estimate a model using the DSGE_VAR framework, and set the parameter dsge_prior_weight to inf, all the estimation procedure works fine, but this error message comes up when computing the bayesian_irf:

??? Error using ==> randn
NaN and Inf not allowed.

Error in ==> rand_inverse_wishart at 44
X = randn(v, m) * H_inv_upper_chol;

Error in ==> PosteriorIRF_core1 at 186
SIGMAu_draw = rand_inverse_wishart(nvobs,
DSGE_PRIOR_WEIGHT-NumberOfParametersPerEquation, …

Error in ==> PosteriorIRF at 199
[fout] = PosteriorIRF_core1(localVars,1,B,0);

Error in ==> dynare_estimation_1 at 1120

Error in ==> dynare_estimation at 62

Based on the dsge_var entry of the dynare wiki, it seems to me that setting dsge_prior_weight to infinity (as Del Negro and Schorfheide have done in various papers) in dynare is allowed. But the error seems to suggest that inf blows up the dimension of matrix in the irf draws…Is this a bug that needs to be fixed? (otherwise I have to set the weight to a large number, say 10000, to ‘approximate’ infinity?)

Thank you very much!!

Did you get run it?

could you post the lambda prior?

i put
dsge_prior_weight, uniform_pdf,inf,2;
but the code doesnt run!

Someone can help me?

@stepan-a @jpfeifer could you help me?

i cant get run my code with:

dsge_prior_weight, uniform_pdf,inf,2;

i’d like to elicit a prior mean infinity to dsge_prior_weight.

best reguards


You should read the reference manual, the prior you define here makes no sense: a uniform distribution cannot have an infinite expectation (first argument after the declaration of the prior shape).


i read the reference manual. how do you would elicit this prior? what distribution i should use?

dsge_prior_weight, ?_pdf,inf,2;

Dynare does not provide priors centered on infinity. If you want to estimate a DSGE-VAR model with \lambda=\infty you have to calibrate the parameter.


okay. i will do it.