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

R is aborted when fitting a 1-compartment model #570

Closed dryoutao closed 2 years ago

dryoutao commented 2 years ago

Hi,

This is a Mac user. I changed to a new MacBook Pro with R v4.0.5 (2021-03-31) -- "Shake and Throw".

RxODE v1.1.1 was installed.

nlmixr v2.0.5 was installed by running install.packages("nlmixr"). I did not install the development version.

When I run the following:

Load libraries

library(ggplot2) library(RxODE) library(nlmixr)

str(theo_sd) ggplot(theo_sd, aes(TIME, DV)) + geom_line(aes(group=ID), col="red") + scale_x_continuous("Time (h)") + scale_y_continuous("Concentration") + labs(title="Theophylline single-dose", subtitle="Concentration vs. time by individual")

one.cmt <- function() { ini({ tka <- .5 # log Ka tcl <- -3.2 # log Cl tv <- -1 # log V eta.ka ~ 1 eta.cl ~ 2 eta.v ~ 1 add.err <- 0.1 }) model({ ka <- exp(tka + eta.ka) cl <- exp(tcl + eta.cl) v <- exp(tv + eta.v) linCmt() ~ add(add.err) }) } fit <- nlmixr(one.cmt, theo_sd, est="nlme")

I get an error message

parameter labels from comments will be replaced by 'label()' Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level 0, block 1

When I try this:

fit <- nlmixr(one.cmt, theo_sd, est="foce")

R is aborted.

What do I need to do? I'd be very grateful!

Tao

mattfidler commented 2 years ago

See Issue #569