I was looking for a faster alternative to fminsearch
(the default used by the toolkit) and wanted to test fsolve
, but I think it is not implemented among the options heteroagentoptions.fminalgo
.
fsolve might be faster in some cases because is based on a trust-region algorithm while fminsearch is a derivative-free method.
With fminsearch the objective function to be minimized is the sum of squared deviations (a scalar)
sqrt(sum(heteroagentoptions.multiGEweights.*(GeneralEqmConditionsVec.^2)))
while fsolve solves a system of equations, so the objective should be simply GeneralEqmConditionsVec=0
, I think.
By the way, I realized now that there is multiGEweights
. Can I give a different weight to different GE conditions? How do I specifify this? Moreover, does it make sense to give different weights to GE conditions (this is something I do in estimation)?
Thanks!