Skip to content

Conversation

@mcreel
Copy link
Contributor

@mcreel mcreel commented Oct 30, 2021

The ML example in the documentation (https://julianlsolvers.github.io/Optim.jl/stable/#examples/generated/maxlikenlm/) has some problems. The t-statistics are not correct, as can be verified by computing the OLS estimates. The error is that the transformation from log sigma to sigma is not correctly done. The Hessian matrix is computed after directly exponentiating the log sigma parameter, while the likelihood function is not prepared to accept sigma rather than log sigma, so the resulting Hessian is not correct. This PR uses the delta method to do the transformation.

@pkofod
Copy link
Member

pkofod commented Oct 30, 2021

Thanks, Looks good. But ForwardDiff appear to not be in the manifest.

@mcreel
Copy link
Contributor Author

mcreel commented Oct 30, 2021

Yes, I saw the error. Where should I add it, at the top level of Optim.jl?

@codecov
Copy link

codecov bot commented Oct 30, 2021

Codecov Report

Merging #956 (57460cd) into master (24d5941) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #956      +/-   ##
==========================================
+ Coverage   83.52%   83.55%   +0.03%     
==========================================
  Files          42       42              
  Lines        3022     3022              
==========================================
+ Hits         2524     2525       +1     
+ Misses        498      497       -1     
Impacted Files Coverage Δ
...ultivariate/solvers/zeroth_order/particle_swarm.jl 99.17% <0.00%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24d5941...57460cd. Read the comment docs.

@pkofod
Copy link
Member

pkofod commented Oct 30, 2021

Great, thanks! I'll fix the nightly errors shortly.

@pkofod pkofod merged commit fff9002 into JuliaNLSolvers:master Oct 30, 2021
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

Successfully merging this pull request may close these issues.

2 participants