-
Notifications
You must be signed in to change notification settings - Fork 10
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
nlmixr2 vpc not working correctly #229
Comments
The default theo example works well, but nlmixr2 output looks wrong. |
library(nlmixr)
library(ggPMX)
#> Registered S3 method overwritten by 'GGally':
#> method from
#> +.gg ggplot2
one.cmt <- function() {
ini({
## You may label each parameter with a comment
tka <- 0.45 # Log Ka
tcl <- 1 # Log Cl
## This works with interactive models
## You may also label the preceding line with label("label text")
tv <- 3.45; label("log V")
## the label("Label name") works with all models
eta.ka ~ 0.6
eta.cl ~ 0.3
eta.v ~ 0.1
add.sd <- 0.7
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
linCmt() ~ add(add.sd)
})
}
fit <- nlmixr::nlmixr(one.cmt, nlmixr2data::theo_sd, est="saem", control=list(print=0))
#> ℹ parameter labels from comments will be replaced by 'label()'
#> → generate SAEM model
#> ✔ done
#> RxODE 1.1.5 using 4 threads (see ?getRxThreads)
#> no cache: create with `rxCreateCache()`
#> Calculating covariance matrix
#> [====|====|====|====|====|====|====|====|====|====] 0:00:00
#> → creating full model...
#> → pruning branches (`if`/`else`)...
#> ✔ done
#> → loading into symengine environment...
#> ✔ done
#> → compiling EBE model...
#> ✔ done
#> Calculating residuals/tables
#> done
ctr <- pmx_nlmixr(fit, ## VPC is turned on by default, can turn off
settings = pmx_settings(is.draft = FALSE))
#> add npde
#> Compiling NPDE model...done
#> done
#> Compiling model...done
#> Compiling VPC model...done
#> done (0.52 sec)
#> Calculating -2LL by Gaussian quadrature (nnodes=3,nsd=1.6)
#> [====|====|====|====|====|====|====|====|====|====] 0:00:00
ctr %>% pmx_plot_vpc vpcPlot(fit)
#> Error in vpcPlot(fit): could not find function "vpcPlot"
ct <- theophylline()
ct %>% pmx_plot_vpc Created on 2022-05-21 by the reprex package (v2.0.1) It doesn't work correctly with nlmixr either |
For now drop it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vpcPlot(fit)
Created on 2022-05-21 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: