You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm iteratively working within a similar set of models making some minor modifications and trying to improve the model fits. With that, I am sometimes running a model multiple times.
The issue that I have is that the object that I'm passing to nlmixr2 to try to estimate the model changes when I try to rerun it. More specifically, I would have assumed that the pheno_prep$iniDf would be unchanged before vs. after the fit while the fit object would have the new $iniDf:
library(nlmixr2)
#> Loading required package: nlmixr2data
library(tidyverse)
pheno<-function() {
ini({
tcl<- log(0.008) # typical value of clearancetv<- log(0.6) # typical value of volume## var(eta.cl)eta.cl+eta.v~ c(1,
0.01, 1) ## cov(eta.cl, eta.v), var(eta.v)# interindividual variability on clearance and volumeadd.err<-0.1# residual variability
})
model({
cl<- exp(tcl+eta.cl) # individual value of clearancev<- exp(tv+eta.v) # individual value of volumeke<-cl/v# elimination rate constantd/dt(A1) =-ke*A1# model differential equationcp=A1/v# concentration in plasmacp~ add(add.err) # define error model
})
}
pheno_prep<-# make an nlmixr2est object
nlmixr(pheno)
#> ℹ parameter labels from comments will be replaced by 'label()'pheno_prep$iniDf#> ntheta neta1 neta2 name lower est upper fix#> 1 1 NA NA tcl -Inf -4.8283137 Inf FALSE#> 2 2 NA NA tv -Inf -0.5108256 Inf FALSE#> 3 3 NA NA add.err 0 0.1000000 Inf FALSE#> 4 NA 1 1 eta.cl -Inf 1.0000000 Inf FALSE#> 5 NA 2 1 (eta.cl,eta.v) -Inf 0.0100000 Inf FALSE#> 6 NA 2 2 eta.v -Inf 1.0000000 Inf FALSE#> label backTransform condition err#> 1 typical value of clearance <NA> <NA> <NA>#> 2 typical value of volume <NA> <NA> <NA>#> 3 residual variability <NA> cp add#> 4 <NA> <NA> id <NA>#> 5 <NA> <NA> id <NA>#> 6 <NA> <NA> id <NA>fit<- nlmixr(pheno_prep, pheno_sd, "focei", control=list(print=0))
#> rxode2 2.0.7 using 8 threads (see ?getRxThreads)#> no cache: create with `rxCreateCache()`#> calculating covariance matrix#> done#> → Calculating residuals/tables#> ✔ done#> → compress origData in nlmixr2 object, save 33192#> → compress parHist in nlmixr2 object, save 2960#> Warning: gradient problems with initial estimate and covariance; see $scaleInfo#> Warning: last objective function was not at minimum, possible problems in#> optimization#> Warning: ETAs were reset to zero during optimization; (Can control by#> foceiControl(resetEtaP=.))#> Warning: initial ETAs were nudged; (can control by foceiControl(etaNudge=.,#> etaNudge2=))pheno_prep$iniDf#> ntheta neta1 neta2 name lower est upper fix#> 1 1 NA NA tcl -Inf -5.0001418 Inf FALSE#> 2 2 NA NA tv -Inf 0.3341971 Inf FALSE#> 3 3 NA NA add.err 0 2.8356874 Inf FALSE#> 4 NA 1 1 eta.cl -Inf 0.2529083 Inf FALSE#> 5 NA 2 1 (eta.cl,eta.v) -Inf 0.1942066 Inf FALSE#> 6 NA 2 2 eta.v -Inf 0.1552687 Inf FALSE#> label backTransform condition err#> 1 typical value of clearance <NA> <NA> <NA>#> 2 typical value of volume <NA> <NA> <NA>#> 3 residual variability <NA> cp add#> 4 <NA> <NA> id <NA>#> 5 <NA> <NA> id <NA>#> 6 <NA> <NA> id <NA>
I'm iteratively working within a similar set of models making some minor modifications and trying to improve the model fits. With that, I am sometimes running a model multiple times.
The issue that I have is that the object that I'm passing to nlmixr2 to try to estimate the model changes when I try to rerun it. More specifically, I would have assumed that the
pheno_prep$iniDf
would be unchanged before vs. after the fit while thefit
object would have the new$iniDf
:Created on 2022-08-31 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: