I have an objective function that looks like
function myfun(θ, x) logτ = θ s(ϵ) = 1.0/sqrt(exp(logτ)) * ϵ p(ϵ) = 1/(1 + 0.5 * exp((0.5 - s(ϵ))*exp(log