Fixed bug in the evaluation of the sum of squared residuals (PAC/NLS).
parent
7d2d0d6590
commit
cf35496c06
|
@ -130,14 +130,10 @@ for i=1:length(ipnames_)
|
||||||
fprintf(fid, 'DynareModel.params(%u) = params(%u);\n', ipnames_(i), i);
|
fprintf(fid, 'DynareModel.params(%u) = params(%u);\n', ipnames_(i), i);
|
||||||
end
|
end
|
||||||
fprintf(fid, '\n');
|
fprintf(fid, '\n');
|
||||||
fprintf(fid, 'DynareModel = pac.update.parameters(''%s'', DynareModel, DynareOutput);\n', ...
|
fprintf(fid, 'DynareModel = pac.update.parameters(''%s'', DynareModel, DynareOutput);\n', pacmodl);
|
||||||
pacmodl);
|
|
||||||
fprintf(fid, '\n');
|
fprintf(fid, '\n');
|
||||||
fprintf(fid, 'r = %s-(%s);\n', lhs, rhs);
|
fprintf(fid, 'r = %s-(%s);\n', lhs, rhs);
|
||||||
fprintf(fid, 's = .0;\n');
|
fprintf(fid, 's = r''*r;\n');
|
||||||
fprintf(fid, 'for i=1:%u\n', range.length()-islaggedvariables);
|
|
||||||
fprintf(fid, ' s = s + r(i)*r(i);\n');
|
|
||||||
fprintf(fid, 'end\n');
|
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
|
|
||||||
% Create a function handle returning the sum of square residuals for a given
|
% Create a function handle returning the sum of square residuals for a given
|
||||||
|
|
Loading…
Reference in New Issue