I am trying to optimize a function in Julia using following code, but getting LoadError. can anyone tell me what is the problem in my code?
data = readdlm("RGPSLessData.csv", ';')
using Optim
function f(x::Vector,n11,E)
return sum(-log((x[5] * dnbinom(n11, x[1], x[2]/(x[2]+E)) + (1-x[5]) * dnbinom(n11, x[3], x[4]/(x[4]+E)))))
end
res = optimize(x -> f(x,data[:,1],data[:,2]),[0.2,0.06,1.4,1.8,0.1])
newton
method examples are so very different from your example code. – rickhg12hs