bug fix: remove consecutive plus signs
parent
3150b854b7
commit
2254f846c5
|
@ -60,7 +60,7 @@ end;
|
|||
|
||||
osr;
|
||||
%compute objective function manually
|
||||
objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))++oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+0.5*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'));
|
||||
objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))+oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+0.5*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'));
|
||||
if abs(oo_.osr.objective_function-objective)>1e-8
|
||||
error('Objective Function is wrong')
|
||||
end
|
||||
|
@ -80,7 +80,7 @@ end;
|
|||
|
||||
osr;
|
||||
%compute objective function manually
|
||||
objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))++oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+1*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'));
|
||||
objective=oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('y',M_.endo_names,'exact'))+oo_.var(strmatch('inflation',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'))+oo_.var(strmatch('dummy_var',M_.endo_names,'exact'),strmatch('dummy_var',M_.endo_names,'exact'))+1*oo_.var(strmatch('y',M_.endo_names,'exact'),strmatch('inflation',M_.endo_names,'exact'));
|
||||
if abs(oo_.osr.objective_function-objective)>1e-8
|
||||
error('Objective Function is wrong')
|
||||
end
|
||||
|
@ -107,4 +107,4 @@ if abs(oo_.osr.objective_function-oo_covar_single.osr.objective_function)>1e-8
|
|||
end
|
||||
if max(abs(cell2mat(struct2cell(oo_.osr.optim_params))-cell2mat(struct2cell(oo_covar_single.osr.optim_params))))>1e-5
|
||||
error('Parameters should be identical')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue