Xpose is an R-based model building aid for population analysis using NONMEM. It facilitates data set checkout, exploration and visualization, model diagnostics, candidate covariate identification and model comparison.
Xpose recognizes NONMEM runs, and files associated to a particular run, though the run number. This is a number that is used in the name of NONMEM model files, output files and table files. The fundamental input to Xpose is one or more NONMEM table files. These table files should be named as below followed by the run number, for example xptab1 for run number 1. Xpose looks for files according to the following pattern, where * is your run number:
sdtab* Standard table file, containing ID, IDV, DV, PRED, IPRED, WRES, IWRES, RES, IRES, etc.
patab* Parameter table, containing model parameters - THETAs, ETAs and EPSes
catab* Categorical covariates, e.g. SEX, RACE
cotab* Continuous covariates, e.g. WT, AGE
extra*, mutab*, mytab*, xptab*, cwtab* Other variables you might need to have available to Xpose
run*.mod Model specification file
run*.lst NONMEM output
Strictly, only one table file is needed for xpose (for example sdtab* or xptab*). However, using patab*, cotab*, catab* will influence the way that Xpose interprets the data and are recommended to get full benefit from Xpose.
You can use code in NONMEM similar to the following to generate the tables you need. NONMEM automatically appends DV, PRED, WRES and RES unless NOAPPEND is specified. Don't forget to leave at least one blank line at the end of the NONMEM model specification file.
$TABLE ID TIME IPRED IWRES EVID MDV NOPRINT ONEHEADER FILE=sdtab1
$TABLE ID CL V2 KA K SLP KENZ NOPRINT ONEHEADER FILE=patab1
$TABLE ID WT HT AGE BMI PKG NOPRINT ONEHEADER FILE=cotab1
$TABLE ID SEX SMOK ALC NOPRINT ONEHEADER FILE=catab1
Xpose can be run in two different ways, using the classic menu system and by using the command line in R.
Xpose can be run through a series of menu selections. This method of running Xpose is useful for the beginning "Xposer" and for learning about the functionality available in Xpose. The menu system does not allow for as much customization as the command line interface, nor does it allow for scripting.
To run the classic Xpose interface, at the R command prompt, type:
library(xpose4)
xpose4()
And follow the menu prompts.
Each function in Xpose is independently available from the command line, once the library is loaded. For example, you might do the following:
library(xpose4)
xpdb <- xpose.data(5)
basic.gof(xpdb)
All Xpose 4.0 functions are documented within the R help system. For example, if you want to know more about DV vs PRED plots and their options, type at the R command line after loading Xpose:
?dv.vs.pred
You can also use the interactive help system in most R-interfaces: choose Help from the menu system, then click on packages, then xpose4.
The most interesting may be the specific functions xpose4specific-package.
These are functions that are ready to use just by telling the functions
which xpose database to use (i.e. xpdb
after running the
command xpdb <- xpose.data(run.number)
).
A more detailed description of Xpose with example plots and explanaitions for every specific function in the package is available in our Bestiarium: http://xpose.sourceforge.net/bestiarium_v1.0.pdf.
Xpose is an R library for post-processing of NONMEM output. It takes one or more standard NONMEM table files as input and generates graphs or other analyses. It is assumed that each NONMEM run can be uniquely identified by a run number (see section below for how to generate the appropriate input to Xpose). Xpose is implemented using the lattice graphics library.
The Xpose library can be divided up into five sub-sections:
xpose4data-package Functions for managing the input data and manipulating the Xpose database.
xpose4generic-package Generic wrapper functions around the lattice functions. These funtions can be invoked by the user but require quite detailed instructions to generate the desired output.
xpose4specific-package These functions are single purpose functions that generate specific output given only the Xpose database as input. The behavior can, to some extent, be influenced by the user.
xpose4classic-package Xpose has a text based menu interface to make it simple for the user to invoke the Xpose specific functions. This interface is called Xpose Classic. Given the limitations a text based interface imposes, Xpose Classic is not very flexible but may be useful for quick assessment of a model and for learning to use Xpose.
xpose4psn-package These functions are the interface between Xpose and PsN, i.e. they do not post-process NONMEM output but rather PsN output.
# run the classic interface
library(xpose4)
xpose4()
# command line interface
library(xpose4)
xpdb <- xpose.data(5)
basic.gof(xpdb)
Run the code above in your browser using DataLab