From 7f9d2968d9ce632e977d8623c4a9ddeb2c018afb Mon Sep 17 00:00:00 2001 From: Marco Ratto Date: Fri, 8 Jun 2012 08:50:07 +0200 Subject: [PATCH] fixed bug introduced in previous commit: offset needs to be computed for analytic derivatives. --- matlab/dsge_likelihood.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/matlab/dsge_likelihood.m b/matlab/dsge_likelihood.m index 1e7eada0f..3ac354605 100644 --- a/matlab/dsge_likelihood.m +++ b/matlab/dsge_likelihood.m @@ -457,7 +457,12 @@ switch DynareOptions.lik_init error('dsge_likelihood:: Unknown initialization approach for the Kalman filter!') end -if analytic_derivation +if analytic_derivation, + offset = EstimatedParameters.nvx; + offset = offset+EstimatedParameters.nvn; + offset = offset+EstimatedParameters.ncx; + offset = offset+EstimatedParameters.ncn; + no_DLIK = 0; full_Hess = analytic_derivation==2; asy_Hess = analytic_derivation==-2;