Page 1 of 1

DSGE_VAR prior weight equals inf not allowed? bugs?

PostPosted: Thu Dec 23, 2010 10:25 pm
by jiangmin
Hi,

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
PosteriorIRF('posterior');

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

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!!