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

Crash R with larger number of subjects than requested #686

Open
mattfidler opened this issue Jun 10, 2024 · 0 comments
Open

Crash R with larger number of subjects than requested #686

mattfidler opened this issue Jun 10, 2024 · 0 comments

Comments

@mattfidler
Copy link
Member

library(nlmixr2)
# the model 
PK_1cmt <- function() {
  ini({
    lka    <- 0.45 
    lcl    <- 1 
    lvc    <- 3.45 
    eta.cl ~ 0.3
    propSd <- 0.5 
  })
  model({
    ka <- exp(lka)
    cl <- exp(lcl + eta.cl)
    vc <- exp(lvc)
    linCmt() ~ prop(propSd)
  })
}
# fit the model
fit <- nlmixr(PK_1cmt, theo_sd, est="focei")

# simulate the model (more IDs in param then in events – will crash R)
parms <- data.frame(ID=1:12,lka=0.45,lcl=1,lvc=3.45,eta.cl=0.3)
mdsim <- rxSolve(fit$ui,params=parms,events = subset(theo_sd,ID%in%1:6))

@RichardHooijmaijers

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