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

How does MAP algorithm perform with time-varying covariates #602

Closed namtien0312 closed 2 years ago

namtien0312 commented 2 years ago

Hi Dr. @mattfidler, I have a concern with MAP in data having time-varying covariates (est=" posthoc"). I test with using the first covariate and last covariate, but the result IPRED did not match with the "original" ("original" mean as I just push the dataset into the algorithm through nlmixr(model_list, df, list(print=0), est="posthoc")). And the model which I use was not a time-varying covariate:

model({
    Cl <- tvCl*(COV/120)^beta.Cl*exp(eta.Cl)   
    Vc <- tvVc*exp(eta.Vc)
    # dynamical system
    linCmt() ~ prop(prop.sd) + add(add.sd)
  })

The algorithm is the adaptive MAP, isn't it? Or maybe due to the difference of PRED?. I appreciate what you explain to me. Thank you. Tien.

Suppose I have a subset of dataset like this (sure posthoc option not run with 1 individual): image

mattfidler commented 2 years ago

Hi @namtien0312

The "posthoc" estimate takes whatever model you specify and optimizes the individual parameters. Therefore, it depends on your model and your data. IPRED really shouldn't be the same with and without covariates. It will also take into consideration your time-varying covarites.