Page 1 of 1

Calculating the Likelihood

PostPosted: Wed Mar 04, 2015 12:59 pm
by mjs19
Hi,
I am trying to obtain the likelihood for different parameter values as suggested here: viewtopic.php?f=1&t=5547.

However, I keep getting some weird, large positive value. I have attached the code and datafile.

Thanks.

Re: Calculating the Likelihood

PostPosted: Wed Mar 04, 2015 1:22 pm
by jpfeifer
First of all, your data is weird. The steady state in your model is about 2.3 while the mean of your data is 12. Regarding the positive values, note the sign convention in Dynare. The unstable version is more explicit. It says:
Final value of minus the log posterior (or likelihood):187.244057

Thus, the posterior is actually negative (although positive values are also possible, see e.g. http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=2847)

Re: Calculating the Likelihood

PostPosted: Wed Mar 04, 2015 1:28 pm
by mjs19
So you mean that the value of the variable likelihood as in:
Code: Select all
[likelihood,junk1,junk2,exit_flag,ys,trend_coeff,info] = dsge_likelihood(xparam1,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

is negative?
Or should I just read off from Dynare`s output somewhere?If that is the case, how can I tell Dynare to evaluate likelihood at different parameter values?
Thanks.

Re: Calculating the Likelihood

PostPosted: Sun Mar 08, 2015 8:52 am
by jpfeifer
The output value of
Code: Select all
dsge_likelihood

is minus the log-likelihood/log-posterior, because we operate a minimizer and not a maximizer on that function.