Fix bug in dsge_var_likelihood.m where constant was not considered for dof when Gamma function was computed
Does not affect the maximum of the posterior as it only affects constant termtime-shift
parent
4486d098b5
commit
029e9495ba
|
@ -248,10 +248,10 @@ if ~isinf(dsge_prior_weight)% Evaluation of the likelihood of the dsge-var model
|
|||
PHI_tilde = tmp2*tmp1'; %formula (28), DS (2004)
|
||||
clear('tmp1');
|
||||
prodlng1 = sum(gammaln(.5*((1+dsge_prior_weight)*NumberOfObservations- ...
|
||||
NumberOfObservedVariables*NumberOfLags ...
|
||||
NumberOfParameters ...
|
||||
+1-(1:NumberOfObservedVariables)'))); %last term in numerator of third line of (A.2), DS (2004)
|
||||
prodlng2 = sum(gammaln(.5*(dsge_prior_weight*NumberOfObservations- ...
|
||||
NumberOfObservedVariables*NumberOfLags ...
|
||||
NumberOfParameters ...
|
||||
+1-(1:NumberOfObservedVariables)'))); %last term in denominator of third line of (A.2), DS (2004)
|
||||
%Compute minus log likelihood according to (A.2), DS (2004)
|
||||
lik = .5*NumberOfObservedVariables*log(det(dsge_prior_weight*NumberOfObservations*GXX+mXX)) ... %first term in numerator of second line of (A.2), DS (2004)
|
||||
|
|
Loading…
Reference in New Issue