-
Notifications
You must be signed in to change notification settings - Fork 48
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
restore and save optsum for GLMM #791
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #791 +/- ##
==========================================
- Coverage 96.94% 96.93% -0.01%
==========================================
Files 33 33
Lines 3370 3397 +27
==========================================
+ Hits 3267 3293 +26
- Misses 103 104 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like I can give a super thoughtful review as I'm not familiar with this part of the codebase but here are some comments/suggestions in case they're useful, plus an approval since nothing seemed obviously wrong (as far as I could tell).
if length(ops.lowerbd) != length(m.θ) | ||
deleteat!(ops.lowerbd, 1:length(m.β)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it can never be the case that length(ops.lowerbd) < length(m.β)
or that ops.lowerbd
has indices that don't start at 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowerbd
is in a struct we control and it's always Vector
, so the indices are fine.
There are two cases here:
- the "slow" optimization, where the parameter vector contains both beta and theta, so length(lowerbd) needs to be length(beta) + length(theta).
- the "fast" optimization, where the parameter vector contains only theta, so length(lowerbd) needs to be length(theta). (In this case, there is an inner optimization step that finds the best beta for a given theta using PIRLS -- this will generally give the same answer or a very close one to doing free optimization over both, but there are a few pathological cases where the two methods can diverge, in which case the extra freedom of the slow optimization will yield more accurate results.)
The initial model creation initializes the lower bound to the length of theta because that is shared with the initialization for the linear mixed model (where only theta is included in optimization and beta is solved for directly).
Co-authored-by: Alex Arslan <[email protected]>
Co-authored-by: Alex Arslan <[email protected]>
Co-authored-by: Alex Arslan <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
closes #790
docs/NEWS-update.jl
to update the cross-references.