Skip to content
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

addDepot() fails if the centralLine is at the beginning or end of the model #77

Open
billdenney opened this issue Jul 17, 2024 · 1 comment

Comments

@billdenney
Copy link
Contributor

At the beginning gives an incorrect model output.

mymodel <- function() {
  description <- "One compartment PK model with linear clearance using differential equations"
  dosing<-c("central", "depot")
  ini({
    lcl <- 1 ; label("Clearance (CL)")
    lvc  <- 3.45 ; label("Central volume of distribution (V)")
    propSd <- 0.5 ; label("Proportional residual error (fraction)")
  })
  model({
    d/dt(central) <- exp(lcl)/exp(lvc)*central

    central ~ prop(propSd)
  })
}

mymodel |>
  addDepot(fdepot = 1)
@billdenney
Copy link
Contributor Author

At the end gives an error:

mymodel <- function() {
  description <- "One compartment PK model with linear clearance using differential equations"
  dosing<-c("central", "depot")
  ini({
    lcl <- 1 ; label("Clearance (CL)")
    lvc  <- 3.45 ; label("Central volume of distribution (V)")
    propSd <- 0.5 ; label("Proportional residual error (fraction)")
  })
  model({
    central ~ prop(propSd)
    d/dt(central) <- exp(lcl)/exp(lvc)*central
  })
}

mymodel |>
  addDepot(fdepot = 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant