nlmixrdevelopment / nlmixr

nlmixr: an R package for population PKPD modeling
https://nlmixrdevelopment.github.io/nlmixr/
GNU General Public License v2.0
114 stars 45 forks source link

Error in example 3 of Modifying nlmixr models by piping #606

Closed nskoch closed 1 year ago

nskoch commented 2 years ago

Hi,

I tried example 3 to fix Ka to the previously model estimated value (ie 1.61) and then re-estimate. it appears that Ka is fixed to the initial value of the model not the estimated. Did I forget something?

Best regards Nicolas

mattfidler commented 2 years ago

Hi @nskoch

I am unsure. Could you provide your example data. In the upcoming nlmixr2 it tells you what it is doing so you are aware if you have made a mistake.

nskoch commented 2 years ago

Hi It's a web example 3 of nlmixr (changing model via piping):

Example 3 -- Fix tka to model estimated value and re-estimate.

one.ka.0.5 <- fit %>% ini(tka=fix) %>% nlmixr(est="focei", control=list(print=0), table=list(cwres=TRUE, npde=TRUE)) print(one.ka.0.5) Best regards Nicolas

mattfidler commented 2 years ago

With nlmixr2, which is under submission it seems to be working fine:

https://nlmixr2.github.io/nlmixr2/articles/modelPiping.html

You can see that it is fixed to zero in the automatically run example.