Error in optim: function cannot be evaluated at initial parameters [closed]

心不动则不痛 提交于 2019-12-05 10:32:01

Optim expects functions to just have one argument. All further arguments should hence be passed in a vector. That is: the function must be hestondifferences(c(vT, rho, k, sigma)) instead of hestondifferences(vT, rho, k, sigma). See the documentation:

fn : A function to be minimized (or maximized), with first argument the vector of parameters over which minimization is to take place. It should return a scalar result.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!