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
nlme backend does not work correctly with additive and proportional error #428
Comments
There seems to be 2 different types of additive + proportional error models defined: combined1 s2(v) = t1^2 + t2^2*v^2 And combined2 s2(v) = (t1 + abs(v)^t2)^2 You are saying the patch referred to above allows |
These naming conventions come from monolix: |
In the next release you can switch between the two error models. |
See https://github.com/nlmixrdevelopment/nlmixr/blob/foceiDur/NEWS.md It would be great if we could switch in |
The nlme variance is defined here: Lines 2826 to 2855 in bbab91e
|
Your model above produces: varConstPower(form=~fitted(.), fixed=list(power=1)) But in your comparison you use: varConstProp() I could add this when the error model is combined1; I believe the first is correct for combined2. |
It seems that are two different schools of thoughts with combined1 and combined2. The next release defaults to combined2 which is more commonly used in NONMEM, but perhaps it should be a |
|
Ok @jranke Let me know when the patch is accepted. When it is, let me know the version of |
Sorry, I was too quick. The nlme patch provides
which is equivalent to combined2 in Monolix terms. Note that s2(v) is on a variance scale. See also my post to R-devel |
So, misspoke: combined1 s2(v) = (t1 + abs(v)^t2)^2 combined2 s2(v) = t1^2 + t2^2*v^2 It would good to have combined2 in nlmixr nlme, especially since it is the default for the other routines. |
The patch to nlme was merged yesterday, yay! You can easily get it from their subversion repo if you have subversion installed:
|
Great! I will look into using it for nlmixr too |
Probably all you need to do is change varConstPow to varConstProp, fix sigma in the call to nlme |
This has been integrated; Do you know when |
Nice! nlme has its own release cycle, and has releases every couple of months, so it depends. |
I think you need to check the formula in the news entry you wrote for this, as
only the additive component |
Indeed you are right; I have an error issued if this occurs: Line 2864 in b7c7ccd
I was testing and noticed that b can be negative, I will adjust this to be positive just for consistency between the methods. Note you can always get the underlying nlme by |
I misread your comment, I will adjust the news item. |
Ah, I see, but your explanation was nevertheless helpful as I hadn't looked at the code! |
Hi, just in case you did not notice, nlme version 3.1.151 containing |
Awesome!
We will be publishing soon too so it should work perfectly.
…On Wed, Dec 16, 2020, 3:07 AM Johannes Ranke ***@***.***> wrote:
Hi, just in case you did not notice, nlme version 3.1.151 containing
varConstProp has been published a couple of days ago.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5VWQCWA7BEOPZOUNATNTSVB2DPANCNFSM4TD5SPXA>
.
|
nlme can now do this if you apply the patch at https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17954
Created on 2020-10-29 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: