-
Notifications
You must be signed in to change notification settings - Fork 1
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
Initial implementation of likelihood profiling #37
Conversation
# Conflicts: # DESCRIPTION # R/bootstrap.R
Hi Bill and Matt, has this log likelihood profiling feature been added to nlmixr? I feel it is a pretty helpful feature to quantify the uncertainty in estimated parameter values. |
This is Bill's function. He would better understand the timelines. |
Thank you, Matt! Let's see what Bill says. Other than variance matrix and bootstrap, is there any other approach currently included in nlmixr for uncertainty quantification? Is there any plan to incorporate an MCMC based approach like BAYES in NONMEM? |
I will likely complete this in a few weeks. The implementation is mostly complete, but it will take significant time to implement the tests. |
Thanks for the update, Bill! I am happy to try your beta version whenever that becomes available. |
Not clear what you mean, but
Long term, perhaps adding a |
Thanks, Matt! I am a "more" preclinical guy usually facing sparse data (e.g., mean digitized from literature) but relatively complicated model structure with multiple fitted parameters. Sometimes variance/covariance step fails. Sometimes I don't trust SE from covariance matrix because it tends to underestimate uncertainty. I like your plan of adding stan interface. NONMEM has BAYES and NUT, but again both approaches are not very friendly with data of limited N. |
Nothing other than bootstrapping currently. |
There is the preconditionFit function, too, if you are trying to get more reliable covariance. It does require some information about your covariance though... and it may not work with all scenarios. |
Many thanks for your feedback! rxode2 and nlmixr are still very convenient tools for me even without these additional features. |
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.
Hi Bill (@billdenney),
Thanks for the initial implementation. Very interesting! I have a question to you: Your code only allows the profiling of fixed effect parameters. Why not profiling e.g. the variance-covariances?
Thanks in advance!
Simon
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.
There's no specific reason for that right now. Generally, profiling fixed effects is easier than random effects because random effects can be correlated. So, I think that you would need to detect correlation and only allow profiling of the random effects without correlations (or remove the correlation). @mattfidler, can you fix a random effect or its correlation when it is correlated without fixing the other parts?
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.
You have to fix the whole block
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 was referring the omegas not the individual etas, since they are part of the marginal likelihood.
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.
@simonbeyer1, yes, I understood that you were referring to omegas. The idea I was getting to is that if you specify an eta like etacl + etavc ~ c(0.2, 0.1, 0.2)
, we would have to fix or not fix the entirety of that, all or none of the c(0.2, 0.1, 0.2)
part. I don't immediately have a good idea of how to profile correlated BSV, so that will remain out of scope for this initial version of profiling.
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.
ahh okay! Now I got it! Thanks!
…s for at least one test problem.
Hi Bill, By reading the comments above, it sounds like you have implemented a (beta?) version of LLP. Is there a tutorial about how to use it with nlmixr2? I am very interested in trying it. Thanks! |
I love the excitement! It isn't quite ready for use as I'm still working on the interface. I'm actively working on it, so I hope that it will be ready for testing soon. And, when it's ready for testing, I'll be sure to comment here and/or in the original issue. Alternatively, this pull request being merged will be an indication that it's ready for testing. |
Thank you, Bill! Looking forward to testing it when it is ready. |
…rameter; Capture the bound estimate
…; ensure that new estimates have a small margin to the bounds
@lirui0321 and @simonbeyer1 , This is ready for testing. I tried to make the documentation in @mattfidler, Can you please take a look and let me know if you see any issues? Issues that I'm currently aware of are:
|
#' @family Profiling | ||
#' @seealso [profileLlp()] | ||
#' @export | ||
llpControl <- function(ofvIncrease = qchisq(0.95, df = 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.
Because of shinyMixR
this should now have a new method rxUiDeparse.llpControl()
... I will write one quickly. I am trying to release this today and would like this included (I know I'm reviewing last minute...)
It would be nice it it would only use one function nlmixr2(fit, est="llp") But, it seems ok to me. |
We may add that as a future feature. |
Unless you have strong objections, I will submit this with the rest. |
Looks good to me. Thanks! |
fix #1
This is a draft implementation of likelihood profiling.