This is a model library fornlmixr2. The package allowsa few ways to interact with the model library:
# See all available modelsmodellib()# Load the "PK_1cmt" modelmodellib(name="PK_1cmt")# Switch residual error to additivemodellib(name="PK_1cmt",reserr ="addSd")# Add inter-individual variability on ka and v and switch residual error to# additive and proportionalmodellib(name="PK_1cmt",eta =c("lka","lv"),reserr =c("addSd","propSd"))You may also modify any model from the library (or your own models)with a piping interface. The code below adds inter-individualvariability on ka and v and then switches residual error to additive andproportional.
modellib(name="PK_1cmt")%>%addEta(c("lka","lv")%>%addResErr(c("addSd","propSd"))Themodellib function is set-up in way that it can beeasily extended and used in other applications. A possible extensioncould be implementation in a shiny app. An app can be created to easilyadd new models to the model library database (curated?), and directlymake these models available for other users. I believe there can beadded value in having a base model library that can be easily extendedby the community this way.