thefaylab / hydra_sim

Code-base for the hydra multispecies simulation model
2 stars 0 forks source link

Severe overweighting of RecDev penalty, fixed in 745a725 #28

Open gavinfay opened 2 years ago

gavinfay commented 2 years ago

@sgaichas @MaC-Perez I had been puzzled at the large nLL for the recruitment penalties.

Turns out I was populating a vector of length Nrecdevs * Nspp with the SUM of the nLL for each recruitment deviation, and then summing those. e.g. effectively upweighting the recdevs by a factor of 400. Oops. This is due to the version of dnorm() that gets called with a dvar_vector resid and a dvar_vector std.dev. (ie it returns the sum not the individual nLLs)

Fixed in commit 745a725. Sorry about this! image

sgaichas commented 2 years ago

interestingly, high weighting of RecDev penalties may may have been a good thing for the NOBA fits.