Diagnostics for non-linear mixed-effects (population) models from 'NONMEM' < https://www.iconplc.com/innovation/nonmem/>. 'xpose' facilitates data import, creation of numerical run summary and provide 'ggplot2'-based graphics for data exploration and model diagnostics.
xpose was designed as a ggplot2-based alternative to xpose4. xpose aims to reduce the post processing burden and improve diagnostics commonly associated the development of non-linear mixed effect models.
# Install the lastest release from the CRANinstall.packages('xpose')# Or install the development version from GitHub# install.packages('devtools')devtools::install_github('UUPharmacometrics/xpose')
library(xpose)
xpdb <- xpose_data(runno = '001')
xpdb
run001.lst overview:
- Software: nonmem 7.3.0
- Attached files (memory usage 1.3 Mb):
+ obs tabs: $prob no.1: catab001.csv, cotab001, patab001, sdtab001
+ sim tabs: $prob no.2: simtab001.zip
+ output files: run001.cor, run001.cov, run001.ext, run001.grd, run001.phi, run001.shk
+ special: <none>
- gg_theme: theme_readable
- xp_theme: theme_xp_default
- Options: dir = analysis/models/pk/, quiet = TRUE, manual_import = NULL
summary(xpdb, problem = 1)
Summary for problem no. 0 [Global information]
- Software @software : nonmem
- Software version @version : 7.3.0
- Run directory @dir : analysis/models/pk/
- Run file @file : run001.lst
- Run number @run : run001
- Reference model @ref : 000
- Run description @descr : NONMEM PK example for xpose
- Run start time @timestart : Mon Oct 16 13:34:28 CEST 2017
- Run stop time @timestop : Mon Oct 16 13:34:35 CEST 2017
Summary for problem no. 1 [Parameter estimation]
- Input data @data : ../../mx19_2.csv
- Number of individuals @nind : 74
- Number of observations @nobs : 476
- ADVAN @subroutine : 2
- Estimation method @method : foce-i
- Termination message @term : MINIMIZATION SUCCESSFUL
- Estimation runtime @runtime : 00:00:02
- Objective function value @ofv : -1403.905
- Number of significant digits @nsig : 3.3
- Covariance step runtime @covtime : 00:00:03
- Condition number @condn : 21.5
- Eta shrinkage @etashk : 9.3 [1], 28.7 [2], 23.7 [3]
- Epsilon shrinkage @epsshk : 14.9 [1]
- Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
Summary for problem no. 2 [Model simulations]
- Input data @data : ../../mx19_2.csv
- Number of individuals @nind : 74
- Number of observations @nobs : 476
- Estimation method @method : sim
- Number of simulations @nsim : 20
- Simulation seed @simseed : 221287
- Run warnings @warnings : (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
(WARNING 22) WITH $MSFI AND "SUBPROBS", "TRUE=FINAL" ...
dv_vs_ipred(xpdb)
ind_plots(xpdb, page = 1)
xpdb %>%vpc_data(stratify = 'SEX', opt = vpc_opt(n_bins = 7, lloq = 0.1)) %>%vpc()
eta_distrib(xpdb, labeller = 'label_value')
prm_vs_iteration(xpdb, labeller = 'label_value')
The xpose website contains several useful articles to make full use of xpose
When working with xpose, a working knowledge of ggplot2 is recommended. Help for ggplot2 can be found in:
get_prm()
/prm_table()
where off diagonal correlations were improperly computed.print.xpose_data()
where a warning from stringi was returned.print()
function with the upcoming ggplot2 versionsummary()
where missing estimation method was reported if NM code written as METH=... instead of METHOD=...prm_table()
, get_prm()
were missing with a commented row in $THETA, $OMEGA or $SIGMAprm_table()
, get_prm()
where only NA
would be reported when missing the -1000000006 record in the .ext file (i.e. NM <7.3)prm_table()
and get_prm()
prm_table()
outputsummary()
with non numeric covariance step timeind_plots()
where the aesthetics would get mixed up if the variable names were changedprint.xpose_data()
print.prm.data()
to prm_table()
dplyr::n()
when editing xpdb #51get_special()
to access special dataget_prm()
labeller parsing with OMEGA and SIGMA BLOCKSget_prm()
and prm_table()
:
transform
argument to disable parameter transformationlist_data()
, list_files()
and list_special()
to get info on the data structure in the xpdbproblem
, subprob
, method
and source
to .problem
, .subprob
, etc. for consistency with dplyr functions.xpose_data
get_prm()
print.xpose_plot()
now displays a message when the number of facets is > 20, informing that many panels are being printed and that it may take a while to render the plot.problem
, .subprob
and .method
error checkingxpose_save()
get_prm()
functiondir
and file
arguments usagexpose_data()
slice()
, select()
, rename()
, distinct()
, summarize()
, group_by()
and ungroup()
irep()
function to add simulation counter to any datasetread_nm_files()
not properly reporting FO methodread_nm_tables()
not properly parsing data (missing minus signs) in some very specific casesxp_theme()
defaultsxp_theme
amt_vs_idv()
plotvpc_data()
and vpc()
functions.template_titles
xpose
xpdb_ex_pk
read_nm_tables()
manual_nm_import()
set_vars_type()
, set_vars_label()
, set_vars_units()
read_nm_files()
print()
and summary()
methods for xpdblist_vars()
function to list available variablestemplate_titles
get_code()
, get_data()
, get_file()
, get_summary()
.dplyr::filter()
cwres_vs_idv
, type residual functions to more general res_vs_idv(res = 'CWRES')
functionsxplot_distrib()
, xplot_qq()
, xplot_scatter()
, with convenience function to fetch data in xpdb data_opt_set()
.dv_vs_idv()
, ipred_vs_idv()
, pred_vs_idv()
, dv_preds_vs_idv()
, ind_plots()
, vpc()
, prm_distrib()
, eta_distrib()
,
res_distrib()
, cov_distrib()
, prm_qq()
, eta_qq()
,
res_qq()
, cov_qq()
, prm_vs_iteration()
, grd_vs_iteration()
.theme_bw2()
, theme_readable()
, theme_xp_default()
, theme_xp_xpose4()
.ronkeizer/vpc
inside vpc_data()
.dv_vs_ipred()