[Feature]: Add full likelihood components for likelihoods, random effects and priors/penalties #553
Labels
hard
substantial (days-weeks) work
statistics
related to logL
wishlist
request new feature; bigger than revision; OK to remove after adding to Milestone
Describe the solution you would like.
I suggest that SS3 should modify all objective function components (i.e., data likelihoods, priors, and hierarchical penalties) to use the full log-densities statements. E.g.
dnorm
anddmultinom
type statements should be used in place ofnorm2
which drops the constants (example here).Describe alternatives you have considered
One could meticulously add constants back but that is not ideal and would make the code harder to read and be more bug prone.
Statistical validity, if applicable
The approaches are equivalent up to a constant in the penalized maximum likelihood approach. However, this change would have three benefits as I see it.
dnorm
statements will allow for improved options for estimating process errors in e.g. a Bayesian context.dnorm(0,x,SD)
and how to interpret that, and it is more clear what is a data likelihood vs prior.Describe if this is needed for a management application
No response
Additional context
I realize this would require a big change and break all the tests (presuming they check for changes in the NLL). But the inference should be identical for all penalized ML models.
Also see request by quang-huynh for proper lognormal prior #558. Which should be done as an added prior option and the documentation will need full explanation of the difference.
The text was updated successfully, but these errors were encountered: