lsqnonlin only supported for method_of_moments

mr#1991
Willi Mutschler 2022-01-04 14:33:05 +01:00
parent 67d781f545
commit 7f3bc60ce0
No known key found for this signature in database
GPG Key ID: 91E724BF17A73F6D
2 changed files with 4 additions and 1 deletions

View File

@ -6102,7 +6102,7 @@ block decomposition of the model (see :opt:`block`).
routine (available under MATLAB if the Optimization Toolbox is
installed; available under Octave if the `optim
<https://octave.sourceforge.io/optim/>`__ package from
Octave-Forge is installed).
Octave-Forge is installed). Only supported for ``method_of_moments``.
``101``

View File

@ -542,6 +542,9 @@ switch minimizer_algorithm
opt_par_values = opt_par_values(:);
case 13
% Matlab's lsqnonlin (Optimization toolbox needed).
if ~isfield(options_,'mom')
error('Option mode_compute=13 is available only for method_of_moments estimation.')
end
if isoctave && ~user_has_octave_forge_package('optim')
error('Option mode_compute=13 requires the optim package')
elseif ~isoctave && ~user_has_matlab_license('optimization_toolbox')