Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when calculating Hessian #122

Closed
guilhermebodin opened this issue Feb 4, 2021 · 0 comments
Closed

Error when calculating Hessian #122

guilhermebodin opened this issue Feb 4, 2021 · 0 comments

Comments

@guilhermebodin
Copy link
Member

function update_aux_estimation!(aux_est::AuxEstimation{T}, func::Optim.TwiceDifferentiable,
                                opt_result::Optim.OptimizationResults) where T
                                
    push!(aux_est.loglikelihood, -opt_result.minimum)
    push!(aux_est.psi, opt_result.minimizer)
    push!(aux_est.numerical_hessian, Optim.hessian!(func, opt_result.minimizer))
    push!(aux_est.opt_result, opt_result)
    return
end

should be

function update_aux_estimation!(aux_est::AuxEstimation{T}, func::Optim.TwiceDifferentiable,
                                opt_result::Optim.OptimizationResults) where T
    push!(aux_est.numerical_hessian, Optim.hessian!(func, opt_result.minimizer))
    push!(aux_est.opt_result, opt_result)
    push!(aux_est.loglikelihood, -opt_result.minimum)
    push!(aux_est.psi, opt_result.minimizer)
    return
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant