Skip to content

How to stack models using model piping #705

Answered by mattfidler
john-harrold asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

You use rxAppendModel() as described here:

https://nlmixr2.github.io/rxode2/articles/Modifying-Models.html#combine-different-models

library(rxode2)
#> rxode2 2.1.3.9000 using 8 threads (see ?getRxThreads)
#>   no cache: create with `rxCreateCache()`
PK <-
  function() {
    description <- "One compartment PK model with linear clearance using differential equations"
    dosing <- c("central", "depot")
    ini({
      lka <- 0.45
      label("Absorption rate (Ka)")
      lcl <- 1
      label("Clearance (CL)")
      lvc <- 3.45
      label("Central volume of distribution (V)")
      propSd <- c(0, 0.5)
      label("Proportional residual error (fraction)")
    })
    model({
      ka <- exp(

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@john-harrold
Comment options

john-harrold Jul 4, 2024
Maintainer Author

Answer selected by mattfidler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants