Xpose 2.0 User’s Manual
Niclas Jonsson
Mats Karlsson
Department of Pharmacy,
Uppsala University, Sweden
Draft 4
Mar 12, 1998
Contents
1
2
Introduction
4
1.1
Terms of usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.2
Changes between Xpose 1.1 and Xpose 2.0 . . . . . . . . . . . . . .
5
1.3
About this manual . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.4
About the distribution . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.5
Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Producing input data for Xpose
6
2.1
Creating the table file(s) for Xpose to read . . . . . . . . . . . . . . .
7
2.1.1
The sdtab . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.1.2
The patab . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.1.3
The cotab and catab
. . . . . . . . . . . . . . . . . . . . .
8
2.1.4
The mutab . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.1.5
The mytab . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.2
The extra file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.3
The Xpose data bases . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.4
How Xpose reads files . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.5
Xpose data variables . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.5.1
2.6
Xpose data variables without default settings . . . . . . . . .
10
Using only one table file for all data items . . . . . . . . . . . . . . .
10
3
Starting and quitting Xpose
10
4
Moving around in Xpose
12
5
Redefining and creating variables
13
5.1
15
6
Creating and/or modifying data items . . . . . . . . . . . . . . . . .
Plotting conventions
16
6.1
Plotting symbols and individual curves . . . . . . . . . . . . . . . . .
16
6.2
Smoothes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
6.3
Visual reference grids . . . . . . . . . . . . . . . . . . . . . . . . . .
16
6.4
Trellis Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
6.4.1
17
Multi-panel conditioning . . . . . . . . . . . . . . . . . . . .
1
6.4.2
6.5
7
Box and whiskers plots . . . . . . . . . . . . . . . . . . . . .
18
What data is plotted? . . . . . . . . . . . . . . . . . . . . . . . . . .
20
6.5.1
21
Handling of missing data . . . . . . . . . . . . . . . . . . . .
Documenting runs
21
7.1
The run summary . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
7.2
The run record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
8
Checking a data set
25
9
Comparing models
26
10 The GAM
27
10.1 Overview of the GAM . . . . . . . . . . . . . . . . . . . . . . . . .
28
10.2 Running the GAM . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
10.3 Displaying the results of a GAM run . . . . . . . . . . . . . . . . . .
28
10.3.1 Numerical summary of a GAM fit . . . . . . . . . . . . . . .
29
10.3.2 Displaying the GAM results graphically . . . . . . . . . . . .
29
10.4 Obtaining diagnostics for a GAM run . . . . . . . . . . . . . . . . .
29
10.4.1 The Akaike plot . . . . . . . . . . . . . . . . . . . . . . . . .
30
10.4.2 Studentized residuals for a GAM fit . . . . . . . . . . . . . .
31
10.4.3 Individual influence on the GAM fit . . . . . . . . . . . . . .
31
10.4.4 Individual influence on the GAM terms . . . . . . . . . . . .
32
10.5 Changing the default behavior of the GAM . . . . . . . . . . . . . .
32
10.5.1 List current GAM settings . . . . . . . . . . . . . . . . . . .
33
10.5.2 Estimation of the dispersion factor . . . . . . . . . . . . . . .
33
10.5.3 Stepwise search for covariates . . . . . . . . . . . . . . . . .
33
10.5.4 Use all lines . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
10.5.5 Use weights . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
10.5.6 Exclude individuals from the GAM analysis . . . . . . . . . .
34
10.5.7 Specifying a starting model for the GAM . . . . . . . . . . .
34
10.5.8 Normalize the covariates to the median . . . . . . . . . . . .
34
10.6 Setting the model scope for the GAM . . . . . . . . . . . . . . . . .
34
10.6.1 The GAM scope and its default settings in Xpose . . . . . . .
35
10.6.2 Smoothers in the GAM scope . . . . . . . . . . . . . . . . .
36
2
10.6.3 Setting the maximum number of models in the scope . . . . .
36
10.6.4 Changing the default smoothers and their arguments . . . . .
36
10.6.5 Limit the scope for specific covariates . . . . . . . . . . . . .
37
10.6.6 Change models for specific covariates . . . . . . . . . . . . .
38
10.6.7 Viewing the current GAM scope . . . . . . . . . . . . . . . .
39
10.6.8 Re-setting the scope . . . . . . . . . . . . . . . . . . . . . .
39
11 The bootstrap of the GAM
39
11.1 Overview the Bootstrap of the GAM . . . . . . . . . . . . . . . . . .
39
11.2 Running the bootstrap of the GAM . . . . . . . . . . . . . . . . . . .
40
11.3 Summarizing a bootstrap of the GAM run . . . . . . . . . . . . . . .
40
11.4 Plotting the results . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
11.4.1 Plotting the inclusion frequencies . . . . . . . . . . . . . . .
41
11.4.2 Plotting the most common covariate combinations . . . . . .
42
11.4.3 The distribution of model sizes . . . . . . . . . . . . . . . . .
42
11.4.4 The stability of the inclusion frequencies . . . . . . . . . . .
43
11.4.5 Inclusion index of covariates . . . . . . . . . . . . . . . . . .
43
11.4.6 Inclusion index of covariates and individuals . . . . . . . . .
44
11.5 Settings for the bootstrap of the GAM . . . . . . . . . . . . . . . . .
45
11.5.1 Specifying the maximum number of iterations . . . . . . . . .
46
11.5.2 Selecting the convergence algorithm . . . . . . . . . . . . . .
46
11.5.3 Specifying an iteration to start checking convergence . . . . .
48
11.5.4 Specifying the interval between convergence checks . . . . .
48
11.5.5 Specifying a seed number . . . . . . . . . . . . . . . . . . .
48
12 Tree based modeling
49
12.1 Fitting a tree model . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
12.2 Plotting a tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
12.3 Pruning trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
13 Printing and exporting graphics
51
14 Altering the the way Xpose draws plots
53
15 Making plots of a subset of the data
53
3
1 Introduction
Population analysis using non-linear mixed effects models has become an important
tool in the analysis of pharmacokinetic/pharmacodynamic data [1] and the benefits of
this type of analysis over the traditional alternatives have to some length been discussed
in the literature e.g. [2, 3]. The price one has to pay for these benefits is an increased
complexity of the models that are fitted to the data and a corresponding increase in the
number of assumptions that has to be made [4]. Assumptions of e.g. independence
of residuals and homogeneity of residual variance is of course also a part of model
dependent individual analysis but the challenge of non-linear mixed effects models lies
in the hierarchical nature of the model, i.e. we do not only have the differences between
the observed and predicted observations to take in to account, we also have to take into
account that individuals may differ, which results in a second type of residuals — the
difference between individual parameter values and what the model predicts for the
corresponding typical individual in the population. This together with the possibility
to include the relationships between demographic data, for example age, weight and
clinical laboratory measurements, and parameters, which in a sense is a regression
within the regression, makes the task of assessing the goodness of fit of a non-linear
mixed effects model a lot harder than for an individual specific model.
Xpose is an S-PLUS 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. Data set checkout includes
visualization of the observed variable(s), covariates and plots to reveal errors in the data
file. Model diagnostic plots includes the usual residual plots but also plots to check the
validity of assumptions specific to non-linear mixed effects models. Data exploration
is also done by various plots but also includes auxiliary screening analyses such as
stepwise generalized additive modeling (GAM) and tree based modeling. The stability
of the GAM results with respect to covariate model selection as well as the impact of
influential individuals and certain types of covariate interactions can be explored using
a bootstrap re-sampling procedure. To facilitate documentation, Xpose can produce
run summaries and run records. The run records are one page summaries of a run consisting of a combination of goodness of fit plots, parameter estimates and the model
file. Run records are tabulated summaries of many runs consisting of user comments,
termination messages and objective function values.
The basic idea is that the user should only have to tell Xpose what run that is to be
processed to be able to produce anything between simple numerical summaries of, e.g.
covariates, to sophisticated bootstrap of the GAM analyses. The only other thing the
user has to do is to make NONMEM produce one or more table files that contains
the items, for example residuals and predictions, that is to be displayed or used in the
Xpose analyses. In other words, Xpose takes care of reading the data into S-PLUS,
reformatting of the data to suit each plot and analysis specific requirements and to do
anything else that is necessary to accomplish what the user selects from the menus.
1.1 Terms of usage
Any person who wants to use Xpose should be aware of the following:
4
Xpose is copyrighted by Niclas Jonsson and Mats Karlsson
Xpose must be obtained from the official distribution site
www.biof.uu.se/Xpose and may not, without the permission from the authors, be distributed in any other way.
Niclas Jonsson and Mats Karlsson can not be held responsible for any harmful
consequence of bugs in the Xpose source code and/or misuse of the program.
In publications, presentations, reports etc. which uses the output and/or results
from Xpose we would be grateful if Xpose is referenced. At present the best
reference is: E.N. Jonsson and M.O. Karlsson “Xpose - an S-PLUS based model
building aid for population analysis with NONMEM”, in The population approach: measuring and managing variability in response, concentration and dose,
eds. L. Aarons, L.P. Balant, M. Danhof et al. European Commission, Brussels
(1997), but this is likely to change. Check www.biof.uu.se/Xpose for an
update.
The users of Xpose are encouraged to report if they think that Xpose is behaving
strangely or if they find a bug. Even if we can not take on any official support responsibilities, we are interested in having a useful and bug free program. If we are not
aware of the bugs we can’t do anything about them... We are also interested in suggestions and comments but again we cannot promise to implement things because one or
a few users requests it.
The reason we want people to obtain Xpose from http://www.biof.uu.se/Xpose
is that we want to know, at least roughly, how many users of Xpose there is but it is
also for your own sake. S-PLUS source code is very easy to alter and if your friendly
colleague next door offers you a copy of Xpose you can not be sure that it is identical
to the original code. Anyway, you may use Xpose freely at your own risk and we do
not take any responsibility for how Xpose is used or misused.
1.2 Changes between Xpose 1.1 and Xpose 2.0
The changes between Xpose version 2.0 and the previous version (1.1) are numerous.
The main user visible difference is that Xpose 2.0 uses the Trellis GraphicsTM library
instead of the core graphics of S-PLUS. Another change is that it is no longer strictly
necessary with separate table files for, e.g. covariates and parameters. New is also the
possibility to save plots, after optional customization of the plot title and axis labels, to
a file suitable for inclusion in other programs such as word processors. There are also a
large number of new plots specifically designed to check certain assumptions made in
non-linear mixed effects modeling as well as diagnostics for GAM models, including
a new Bootstrap of the GAM algorithm. Xpose 2.0 is also a lot more flexible than the
older version. To make the transition easier for users of the previous version, major
differences, that might be confusing to someone expecting Xpose 1.1 behavior, will be
pointed out in footnotes.
5
1.3 About this manual
This manual should be viewed as a beginners guide to Xpose and should, together with
the installation instructions provided with the source code, be enough to get a new user
going. It will be assumed that Xpose is installed on the system and that the Xpose 2.0
library is in the S-PLUS search path (See the installation instructions for details.) We
also assume that the user knows how to interpret the usual goodness of fit plots, i.e.
we will not explain all the plots available in Xpose. Instead we will concentrate on the
areas that might not be intuitive and we will also give references to the literature where
appropriate.
1.4 About the distribution
The Xpose 2.0 distribution contains the source code, the Xpose 2.0 User’s Manual,
installation instructions and example files. The installation of the source code is described in the installation instructions. The User’s Manual is this document and is
distributed in both a postscript and HTML version. Details about the documentation is
given in the README file in the Doc sub-directory. The example files contains three
runs, complete with data file, model files, output files and table files. The details of the
examples are given in the README file in the Examples sub-directory.
1.5 Acknowledgment
We would like to thank Dr. Lewis Sheiner for the impetus to Xpose. We have used parts
of the S-PLUS code provided in the course folder for the ”Intermediate Workshop in
Population Pharmacokinetic Data Analysis Using the NONMEM System” given by
Dr. Lewis Sheiner and Dr. Stuart Beal. Dr. Janet Wade wrote some of the in house
S-PLUS scripts we used before the development Xpose and on which some of the plots
in Xpose are based. We would also like to thank Dr. Stuart Beal for making available
a version of NONMEM with some advanced features. (Please note that this version is
not yet generally available, neither is it required for using Xpose.) We would also like
to thank the participants in the S-news mailing list, especially Dr. Venables, for many
helpful discussions and code examples. We are also grateful for the helpful comments
and suggestions sent by Xpose 1.1 users and Xpose 2.0 beta testers.
2 Producing input data for Xpose
Xpose most often uses the contents of one or more NONMEM table files when producing plots and analyses. For the Run summary and Run record Xpose also needs
the NONMEM output files and model files. To check a data set the data file is needed.
For more details about how Xpose reads model files, output files and data files see
Sections 7.1 and 8.
6
2.1 Creating the table file(s) for Xpose to read
Xpose needs at least one NONMEM table file for input. If present in the current directory, Xpose will also read other table files. These table files should be named in a specific way. The table file names are divided up in two parts. The first part is the stem, for
example the standard table file has the stem sdtab, and the second part is the run number. The standard table file for run number one should therefore be named sdtab1.1
The other table files that Xpose reads, if present in the current directory and if they
match the run number, are patab, cotab, catab, mutab and mytab. Xpose expects these table files to be produced with the NOPRINT and ONEHEADER options on
the NONMEM $TABLE record and with the POSTHOC option on the $ESTIMATION
record. For example:
$EST POSTHOC
$TABLE ID TIME IPRED IWRES
NOPRINT ONEHEADER FILE=sdtab1
2.1.1 The sdtab
sdtab stands for standard table file. It should contain items describing the overall goodness of fit. The recommended column items and order for this table file
is ID, TIME2 , IPRED and IWRES (in addition to these NONMEM by default adds
DV, PRED, RES and WRES). IPRED (individual predictions) and IWRES (individual
weighted residuals) are not NONMEM defined items and has to be defined by the user.
These can be obtained by the following code in the $ERROR block3 :
$ERROR
IPRED = F
W
=
; Your choice:
;
;
;
;
;
;
IRES = DV-IPRED
IWRES = IRES/W
Y
= IPRED + W*EPS(1)
1
= additive error model
F
= constant CV error model
F**THETA(.) = power error model
(F**2+THETA(.)**2)**0.5
= additive plus
proportional
error model
Note that the IWRES = IRES/W line will, in some cases, need reformulation to avoid
division by zero.
1 It is possible to alter the table file name structure by the addition of a table file name suffix, e.g. .txt,
making Xpose look for table files ending in .txt, for example sdtab1.txt. See the installation instructions for
details.
2 Or whatever independent variable that is used in the NONMEM analysis
3 The code is taken from the notes of the NONMEM intermediate workshop given by Stuart Beal and
Lewis Sheiner. It is also somewhat different from the corresponding code in the Xpose 1.1 manual.
7
2.1.2 The patab
patab stands for parameter table file. It should contain the parameter estimates of
the fit. The recommended column order is ID followed by the parameters of interest,
for example the individual CL estimates, the s and/or the typical individual parameter
estimates.
2.1.3 The cotab and catab
cotab and catab stands for continuous and categorical table file respectively. The
table files should contain the covariates, divided up into continuous (cotab) and categorical (catab) covariates. The reason for this division is that they are treated differently in plots and analyses, e.g. the GAM. The recommended column order is ID
followed by the covariates.
2.1.4 The mutab
mutab stands for multiple response variables table file. In a simultaneous fit of two different types of measurements it is usually a good idea to make, for example, goodness
of fit plots for the two measurements separately. For Xpose to be able to differentiate
between the two, it is necessary with a flag variable that will be, for example, 1 for
pharmacokinetic observations and 2 for pharmacodynamic observations. The mutab
was in Xpose version 1.1 used to provide such a flag variable. In Xpose 2.0 it is not
necessary to provide the flag variable in this way (see Section 15) but mutab is kept for
compatibility reasons. The recommended column order is ID, FLAG, TIME, IPRED
and IWRES.
2.1.5 The mytab
mytab is new to Xpose 2.0 and can be used for items not fitting into the table files
described above, for example variables created within NONMEM. Since this table file
is completely user defined there is no recommended column order.
2.2 The extra file
The table files described in the previous section are limited to the variables available
within NONMEM. NONMEM has a limit of 20 data columns so if the data set to be
analyzed has more columns than that it is not possible to access all, e.g., covariates in
Xpose. To solve this problem, Xpose can read an extra file (if present in the current
directory), called extra followed by the run number (for example extra1). The
format of this file should follow the format of NONMEM table files, i.e. the column
headers on the second line and no alphabetic characters below this line, except the E or
e in exponents (the period, ., that can be used in NM-TRAN data files does not work,
neither do dates or clock times with a colon separating hour and minutes). It is also
important that the number of lines in the extra file is the same as in the NONMEM
table files. Care should also be taken when selecting the column names, see Section 2.4.
8
2.3 The Xpose data bases
When the user starts Xpose (see Section 3) it prompts for a run number to process.
This number will be the current run number until another run number is specified (see
Section 5). Each run number is associated with an Xpose data base containing the data
from the matching table files and extra file. This data base is just a regular S-PLUS
data frame with a few add-ons (see Section 2.5) and is called xpdb followed by the
run number. The Xpose data base is stored in the current S-PLUS working directory
and is hence accessible in later S-PLUS or Xpose sessions4 . The Xpose data base
matching the current run number is called the current data base.
When the data is read (see next section) the user are asked for (optional) documentation
of the current data base. This can be thought of as a reminder note to identify a certain
run without having to consult any other run documetation.
Type any documentation for the new data base and finish with
a blank line:
1:Test of documentation feature 2:
2.4 How Xpose reads files
When the user specifies a run number, Xpose first checks to see if there is a matching
Xpose data base available in the current S-PLUS working directory. If there is, the user
is asked if he/she wants to use the already existing data base or if the data base should
be recreated from the table files and extra file. If there is no matching data base the
user is asked if he/she wants to create it.
When Xpose is told to create a data base, the relevant files are read in the following order (if they exists in the current directory): sdtab, mutab, patab, catab, cotab,
mytab and extra. The data from each of these files are put together in one large data
frame and columns with duplicated names are deleted5 . When there are no duplicated
items in the current data base, Xpose deletes all lines where the column named WRES
has an entry of zero (i.e. keeps all lines with observations) unless told otherwise (see
Section 5). The next step is to determine what each column is, or rather the other way
around, Xpose tries to define the Xpose data variables. This process is described in
detail in the next section. When the Xpose data variables are defined the data frame is
given the S-PLUS class attribute xpose and is saved to disk.
2.5 Xpose data variables
When Xpose makes a plot of, say, WRES vs PRED it takes the column in the current
data base defined to be the wres-variable and plots that against the column defined to
be the pred-variable. The wres- and the pred-variables are examples of Xpose data
4 This is a major difference from Xpose 1.1 were the table files were read each time a plot or analyses was
selected from the Xpose menus
5 The first occurance of a duplicated column is kept, which means that if the extra file contains a column
with the same name as any of the columns in the table files, that column will be deleted regardless of if the
actual numbers in the columns are the same. With the table files this is not a problem since in NONMEM
two different variables can not have the same name.
9
variables. All plots and analyses available in Xpose are defined in terms of xpose data
variables. Since it is possible to redefine these variables in Xpose it means that it is
quite easy to change the data that is plotted, e.g. concentrate on one parameter at a
time, even if we put all parameters in the patab6 .
The default Xpose data variable assignment is done when the table files are read (see
previous Section) and is based on the position of the columns in the table files and the
column names as described in Table 1.
2.5.1 Xpose data variables without default settings
There are a few Xpose data variables that do not have a default setting. These are the
definitions of typical parameter values (tvpar), random effects (ranpar) and weights
(weight).
As soon as there are covariates included in the mixed-effects model the typical values
of the parameters can be different from one individual to another. To assess the appropriateness of the inter-individual error model (the model) one can plot the random
effects (i.e. s) vs the corresponding typical parameter values [4]. To be able to do that
in Xpose it is necessary to define the typical parameter values and the corresponding
random effects.
If the weight variable is defined it will be used in the GAM and the bootstrap of the
GAM analyses as prior weights (see Sections 10.5.5 and 11.5).
2.6 Using only one table file for all data items
The reason for the rather strict organization of the table files is that it helps Xpose to
decide which column is what. As indicated previously it is not necessary to use the
recommended table files nor the recommended table file order since it is possible to
(re)define all the Xpose data variables within Xpose. This is a great ease for NONMEM IV users which no longer needs to use multiple $PROBLEM statements to make
NONMEM produce more than one table file in a single run. It is recommended that
either the sdtab, the mutab or the mytab is used if only one table file is produced.
See also Section 5.
3 Starting and quitting Xpose
Start S-PLUS in the directory where you have the NONMEM table files (see section
2.1 and the installation instructions). At the S-PLUS prompt type xpose2(). Xpose
will start and a graphics window will be opened. Type the number of the run to be
processed. If there already is an Xpose data base present that matches the run number,
Xpose will ask if you want to use it or recreate the Xpose data base from the table files.
6 This
is one of the major changes in Xpose between version 2.0 and 1.1. In 1.1 we would have to look
at plots of all parameters defined in the patab and the only way available to change what was plotted was to
re-arrange the table files
10
Table 1: Description of the default Xpose data variable assignments. The variables appear in
the order they are defined when Xpose creates a data base.
Xpose data variable Xpose usage
Default definition
id
Used to identify
1. A column with the name ID
individuals
2. The first column in the first
existing file in input file order
idlab
Used to label data
Same as the id-variable
individuals
dv
Use in plots with
1. A column with the name DV
with the dependent
2. The fourth column from the end
variable
in the first existing file in input
file order
res
Not used in the
1. A column with the name RES
default set-up of
2. The second column from the end
plots
in the first existing file in input
file order
wres
Used in plots with
1. A column with the name WRES
weighted residuals
2. The last column in the first existing file in input file order
pred
Used in plots with
1. A column with the name PRED
population predictions
2. The third column from the end
in the first existing file in input
file order
idv
Used in plots with the
1. A column with the name TIME
independent variable
2. The second column in sdtab
3. The third column in mutab
ipred
Used in plots with the
1. A column with the name IPRE
individual predictions
2. The third column in sdtab
3. The fourth column in mutab
iwres
Used in plots with the
1. A column with the name IWRE
individual weighted
2. The fourth column in sdtab or
residuals
fifth column in mutab
flag
Used to make plots of
The second column in mutab
subsets of the data
curflag
Indicates the level of the flag Not defined
to be processed
occ
Not used in the
Not defined
the default set-up
of plots
prameters
Used in plots and
Columns two from the beginning
analyses of parameters
to the fifth from the
end in patab
covariates
Used in plots and
Columns two from the beginning
analyses of covariates
to the fifth from the
end in cotab
and
catab
miss
Used to indicate
Default set to -99
missing data
Alternative are numbered in the order they are tried
The input file order is sdtab, mutab,11patab, catab, cotab, mytab and extra
See Section 15
Covariates found in catab will be coded as factors in S-PLUS
See Section 6.5.1
Documentation
(4)
Main menu
(8)
Quit Xpose
Model
comparison
menu
(4)
Parameter
plots menu
(7)
Dataset
checkout menu
(7)
Manage
databases
menu
(26)
Tree menu
(4)
Covariate
model menu
(6)
Goodness of fit
plots menu
(7)
Create/
modify items
menu
(8)
GAM menu
(9)
Bootstrap of
the GAM menu
(5)
Structural
model
diagnostics
menu
(15)
Residual error
model
diagnostics
menu
(11)
Settings for the
GAM menu
(11)
Scope menu
for the GAM
(7)
Plots for the
bootstrap of
the GAM menu
(10)
Settings for the
bootstrap of
the GAM menu
(13)
Figure 1: The Xpose road map. Each box, except the Quit option, is a menu. The
number of options in each menu is indicated by the number in parenthesis.
To quit Xpose select option 8 from the MAIN MENU (See Section 4). Xpose asks if
you just want to quit Xpose or to quit both Xpose and S-PLUS.
4 Moving around in Xpose
The user interface is a system of text based menus with up to 4 levels and 167 menu
option (Figure 1).
Below is the MAIN MENU:
MAIN MENU
1:
2:
3:
4:
5:
6:
7:
8:
Documentation
Manage databases
Data checkout
Goodness of fit plots
Parameters
Covariate model
Model comparison
Quit
12
Selection:
Typing a number at the Selection: prompt selects the corresponding option from
the menu. Some options leads to new menus while others lead to a plot or an analysis.
In all menus except the MAIN MENU, option number one leads to the menu above in
the system of menus.
5 Redefining and creating variables
It is possible to redefine Xpose data variables as well as to create new data items within
an Xpose session. This is done from the MANAGE DATABASES MENU (option 2 from
the MAIN MENU).
DATABASE MANAGEMENT MENU
1: Return to the main menu
2: Change run number/database
3: List items in current database
4: View the documentation for the current data base
5: Change id variable
6: Change independent variable
7: Change dependent variable
8: Change pred variable
9: Change ipred variable
10: Change wres variable
11: Change iwres variable
12: Change variable to label data points with
13: Change flag variable
14: Change current value of the flag variable
15: Change occasion variable
16: Change missing data variable
17: Change parameter scope
18: Change covariate scope
19: Change typical parameter scope
20: Map random effects to typical parameters
21: Change name of a variable
22: Change weight variable
23: Copy variable definitions from another data base
24: Create/modify items in the current data base
25: Turn color printing on
26: Keep all lines when reading table files
Selection:
Option 2 will prompt the user for a new run number to process, similar to the initial
question when Xpose is started.
Option 3 will list the items in the current data base, including the Xpose data variable
definitions:
The current run number is 4 .
13
The data base contains the following items:
ID TIME IPRE IWRE DV PRED RES WRES VID CL V KA Q VSS ETA1
ETA2 ETA3 ETA4 ETA5 VIST SEX SMOK CIGS AGE HT WT CMPL CRCL
The following variables are defined:
Id variable: ID
Label variable: ID
Independent variable: TIME
Dependent variable: DV
Parameters: CL
Covariates: SEX WT CRCL AGE
(Continuous: WT CRCL AGE )
(Categorical: SEX )
Missing value label: -99
Wres variable: WRES
Iwres variable: IWRE
Res variable: RES
Ipred variable: IPRE
This option tells us the current run number (4 in this case), what items we have in the
current data base and which of the Xpose data variables that are defined.
Option 4 displays the documentation, if any, for the current data base.
Options 5-20 can be used to redefine the default settings for the xpose data variables.
Option 21 is used to change variable names, i.e. the default name in plots will be the the
newly defined name instead of the four letter name obtained from the NONMEM table
file. Unfortunately there are some limitations in Xpose (or S-PLUS rather) regarding
the names that can be given to a variable. The names should not contain spaces7 or other
“strange” characters like parentheses. Note that this does only apply when renaming a
variable in this way. In the specification of axis labels and plot titles it works perfectly
fine with any ASCII string (see Section 13).
With option 22 it is possible to define prior weights used in the GAM and the bootstrap
of the GAM analyses (see Sections 10.5.5 and 11.5).
If only one table file is used it is usually necessary to manually change some of the
Xpose data variable definitions. Having to do so for each run can easily become tedious. With option 23 it is possible to copy variable definitions from one Xpose data
base to another.
Option 24 leads to the CREATE/MODIFY DATA ITEMS MENU (See Section 5.1.)
Option 25 will toggle the usage of color when printing and exporting plots (see Section 13).
Option 26 affects the way Xpose reads table files. By default, Xpose will not put table
file lines with WRES equal 0 into the current data base. There are, however, instances
when this behavior is not desired and by selecting this option before reading a set of
table files, Xpose will keep all table file lines.
7 Spaces do actually work in some plots. If you want to have spaces in your variable names, just try it, it
might work!
14
5.1 Creating and/or modifying data items
CREATE/MODIFY DATA ITEMS MENU
1: Return to the previous menu
2: Add a Time After Dose item to the current data base
3: Add averaged covariates to the current data base
4: Add exponentiated values of an item to the current data base
5: Add the logarithm of an item to the current data base
6: Add absolute values of an item to the current data base
7: Change covariates categorical <-> continuous
8: Copy data item from another data base
Selection:
This menu, which can be reached from the MANAGE DATABASES MENU contains
options that creates or modifies data items in the current data base.
Option 2 creates a time after dose data item (the Xpose data variable is tad). This
is useful if we are dealing with a long and/or variable dosing history, i.e. when the
times of the observations are relative to the first dose rather than the time since the last
dose. Selecting this option will create a new item in the current data base called TAD.
Redefining the idv variable to TAD will make the plots using the independent variable,
e.g. the basic goodness of fit plots, use time after dose instead of the time since the first
dose. This option will try to read either of sdtab, mutab or mytab in that order.
The column in the read table file that matches the name of the independent variable
in the current data base will be used for the calculations. If no such column is found,
Xpose will use the second column for the sdtab and mytab or the third column for
the mutab.
Option 3 will add columns with within individual averages of continuous covariates
that varies within one or more individuals. These “new” covariates will get the name
of the original covariate with an m appended, e.g. the within individual average of
serum creatinine levels (SECR) will be SECRm.
Option 4 will add a column with the exponentiated values of a user specified item in
the current data base. The name of the new column will be the name of the original
column prepended by exp, e.g. expPRED.
Option 5 will add a column with the logarithm of a user specified item in the current
data base. The name of the new column will be the name of the original column
prepended by log, e.g. logDV. This option will not work if there are values in the
column that are less than or equal to zero
Option 6 will add a column with the absolute values of a user specified item in the
current data base. The name of the new column will be the name of the original column
surrounded by vertical bars, e.g. |ETA1|.
With option 7 it is possible change continuous covariates into categorical covariates
and vice versa.
With option 8 it is possible to copy a data item from another xpose data base to the
current data base. The new column will be called the same as the variable copied
appended by the run number of the data base it was copied from, e.g. CL1 (the CL
column of the data base for run number 1).
15
6 Plotting conventions
This section describes some details about the way that Xpose draws plots and also a
description of the more unusual plot types.
6.1 Plotting symbols and individual curves
Many of the plots in Xpose do not use the regular type of plotting symbols, like ◆ or ❑,
but rather a number, which by default is the ID number (Figure 2). This is to facilitate
the identification of individuals and to make it possible to follow individuals between
plots. The data item used as the plotting symbol can be specified in the database management menu. It is, for example, perfectly possible to specify the variable SEX as the
variable to label data points with, making it directly visible if, e.g. males in general
have larger WRES than females. It is also possible to turn the usage of ID numbers off
(See Section14.)
In some plots, individual data points are connected with a line (Figure 2) to make it
easier to spot trends in, e.g. goodness of fit plots. To decide which points that belongs
to a certain individual, Xpose uses the Xpose data variable id. This is default set to the
ID, but can be redefined in the database management menu to be something else. The
data item to be used as plotting symbol and the data item identifying individuals can
be specified separately (see Section 14).
6.2 Smoothes
One way to make it easier to discern underlying patterns in a plot with many data
points is to add a smooth non-parametric curve. The idea with such a curve is that
it should smoothly follow the general trend in the data without making assumptions
about the functional form of the possible relationship between the variables plotted.
Such smoothes are frequently used in the plots in Xpose (Figure 2). The curves are
obtained using the loess() function in S-PLUS. loess uses locally weighted linear
or quadratic regression in overlapping intervals of the data [5]. The loess curves in
Xpose use a locally linear model and an interval span of 2/3 of the data range.
6.3 Visual reference grids
In some plots there is a visual reference grid (Figure 3). These are not intended for
reading off individual data values but rather for making the comparison with another
plot or panel easier.
6.4 Trellis Graphics
Trellis GraphicsTM is a new graphics library in S-PLUS. It has been developed by
William S. Cleveland and coworkers and is described in the book Visualizing Data [6].
The theory behind Trellis GraphicsTM is based on modern research on exploratory data
16
WRES vs Predictions
15
56
4
53
39
20
37
56
35
52
3
49
25
15
WRES
2
0
43 44
39
62
31
15
47
35
62
36
4
39
26
35
65 4524
60
53
165256 43
10 2
20
31
38
65
3 40
57
27
5
1
31 28
52
4149
53
62 15
14
53
59
27
5 23
15 5643
2
5
9
46
32
18
4
5023 31
5 21 522329
21
34
26
3
16
17
12 5
53
19 44
26
19
58 43
41
60
54
16
61
5
13 48
14
40
21
24
64 29
44 50
3 14
2615
63
53 49
3443
48
53
58
54
19
31
37
64
53
34
60
23
63
25
48
64
5
3
44 16
64
61
31
20 50
60
51
30
41482633
24
10 41
23
51
63
6
34
268 12
16
53
61
21
34
34
18
61
8 57
25
13
5859
5
15
59
21
2512
48
2451
32
18
54
20
27
63
32
1641 48
19
23
44
14
15
9
12
18
39
58
57
24
60
12
54
24
20
14
33
19
4332 26
64 40
51
8
13 3250 17
20
21
1212
61 31
22
21
14
32
22 1232
47
61
9
25 13
1321 40
22
8
13 54
327
58
2549
22
13
63
40
55
46
323
52
31
59 18
65
24
21 13
14
3 65 15 55
43
13 12
26
4049
20
39
1663
44
57
4
61
16
41 27
65
43 16
14 40
49
20
31
56 61
5
48
53 345 41
43
28 16
1
57
34
2050
14
52
61
4436 14 58
61
39
4
43
31
15
30
13
34
36
39
3
35
-2
52
52
54
62
33
4
30 32
29
27
42
8 24
57
28
46
19
40
18
48
17
7 22
51 44
25
60
6 41
54
9
36
49
2 63
26
32
24
4
30
50
22
59
19 24
52
8
65
45
49
28
1
6
54
57
48
9
18
17
36
60
46
55
26
58
51
35
32
2
63
27
4423
38 41
64
33 2341
29 63
4044
65
64
25
56
0
62
42
2
50
36
52
50 23
7
6555
60
46
18
54
4
62
9
51
2728
6030
50
62
54
60
1
19
37
33
17
57
62
4
30
46
7
8
28
6
42
29
64 1
1017
57 6
8
8 7
50
37
9 2
38
19
27
48
38
48
59
1847
37
9
64
48
27
49
18
2
55
38
51
46
28
55
46
29
1
28
46
42
1
30
46
2
7
33
36
2
6
17
42
55
30
29
17
6
47
28
7
33
17
55
6
33
57
33
10
64
35
65
35
1
7
55
30
42
28
30
10
5129
45
59
19
25
40
22
25
6
4
65
35
59
33
47
36
29
17
2
36
1
36
49
39
62
20
40
60
80
Predictions
Figure 2: A plot of WRES vs predictions. The points are labeled with the ID number and each individuals points are connected by a dashed line (also based on the ID
number). Added to the plot is a smooth curve to enhance any underlying pattern.
analysis and visual perception [7, 8]. Xpose does not utilize the full power of Trellis GraphicsTM . To do so it would be necessary with a far more flexible graphical
user interface than the text based menu system that is currently implemented in Xpose.
Nevertheless, Trellis GraphicsTM offers a lot of advantages (and implementation drawbacks!) over the core S-PLUS graphics and will be the default graphics methodology
in S-PLUS from version 4 and onward.
6.4.1 Multi-panel conditioning
One of the big advantages of Trellis GraphicsTM is the ease with which plots of one
variable vs another given a third can be drawn. This is in the core S-PLUS graphics called a coplot but is in the Trellis GraphicsTM terminology called a multi-panel
conditioning plot [9]. The idea behind this type of plot is to extend the regular two
dimensional diagrams to three or more dimensions (more than three dimensions is possible by specifying more than one given variable, however, Xpose uses only one given
variable) and thus be able to visualize relationships that would otherwise be hard to
see.
Figure 4 is an example of a multi-panel conditioning plot of CL vs HCTZ (a categori-
17
Observed and predicted concentrations vs Time
2
4
Observations vs Time
101
6
46
146
Concentration
150
7
52
30
42
54
155
142
55
4
28
117
60
145
18
62
0
10
12
46
101
101
2
42
1
142
52
7
155
30
28
150
117
42
46
7
142
155
28
35
6
119
55
62
110
4
54
162
49
50
60
17
33
159
26
65
126
27
108
8
37
9
24
57
32
59
19
18
149
15
125
115
38
132
10
48
31
133
22
51
23
124
64
118
164
5
122
20
44
36
41
105
151
163
16
113
140
141
63
153
40
3
53
12
121
158
43
25
14
143
13
34
39
161
61
9
33
125
51
24
126
15
50
119
8
129
132
2
110
47
108
29
27
122
38
26
48
159
31
32
5
37
113
105
118
56
151
58
35
133
10
45
162
124
23
63
115
59
19
149
41
12
17
57
14
163
20
16
44
158
53
21
22
13
153
65
36
49
141
140
40
161
164
121
143
39
43
61
25
3
64
46
101
146
1
50
8
101
150
100
6
Individual predictions vs Time
2
46
150
29
50
62
17
119
6
35
129
162
159
4
59
54
26
37
60
65
110
19
154
149
57
15
23
49
8
27
33
36
133
126
115
24
32
9
124
108
132
18
38
48
125
22
51
44
64
164
118
41
122
10
25
5
31
163
140
40
20
141
105
16
158
63
151
153
113
12
53
121
3
43
39
14
13
21
34
143
161
101
28
46
155
7
142
2
55
47
62
52
29
30
17
159
119
36
150
50
6
4
1
33
110
59
35
19
45
26
145
65
154
60
54
115
149
49
23
57
8
27
126
133
24
108
124
125
38
9
48
32
15
18
132
44
164
41
25
22
31
118
51
5
64
140
141
20
163
40
158
122
105
58
153
63
12
53
39
56
151
16
113
14
43
121
3
34
13
143
21
61
4
54
117
28
55
117
101
46
28
142
36
7
155
30
52
55
47
2
129
159
1
119
17
62
150
50
35
4
6
29
162
133
19
26
27
60
149
23
57
126
115
8
54
124
65
33
49
125
24
48
108
32
44
18
164
15
9
141
132
41
140
25
51
118
22
163
58
5
122
20
153
40
158
63
39
105
31
53
12
16
56
151
121
64
43
113
14
3
34
143
21
13
161
61
42
7
7
52
150
30
155
142
42
146
42
117
117
2
1
52
30
55
6
1
28
46
142
129
7
30
36
17
1
159
62
2
52
155
119
29
50
55
133
4
162
59
33
19
150
6
27
60
38
110
57
23
26
10
149
115
65
24
54
35
126
25
8
124
164
49
125
48
15
108
32
18
9
132
41
141
5
44
140
58
153
118
51
64
163
158
22
20
105
122
31
40
16
53
12
151
113
121
43
34
3
14
143
21
13
161
61
117
101
28
46
142
30
52
119
17
2
1
155
62
159
50
36
55
150
162
29
59
19
6
4
60
27
26
33
23
149
65
115
57
35
124
125
24
126
8
54
164
154
132
15
49
44
32
108
158
48
18
5
140
41
25
163
58
153
63
20
105
31
22
16
40
53
122
12
39
141
151
113
3
34
121
143
43
14
21
13
161
61
6
47
146
42
101
28
46
117
142
30
37
52
7
17
119
33
2
29
155
45
36
50
150
10
19
60
162
27
59
62
133
23
6
26
149
115
126
24
145
57
54
48
132
9
44
154
49
32
18
15
164
125
25
153
58
163
158
141
118
64
41
63
31
51
39
53
40
105
16
122
151
56
113
121
14
43
3
21
13
143
61
161
8
46
1
159
55
4
65
124
57
8
48
20
5
25
108
140
64
12
34
61
117
28
101
2
119
30
17
52
142
29
19
33
155
50
36
60
150
133
23
162
110
6
35
27
62
115
26
149
65
24
57
15
44
48
9
54
132
153
32
126
18
164
49
58
158
125
163
154
41
63
53
118
16
40
51
25
39
105
122
31
113
14
121
43
3
56
34
21
13
161
61
10
46
4
159
45
1
162
55
5
8
48
124
108
20
63
140
64
12
61
146
47
117
37
28
142
101
17
52
119
150
2
155
29
129
30
60
19
50
33
59
36
23
27
65
44
115
26
145
149
24
48
153
15
126
18
54
125
158
132
41
163
164
154
49
53
32
40
141
16
51
56
64
151
31
14
113
121
122
43
3
143
21
13
161
6
55
2
150
4
2
62
60
145
62
33
119
18
29
50
9
129
110
47
35
125
24
126
15
51
8
159
108
17
162
132
26
36
27
38
37
49
48
122
32
59
31
65
19
57
149
45
133
151
118
115
5
23
58
105
124
113
56
22
10
63
44
41
163
164
20
64
12
16
40
25
14
53
141
140
13
21
153
158
121
3
43
161
143
39
61
54
4
119
50
35
159
110
33
17
60
162
36
26
126
8
27
37
18
9
59
24
49
108
125
19
15
65
57
133
149
38
32
51
132
48
115
23
124
118
31
122
10
22
5
164
151
41
44
64
105
163
63
25
20
113
140
141
40
12
16
153
158
53
14
121
13
3
43
39
143
34
161
61
117
101
42
142
155
1
117
28
30
52
101
42
46
117
28
7
142
155
30
52
1
2
55
62
6
150
129
119
50
29
159
17
4
35
36
162
110
54
33
60
37
154
26
59
27
19
133
126
8
49
57
149
65
24
23
115
38
9
108
18
125
15
32
48
124
132
10
51
118
164
22
44
41
31
122
64
5
25
163
140
141
151
105
20
63
40
158
153
113
16
12
53
121
14
3
43
39
13
21
143
34
161
146
42
101
117
46
28
142
7
155
30
52
2
47
1
55
62
150
119
17
159
6
50
29
36
4
35
110
33
59
60
26
45
19
133
54
27
145
154
149
57
65
23
126
49
8
115
38
24
9
108
18
124
15
125
32
48
132
164
51
44
118
41
22
25
64
5
140
31
58
163
141
122
20
158
63
40
105
151
153
56
16
113
12
53
39
121
43
14
3
34
21
143
13
61
101
117
28
46
142
47
7
155
30
2
52
129
1
55
17
62
119
159
150
50
29
36
6
4
162
35
33
19
133
60
26
27
149
23
54
65
57
115
126
8
49
24
124
9
15
108
18
125
48
32
164
132
44
25
41
51
5
118
140
64
22
141
58
163
158
31
20
153
122
63
40
105
151
16
56
53
12
39
113
121
43
14
3
34
143
21
13
161
61
42
117
101
28
46
142
7
52
30
2
129
155
17
1
119
159
55
62
150
50
36
29
4
162
59
6
19
133
33
60
110
35
26
27
10
23
149
38
65
57
115
54
126
8
24
49
124
15
9
48
125
18
108
164
32
132
44
25
41
5
140
158
64
51
118
58
163
141
153
20
22
31
40
105
122
53
16
151
12
113
121
43
14
3
34
143
21
13
161
61
117
28
101
46
142
52
2
30
17
155
119
159
1
36
55
29
150
50
62
4
162
59
19
33
60
6
35
27
23
26
65
149
115
57
54
24
126
8
124
154
49
15
48
44
125
164
18
108
132
32
25
5
41
158
140
58
163
153
141
20
63
40
22
31
105
53
122
16
39
12
151
113
14
121
43
3
34
143
21
13
161
61
146
42
47
117
28
101
46
142
37
17
52
7
30
2
119
155
36
29
50
150
45
19
62
59
162
33
60
133
10
23
27
6
26
149
115
145
57
24
126
54
44
15
48
154
49
125
164
9
132
18
32
25
158
153
41
163
58
141
64
118
63
51
40
53
105
39
31
16
122
56
151
113
14
121
43
3
143
21
13
161
61
46
159
1
4
55
65
57
124
8
48
5
108
25
20
140
64
12
34
61
117
28
101
142
17
52
119
30
2
155
29
150
50
36
19
60
33
133
162
23
27
62
110
65
26
115
149
6
35
24
44
57
126
48
15
54
153
125
132
164
9
158
18
154
32
49
41
58
163
25
63
53
40
118
39
51
16
105
31
56
122
14
43
113
121
3
34
21
13
61
161
46
4
159
1
45
55
162
48
124
8
5
20
108
63
140
64
12
61
146
47
117
37
28
101
142
17
52
119
30
2
129
29
19
150
60
50
33
155
36
59
23
27
65
115
44
26
149
145
24
153
48
15
126
125
132
158
163
164
54
41
18
53
32
154
49
141
40
16
64
51
31
56
122
14
151
43
121
143
3
113
21
13
161
12
Time
Figure 3: A plot of the observed and predicted concentrations vs time. The observations
and predictions are plotted vs time in separate panels using the same scales on the xand y-axes respectively. A visual reference grid has been added to facilitate comparison
of the plots in the two panels.
cal covariate indicating whether the patient was also treated with hydrochlorothiazide)
given SEX (the given variable). In this case the conditioning is based on the levels in
the variable SEX (1 or 2). It is also possible to condition on intervals of a continuous
covariate (Figure 5). The top panel, called the given panel, shows the intervals. The
x-axis of the given panel gives the range of the given variable and the horizontal bars
shows the intervals. The multi-panel plot at the bottom is the actual plot, divided up in
the intervals. The lowest bar in the given plot corresponds to the lower left panel, the
second lowest bar corresponds to the lower right panel and so on from bottom left to
top right.
In Xpose, the given intervals are constructed so that there are approximately the same
number of points in each panel, with approximately half of the points in common between the intervals. The latter is to have a smooth transition between the panels so
that, e.g. a smooth through the data in each panel can be followed from lower left to
top right. Xpose will determine the number of intervals from the total number of data
points. With fewer than 50 data points there will be two intervals, with between 50-75
data points there will be three intervals, with between 75-100 there will be 4 intervals
and with more than 100 points there will be six intervals.
6.4.2 Box and whiskers plots
The plot in Figure 4 is a box and whiskers plot (in the core S-PLUS graphics called
a boxplot). These plots are in Trellis GraphicsTM plotted horizontally rather than vertically. The solid dots in the middle of the boxes are the medians, which measures
the center, or location, of the distributions. The length of the box, which is the interquartile range (i.e. the middle 50% of the data are enclosed in the box), is a measure
18
CL vs HCTZ given SEX
SEX: 2
0
HCTZ
1
SEX: 1
0
1
10
20
30
40
CL
Figure 4: A multi-panel conditioning plot of the relationship between CL and hydrochlorothiazide (HCTZ ) usage given SEX . See text for further details.
of the spread of the distribution. If the inter-quartile range is small the middle data are
tightly packed around the median. If the inter-quartile range is large, the middle data
spread out far from the median. The relative distance of the upper and lower quartiles
from the median gives information about the shape of the distribution. Unequal distances indicates that the distribution is skewed. The whiskers encode the upper and
lower adjacent values. The upper adjacent value is the largest observation that is less
than or equal to the upper quartile times 1.5. The lower adjacent value follow the same,
but opposite, calculations. Outside values, which are observations beyond the adjacent
values, are graphed individually. The adjacent and outside values provide summaries
of the spread and shape at the tails of the distribution.
The groups in each of the panels of Figure 4 are ordered so that the HZTC group with
the lowest grand median (i.e. regardless of the division in males and females) is plotted
first, that is lowest, in each panel. This is called main effects ordering and is part of the
Trellis GraphicsTM philosophy [6]. It also makes it easier to see subgroup deviations
from the general trend . This ordering is used in almost all box and whiskers plots in
Xpose with the notable exception of the GAM plots (see Section 10).
19
CL vs AGE given WT
Intervals
4
3
2
1
60
WT
80
100
30
WT
120
40
50
140
60
70
WT
40
30
20
CL
10
WT
WT
40
30
20
10
30
40
50
60
AGE
70
Figure 5: A multi-panel conditioning plot of CL vs AGE given intervals of WT . See
text for further details.
6.5 What data is plotted?
In the process of reading the input table files and the extra files (see Section 2.4) Xpose
discards the lines in the table files with a WRES entry equal to zero. This is to get
rid of the lines corresponding to dosing events, which do not contain any information
about the fit. The remaining data, henceforth referred to as all data, corresponds to the
observation events in the NONMEM data file.
In many plots we are interested in all data, for example plots including WRES. In plots
and analyses of the parameters, on the other hand, we are usually only interested in
one data point per individual. In Xpose, this data point is taken from the first line in
each individual. For example, if we want to plot CL vs CRCL (creatinine clearance),
Xpose will plot the CL and CRCL values on the first line of each individual, regardless of whether the CRCL change within the individual. This behavior is fine as long
as the covariates do not change within the individuals. If there are small within individual changes in the covariates or if the change is of no interest to the analysis, we
20
can let Xpose calculate within individual averages of the continuous covariates (see
Section 2.4) and then use the averaged covariates instead of the corresponding real covariates when making the plots. An alternative strategy is to construct a new variable
that change value every time the within individual varying covariate change (this can
presently not be done within Xpose). Making the plot with the Xpose data variable id
set to this new variable will display all covariate values.
There are other means to influence the way Xpose selects the data to be plotted or
analyzed. In the GAM we can tell Xpose to use all data instead of the first data line
for each individual (see Section 10). It is also possible to make plots and analyses on a
subgroup of the data (see Section 15).
6.5.1 Handling of missing data
If the Xpose data variable miss is set (the default value is -99 but can be changed in
the database management menu), Xpose will treat the value of this variable as missing
data. The way this works in practice depends on the plot or analysis requested. In
plots of one data item vs another, for example a parameter vs a covariate, individuals
with a value of either the covariate or the parameter equal to the miss variable, will be
excluded from the plot. In plots or analyses that handles blocks of data, e.g. the GAM
or multi panel conditioning plots, individuals will be excluded that have at least one
data entry equal to the miss variable. For example in the GAM, if an individual have
a missing value of, say, CRCL, that individual will be excluded completely from the
GAM analysis.
7 Documenting runs
A new feature in Xpose 2.0 is the possibility to document runs in other ways than in
the form of plots. Run documentation can in Xpose 2.0 be done in two ways. First, a
single run can be documented using a run summary. Second, a series of runs can be
summarized in a run record. These documentation features can be reached from the
DOCUMENTATION MENU on the MAIN MENU.
DOCUMENTATION MENU
1: Return to previous menu
2: Change run number
3: Summarize run
4: Construct a run record
Selection:
7.1 The run summary
The run summary is a one page summary of a run consisting of goodness of fit plots,
NONMEM termination messages, parameter estimates and, optionally, the model file.
An example run summary is displayed in Figure 68 . The run summary is intended as
8 The
code in the figure works only for NONMEM V
21
a way to document runs. It is, however, not a substitute for the NONMEM output file,
which contains loads of other, useful, information.
At the top of the run summary are four basic goodness of fit plots. Below the plots,
in the left column, are the termination messages from NONMEM, followed by the
value of the objective function. Next follows a table with parameter estimates. in
the case of the , the estimates are reported as they come in the NONMEM output
file. The variance estimates ( and ) are converted to standard deviations and the
covariances (off-diagonal s and s) are converted to correlations. The standard
error estimates are reported as the coefficient of variations (CVs) of the corresponding
parameter estimates, i.e. the standard error divided by the parameter estimate. For the
s and s the CV refers to the variance estimate and not to the standard deviation.
Xpose can handle a maximum of 40 s and 30 s and s.
Below the table with parameter estimates is the model file, possibly continuing in the
right column. The inclusion of the model file is optional (see below). The run summary
is only one page long so if the model file is longer than what will fit in the left and right
column, it will be truncated.
A run summary can be requested with option 3 on the DOCUMENTATION MENU.
When the user selects this option, Xpose first asks the user if he or she wants to send the
output directly to the printer9 (this is different from all other options where option to
print the plot is available first after the plot has been shown on screen, see Section 13).
When the user has specified where the run summary is to be sent, Xpose prompts for
the name of the model file. Pressing return will accept the default model file name10
and typing 0 means that no model file should be included in the run summary. If the
default file name is not right the user has to type the correct file name followed by
return. The next question is about the name of the output file name. Pressing return
accepts the default output file name11 and typing 0 will return to the MAIN MENU. If
the default file name is not right the user has to type the correct file name followed by
return. An example of how a run summary can be requested is given below:
DOCUMENTATION MENU
1: Return to previous menu
2: Change run number
3: Summarize run
4: Construct a run record
Selection: 3
Do you want to send the summary output to the printer y(n)?
Type the name of the model file (0=skip model file,return=run4.mod)
run4.mod
Type the name of the output file (0=exit,return=run4.lst)
run4.lst
9 The
run summary output is optimized for printing and will consequently not look very good on screen
model file name is constructed from the combination of run , the run number and .mod , for
example run1.mod .
11 The default output file name is constructed from the combination of run , the run number and .lst , for
example run1.lst .
10 The default
22
Summary of run 3
0
50
100
0
20
150
0
50
100
150
0
20
40
6
60
MINIMIZATION SUCCESSFUL
NO. OF FUNCTION EVALUATIONS USED:
223
NO. OF SIG. DIGITS IN FINAL EST.:
3.1
Objective: 2186.855
TH1
20.7
OM2:2
0.43
TH2
85.1
OM3:3
1.2
TH3
1.75
SI1:1
0.17
TH4
0.916
OM1:1
0.37
$PROB Simulated data distributed with Xpose 2
;;
;; As run2 but with the covariance step and NM V tables
;;
;;
$INPUT ID AMT TIME DV SS II SEX AGE RACE HT SMOK CON1 CON2 CON3 WT SECR DOSE
$DATA data1.dta IGNORE=#
$SUBROUTINE ADVAN2 TRANS2
$PK
SXCL = 1
IF(SEX.EQ.2) SXCL = THETA(4)
TVCL = THETA(1)*SXCL
TVV
= THETA(2)
TVKA = THETA(3)
CL
= TVCL *EXP(ETA(1))
V
= TVV
KA
= TVKA *EXP(ETA(3))
*EXP(ETA(2))
S2=V
$THETA (0,20) (0,87) (0,2) (0,0.5)
$OMEGA 0.12 0.14
$OMEGA 1.8
$ERROR
DEL = 0
IF(F.LE.0) DEL = 1
IPRED = F
IRES
= DV - F
W
= F + DEL
IWRES = IRES/W
Y
$SIGMA
= IPRED + W*EPS(1)
0.23
$EST NOABORT POSTHOC
; Table statement for NONMEM IV. The data variables has to be defined
; within Xpose.
;$TABLE ID TIME IPRED IWRES CL V KA AGE HT WT SECR SEX RACE SMOK
;
CON1 CON2 CON3
;
NOPRINT ONEHEADER FILE=mytab3
; Table statements for NONMEM V
$TABLE ID TIME IPRED IWRES
NOPRINT ONEHEADER FILE=sdtab3
$TABLE ID
CL V KA ETA1 ETA2 ETA3
NOPRINT
ONEHEADER FILE=patab3
$TABLE ID AGE HT WT SECR
NOPRINT
ONEHEADER FILE=cotab3
$TABLE ID SEX RACE SMOK CON1 CON2 CON3
NOPRINT
ONEHEADER FILE=catab3
Figure 6: An example of a run summary.
23
80
120
15
4
0.6
•
•
•
•
•
•• ••
•
• • •
•
•
•••
• ••• • • •
• •
•
•
•
•
•
••
••••
•
•
•
•
•
•
•
• ••
•
•
•••••••••••••••••••••••••• •• ••• ••
•
• •
• •••• • •• • •• ••• • • •
•••
••••••••••••••••••••••••••• ••••
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• ••• • •• •• • •
•••••••••••••••••••••••••••••••••••••••••••••••••• ••••• ••• • •• • • ••
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• • •• • •• •• •• • ••
2
•
0
40
60
17
6855
59
50
49
10
9
446 54 52 52
3738
57
35
62
60
51
65
64
45
48
19
27
18
54
59
50
49
10
9
4
8
36
33
29
47
28
17
230
38
37
57
35
62
60
51
65
64
48
19
27
18
55
4650 52
1
6949
74
54
59
10
8
38
37
57
35
62
60
51
65
64
48
19
27
18
36
42
33
30
29
28
17
2
32
26
24
23
40
41
63
44
25
22
32
26
23
46
124
658
54
40
41
59
50
63
49
44
25
955
4 52
822
38
57
35
60
51
65
64
48
45
19
27
18
36
33
30
29
2826 62
17
2
32
23
46
7
649
40
41
63
44
25
22
54
5052
9
4
824
57
35
62
60
65
6451
48
19
27
18
32
26
24
23
36
33
30
42
29
47
28
17
2
55
46
1
54
58
40
52
41
59
50
63
49
44
25
22
10
9
4
8
31
5
20
16
14
13
12
31
5
20
16
1515
14
13
12
38
57
35
62
32
60
51
65
64
48
26
19
27
24
18
23
6
54
52
59
50
49
4
8
40
58
41
63
44
25
22
31
5
20
16
14
13
12
32
26
24
23
57
35
62
60
65
48
19
27
18
36
33
30
29
28
17
2
55
46
1
54
52 15
59
50
49
10
9
31
5
58
40
41
44
25
22
20
16
15
14
13
12
32
26
24
23
57
37
62
60
51
64
48
45
19
27
18
4
8
31
5
56
58
40
41
63
44
25
22
39
53
43
21
3
39
34
32
61
4
26
20
24
23
16
15
14
13
12
3
57
65
64
48
54
36
52
33
50
30
49
29
47
28
17
9
2
31
5
53
58
40
41
63
44
25
39
34
43
20
21
16
15
14
13
12
3
57
62
35
60
51
65
48
19
27
18
4
8
31
5
56
53
25
39
34
32
61
43
26
24
21
23
3
20
16
15
14
13
12
54
52
59
50
49
64
48
45
31
56
58
40
41
63
44
25
39
34
61
43
21
3
16
15
14
13
37
53
60
51
65
64
48
19
27
18
5
32
63
26
24
23
34
61
43
20
21
12
3
31
39
40
41
44
16
15
14
13
5
56
53
39
43
21
3
31
20
12
56
61
16
15
14
13
39
34
53
43
21
3
•
WRES vs TIME
••
•
•
•
-2
1 6 55 746
36
33
30
29
472 28 42
17
•
6
0.4
100
6 55 1 7 46
30 42
28
1729 2
| IWRE | vs IPRE
4646
1
42
52
7 42
46
30
7
1
6 285230
42 742
28
46
552830
54
2
1
28
52
55
2
2
55 7
662
62446
28
54
47
52
42
1 30
2
50
60
4
47
62
55
29
62
33
50
7
46
33
28
50
60
35
29 4
30
9
6
17
52
21
2918
17
36 36
17
50
47
24
54
35
36
15
26
55
62
28
35 338
46
60
17
7
26
9
4 3649
52
29
51
47
37
30
18
2
42
8
27
50
24
37
17 26
59
59
35
1
33
15
6
17
36
28
57
19
19
60
26
65
8
57
59
46
27
49
48
49 37
54
55
65
32
4
62
45
38
29
52
19
36
48
30
50
32
9
2
23
23
24
18
17
51
38
33
27
59
57
35
38
60
31
165
15
57
32
19
19
65
26
23
4
8
46
49
38
10
6
52
48
36
37
29
45
17
55
27
59
50
30
65
33
31
10
23
54
62
2
24
23
5
7
60
19
28
9
57
18
58
51
4
15
35
22
32
26
10
8
48
5
56
59
36
29
27
49
47
19
23
65
50
33
38
41
60
44
22
64
22
10
24
6
57
44
31
9
63
45
41
64
41
15
18
54
62
44
1
5
46
32
17
59
63
52
51
48
35
26
19
23
27
10
60
20
64
65
44
33
8
28
30
22
2525
4
41
20
24
49
2
64
37
20
25
55
40
12
5
44
9
15
57
63
31
23
27
18
6
48
12
58
40
16
54
40
32
29
26
16
50
51
41
20
25
53
36
44
24
13
5
8
25
64
22
19
14
60
63
17
53
49
33
40
15
58
52
48
4
12
16
20
25
18
57
65
44
41
31
1
21
5
45
32
30
24
54
53
14
63
51
2
27
13
56
64
40
23
16
58
62
48
44
20
12
15
3
25
5
55
65
53
4
41
22
9
50
49
29
19
18
60
57
31
14
40
32
26
3
3
16
59
43
43
36
33
39
20
6
8
56
58
48
35
39
12
39
41
25
13
44
43
21
3
27
24
14
53
40
22
5
23
16
57
58
48
31
34
12
15
63
65
51
25
54
64
43
40
34
39
20
3
13
9
14
16
44
21
18
53
41
26
49
39
32
31
25
5
12
16
8
61
43
3
24
14
58
64
48
21
63
34
20
13
15
40
56
51
39
54
41
21
14
16
18
53
43
32
3
49
40
16
56
61
13
12
64
51
21
34
31
43
14
3
61
21
13
0.2
60
40
20
6
80
80
55
7 1 46
36
472 33 55286 427 301 46
17 29
42
36
33
28 30
17
2
36
33
0
IPRE DV
0.0
PRED DV
20
56
49
31
15 35
52 3 26
52
52 50
2
6 15 60
54
28
35
5
4 23
20
53
24
18 22
54
43
26
65
43 62
32
7
60
54
53
3
65
4 30
1
46
21
1 46
62
42
31
32
46
53
8
16
59
1
9
51
30
7
42
21
57
50
37
5
19
25
27
30
60
10
5
55
24
16
29
9 57
62
37
20
44
2
55
48
50
42
12
41
14
19
49
64
39
27
64
8
28
24
9
39
40
34
17
48
38 44
12
13
28
18
27
26
58
4
38
7 22
13
8
32
51
6
16
31
63
33
23
23
38
33
41
20
61
17
18
59
48
12
37
41
6 63
10
40
61
14
59
45 51
47
63
44
14
43
34
19
29
36
55
33
25
40
57
17
2
3 13 36
22
35 25 10
64
65
36
49 39
62
42
39
4
59
56
65
7
55
31
33
26
29
2
19
23
53
28
43
46
5
20
12
32
60
14
41
48
52
24
44
45
6
17
36
18
50
47
22
8
40
57
49
25
3
34
13
21
38
15
9
35
63
54
51
64
30
27
58
61
16
1
2
4
25
62
24
5
36
38
23
57
59
27
41
19
53
34
46
17
42
28
10
1
33
54
26
6
7
16
30
4
48
51
18
12
52
58
20
29
32
9
61
22
50
15
43
60
65
13
64
14
31
55
49
21
44
8
40
2
3
35
62
21
26
34
3
24
52
30
1
44
55
27
50
63
8
54
46
16
15
5
65
32
18
2
58
6
22
28
61
59
41
60
17
31
23
25
36
13
19
40
57
53
12
14
49
29
48
33
43
4
20
39
35
52
33
47
45
60
10
37
31
58
29
19
53
63
27
50
30
64
23
17
51
9
61
48
28
42
54
2
26
49
25
14
3
16
57
56
13
21
24
18
46
6
40
7
44
43
32
36
41
59
15
62
56
15
39
62
36
39
35
50
52
46
57
43
27
23
8
55
26
4
56
12
34
30
28
6
1
18
44
24
7
21
20
51
15
13
40
32
19
16
17
53
48
3
47
9
58
63
14
41
2
22
25
54
60
61
5
29
49
31
33
64
65
65
25
1
34
64
48
4
8
61
5
12
55
46
57
44
43
37
35 4 60
15
53
40
5 14
41
2
19
49
30
3
53
16
48
52
18
32
16
28
31
50
14
2
17
29
9 46
12
64 21
3
58
28
65
27
49
54
61
13
61
40
59
60
44
33
63 47
43
54
21
6 48
18
24
51
31
17
29
63
64
23
13
57
51
32
33
48
26
20
8 23
19
41 45
36
27
65
1
30
26
55 24
39
50
52
34
36
25
56
62
6
8
10
12
7.2 The run record
A run record is basically a table with summary information about many runs. It can be
thought of as an index to the run records. The information that Xpose includes in a run
record is the run number, user supplied comments, NONMEM termination messages
and objective function values.
The run numbers to be processed are supplied by the user. Only continuous ranges of
run numbers are permitted (see below).
The user supplied comments are taken from the model files. The comment character
in NM-TRAN model files is the semi-colon (;). User supplied comments for the run
record should be preceded with two semi-colons (;;—). In other words, all text after
two semi-colons present in the model file will be extracted and included in the run
record. Below is an example:
$PROBLEM Example of user supplied comments
;; This line will be extracted into the run record.
;; As will this.
; This line will not be included.
$INPUT ...
$DATA ...
....
It is usually a good idea to include the comments just below the $PROBLEM statement.
The termination messages and objective function values are taken from the NONMEM
output files.
The run record is not displayed on screen. Instead, it is either sent directly to the
printer or to a file suitable for insertion into a word processor. The latter option is to
make it possible for the user to influence the formatting of the run record, for example
with page numbers. The items in the run record file are tab-separated, i.e. when the
run record file has been imported into the word processor the user has to select the
imported text and use a convert text to table option (present in for example Microsoft
Word). Further more, separate lines with in one entry in the run record, e.g. the user
supplied comments in the example above or the NONMEM termination messages, are
separated by two hash characters (##). This means that the process of importing a run
record file into a word processor can be summarized in the following four steps:
1. Construct the run record file (see below)
2. Import the table into a word processor
3. Convert the imported file to a table
4. Replace all ## entries in the table to manual line feeds or equivalent.
5. Format the table
Below is an example session:
24
DOCUMENTATION MENU
1: Return to previous menu
2: Change run number
3: Summarize run
4: Construct a run record
Selection: 4
Please type the range of run numbers to create a run record for
Range starts at run number (1):1
Range ends at run number:3
Do you want to export the documentation to a file?
n(y)n
8 Checking a data set
In the Data checkout menu (option 3 on the Main menu) there is an option called
Check a data set12 With this option it is possible to plot the ID number vs the
values of each column in an NM-TRAN data file to find any gross errors.
The format of the data file has some restrictions. The first column of the data file will be
plotted vs the values in the other columns. Hence, to plot the ID vs the other columns
it is necessary to have the ID-number in the first column. When the data file is read by
S-PLUS it will regard dates and colon separated clock times as character data, which
cannot be plotted. To avoid the error these columns would give rise to if Xpose tries to
plot them, it is necessary to give them the name XXXX, i.e. when Xpose have read the
data file it avoids all columns with this name. A similar problem will arise if NULLs in
the NM-TRAN data file are coded by a dot (.). Since NULLs are legitimate in some
of the columns of greatest interest (e.g. AMT and DV) they are better replaced by zeros.
When the user selects the Check a data set option from the
DATA CHECKOUT MENU he or she is first prompted for the name of the data file.
This should, obviously, be the name of an existing NM-TRAN data file, followed by
return. Xpose then prompts for the line number at which the column headers are13 .
The default is 2, which is the same as a NONMEM table file would have. It is however
perfectly fine to specify another line number, making it possible to keep comments regarding, e.g. the contents of the data file, at the top of the file. Below is an example
session:
DATACHECKOUT MENU
1:
2:
3:
4:
5:
6:
7:
Return to the main menu
Numerically summarize the covariates
Histograms of the covariates
Histograms of the covariates given categorical covariates
Scatterplot matrix of covariates
Check a data set
DV vs the independent variable
12 A similar option was available in Xpose version 1.1. In the new version of Xpose these plots are much
faster, unfortunately with the loss of some, but not very informative, information.
13 This is new compared to Xpose 1.1. It is no longer necessary to follow the NONMEM table file convention with the column headers on the second line.
25
Selection: 6
Please type the name of the data file you want to check
data4
Please type the line number of the line in the data file
containing the column headers (2):4
The contents of the data file is plotted using dot plots, one for each column (Figure 7).
On the y-axis are the ID numbers and on the x-axis are the AGE values. Each entry for
each value of ID will get one dot on the corresponding line.
Data set checkout plot
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
.ID
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
10
9
8
7
6
5
4
3
2
1
30
40
50
60
70
AGE
Figure 7: A dot plot of ID vs AGE .
9 Comparing models
To discriminate between rival models is an important aspect of model building. In
NONMEM it is possible to use the difference in the objective function value to discriminate between hierarchical, or nested, models. In Xpose it is possible to visualize
the differences between two model fits. Option 7 in the MAIN MENU leads to the
MODEL COMPARISON MENU:
MODEL COMPARISON MENU
1: Return to previous menu
26
2: Basic model comparisons
3: Additional model comparisons
4: Delta PRED/IPRED/WRES/IWRES vs covariates
Selection:
The plots in this menu plots, for example, WRES from the current data base vs the WRES
from another, reference, data base. When one of the plot options is selected Xpose
prompts the user for a reference run number. Similarly to changing the run number
in the DATABASE MANAGEMENT MENU, Xpose checks if there is an existing xpose
data base matching the run number. If there is, the user gets the option to use the data
base or to recreate it from the table files. If no matching data base is found the user is
asked if he or she wants to create it from the table files. Note that the same data has to
be used in the two runs to make the comparison meaningful.
10 The GAM
Direct inclusion of covariate relationships in the model is one of the important benefits with population analysis over individual specific analysis. Identifying the relevant
covariates can, however, be a time consuming task. To speed this up, Mandema and
coworkers [10, 11] suggested the use of a stepwise generalized additive modeling procedure (GAM14 ).
The GAM can be run in Xpose by selecting the COVARIATE MODEL MENU in the
MAIN MENU (option 6) and then the GAM MENU (option 4):
GAM MENU
1: Return to previous menu
2: Run a GAM
3: Summarize GAM fit
4: Plot GAM results
5: Akaike plot
6: Studentized residuals for GAM fit
7: Individual influence on GAM fit
8: Individual influence on GAM terms
9: Settings for the GAM
Selection:
The GAM in Xpose 2.0 offer a great deal of flexibility15 and a number of GAM specific
plots that are not directly available in S-PLUS.
14 We use the term GAM to refer to the stepwise generalized additive modeling procedure in contrast to a
generalized additive model, which is just single model without any variable selection.
15 There are a lot of differences between the way the GAM is implemented in Xpose 1.1 and Xpose 2.0,
some are user visible while others, perhaps the major part of the differences, are not. It is still possible to
run the GAM in the same way, that is, using the same options, as in Xpose 1.1, and the GAM results, given
a certain data set, should be identical.
27
10.1 Overview of the GAM
This section contains a brief description of how the GAM works in S-PLUS. It is intended to give enough background for the following sections that describes how the
GAM can be used in Xpose. For a more formal description of this feature in S-PLUS,
please refer to the S-PLUS manuals [5] or to the book Statistical models in S by Chambers and Hastie [12]. For a technical description of generalized additive models in
general, the book by Hastie and Tibshirani [13] is a good start.
The GAM can be used to find a subset of the available explanatory variables (i.e. the
covariates) that are most useful in explaining the variability in the dependent variable
(e.g. CL). This is done by trying combination of models of the explanatory variables
in a stepwise fashion. The model discrimination is made by comparison of the Akaike
information criteria (AIC). The order in which the models are tried is defined by the
model scope. For each explanatory variable, a hierarchy of possible models is defined,
for example: not included, a linear model and a non-linear model. The initial model is
usually a combination of the first models in the scope but can be any combination of
the models defined in the scope. In each step, for each covariate, the models up and
down in the hierarchy are tried and the model that decreases the AIC statistic the most
are retained to the next step. The search is terminated when no model can decrease the
AIC any further.
10.2 Running the GAM
To run the GAM in Xpose we need to have a current data base in which we have covariates and at least one parameter defined. The default scope, for each covariate, is not
included, a linear regression model and a natural cubic spline with one internal breakpoint (e.g. ns(AGE,df=2)). For categorical covariates the third model is omitted.
When implementing a covariate model in NONMEM it is usually a good idea to center
the covariates to the middle of the data (this makes it easier to get reliable estimates
of the intercept in a linear model). In Xpose, continuous covariates are by default centered around the median covariate value. Selecting option 2 in the GAM Menu starts
the GAM analysis.
Xpose saves the GAM objects created by the GAM analysis. This makes it possible
to go back and look at the results of a GAM run at a later time. These objects, Xpose
gam objects are given names which are a combination of gam.xpose., the parameter
name
and
the
run
number,
for
example
gam.xpose.CL.1. If the GAM is requested for a run number and parameter with
an already existing Xpose gam object, the user has to confirm that he or she wants to
delete the old object.
10.3 Displaying the results of a GAM run
The results of a GAM run can be displayed either numerically or graphically.
28
Example GAM results
20
151
13
61
10
40
Residuals
1
13322
49
25
118
36
158
10810
161 9
149
122
141
55
6
164
8
48 63
154
1
14
29
17
59
155
33
51
57
32
163
41
110 132
34
7
129
113 23 5816
54
143
46
45159
105
124 12 50 38
142
101
30
146
21 125
31
56
126
37
28
18
42
5
150
44
65 26
121
43
145
39
24
162
117 53
2
4
27
19
35 47
153
60
62
52
15 20
115
140
0
-10
3
-30
5736
39 56 101
125 51
45
108
42 18
142
162
23
54
9 25
7110
28146
115
155
129
154
48
132
37
291 5510
122
15121 21
59
62 47
150
159 50 32
617
22
117
8 149
35
49
30
118
46
151
HCTZ
64
12
158
63133
33
113
38
44
141
140
105
119 24
40 64
163
60 145 2019
5
53 126
143
16
34 58
2
4
16414 161
31
124
43 153
26 41
27
65
0
61
13
52
3
119
-20
-10
0
10
-10
0
AGE
10
20
Residuals
151
20
24
2
52
53 50 59 105
150
153
426 32
54
159
146
56 124
132
8 55
9
154
31
10
126
149
6
110
235
49
1017 46155 1
108
61
Residuals
SEX
9
49
149
6
0
3
1
64
13
10
36 118
119 43
45
60
27
33
58
6512
63133 64
141
2 44
62 145
140
14
121 19125 34 29 163
161158
154220
47
30 143
115
113
16 57
37 38
25
17
28
162 18
21 129
3539
48
117
41 164 122
40
51
22
142
1
50
7
151
150
13
61
59 38
126
37 46
26
113
53
146
101159
31
153
56
-10
118
40
133
158 63
25
161
163
140
22
4814
164
141
36
17
51
122108
57
29
33
10
58
105 55
8
18
3241 129
16 132
154
12
65
155
21
34
5 23
124
110125
143
19 2044 47
117
121
454
45
2830 162
35
142
27 2
24 39
3
43
42
62
15 119
115
145
60
52
-10
0
10
20
-30
-20
Residuals
-10
0
10
HT
Figure 8: Plot of GAM results. Each panel shows the relationship between a covariate
and CL . Data points are labeled by the ID number
10.3.1 Numerical summary of a GAM fit
Selecting option 3 on the GAM MENU produces a numerical summary of an Xpose gam
object in the current S-PLUS working directory. This summary consists of the output
from the S-PLUS function gam.summary plus information about the Xpose GAM
settings used (see Section 10.5) to produce the Xpose gam object.
10.3.2 Displaying the GAM results graphically
It is also possible to view the GAM results graphically. Option 4 on the GAM MENU,
will produce plots of the final GAM model (Figure 8). Individual data points are labeled
with the id variable and a smooth is drawn in the plots with continuous covariates. The
fitted values of relationships with categorical covariates are indicated by a solid black
dot and a vertical blue line.
10.4 Obtaining diagnostics for a GAM run
Using stepwise procedures, such as the GAM, is not without criticism (e.g. G.E.P Box,
Technometrics (8) 1966 625-629) and even if the GAM has proven to be useful for the
29
Akaike plot
HT
SEX + HT + WT
HT + SMOK
HT + HCTZ
HT + AGE
ns(HT, df = 2)
SEX + HT
SEX + HT + HCTZ
SEX + HT + SMOK
SEX + HT + ns(AGE, df = 2)
SEX + HT + AGE + WT
SEX + ns(HT, df = 2) + AGE + WT
ns(HT, df = 2) + AGE
Model
SEX + ns(HT, df = 2)
SEX + HT + AGE
SEX + ns(HT, df = 2) + ns(AGE, df = 2)
SEX + HT + AGE + SMOK
SEX + ns(HT, df = 2) + HCTZ
SEX + HT + AGE + HCTZ
SEX + ns(HT, df = 2) + AGE
SEX + ns(HT, df = 2) + AGE + SMOK
SEX + ns(HT, df = 2) + AGE + HCTZ + WT
ns(HT, df = 2) + AGE + HCTZ
SEX + ns(HT, df = 2) + AGE + SMOK + HCTZ
SEX + ns(HT, df = 2) + AGE + HCTZ
SEX + HT + ns(AGE, df = 2) + HCTZ
ns(HT, df = 2) + ns(AGE, df = 2) + HCTZ
SEX + ns(HT, df = 2) + ns(AGE, df = 2) + HCTZ + WT
SEX + ns(HT, df = 2) + ns(AGE, df = 2) + SMOK + HCTZ
SEX + ns(HT, df = 2) + ns(AGE, df = 2) + HCTZ
4700
4800
4900
5000
Akaike value
Figure 9: Akaike plot of a GAM run. On the y-axis are the most important models
tested by the GAM and on the x-axis are the corresponding AIC values.
identification of important covariates, one should be careful in the interpretation of the
results. One of the things that can influence the GAM results are outlying individual
data points. These can both hide and create covariate relationships [14]. Xpose has a
number of options to check the final model for unduly influential individuals. These
options uses quite involved calculations of approximate case-deletion diagnostics for
the final GAM model [15]. A detailed description of the way these are implemented in
Xpose is given in Jonsson and Karlsson [14] and in the Appendix (to be written).
For options 6, 7 and 8 it is necessary to use parametric smoothers, i.e. ns, bs and the
hockey stick models16 (see Section 10.6).
10.4.1 The Akaike plot
Option 5 on the GAM menu will produce a dot plot of the 30 most important models
tried in the stepwise search for the final model (Figure 9). On the y-axis are the models
(using S-PLUS syntax) and on the x-axis are the corresponding AIC value. With this
plot it is possible to evaluate how much better the final model is compared to the other
models. It can be viewed as a measure of the uncertainty in the final GAM model.
16 Using the parametric models will make the generalized additive models to generalized linear models,
and the calculations involved in option 6, 7 and 8, only holds for generalized linear models.
30
ID
Studentized residuals for a GAM run
151
13
61
64
40
25
22
158
133
9
118
63
161
49
141
122
36
48
140
108
10
17
163
149
14
57
6
105
55
164
8
1
154
29
16
33
38
58
59
32
155
41
132
51
5
126
34
23
50
37
110
46
26
113
129
12
125
54
143
4
53
7
146
159
124
45
65
101
150
21
31
19
142
117
153
28
18
30
56
20
121
44
42
162
24
27
43
145
2
15
115
39
47
35
119
60
52
62
3
-2
-1
0
1
2
Studentized residual
Figure 10: Studentized residuals for a GAM run. On the y-axis are the ID number and
on the x-axis are the residuals. The ID numbers are ordered according to the size of the
residuals.
10.4.2 Studentized residuals for a GAM fit
Option 6 on the GAM Menu will produce a dot plot of the studentized residuals for
each individual. A studentized, or jacknifed, residuals, is the residual between an individual data point (parameter) and the prediction from a fit with that particular data
point omitted. These residuals are normalized so that the variance should be 1 and the
mean zero, making them suitable for the detection of influential points.
An example of this plot is given in Figure 10. On the x-axis are the values of the
studentized residuals and on the y-axis are the ID numbers as given by the id-variable.
The ID numbers are ordered according to the size of the residual.
10.4.3 Individual influence on the GAM fit
Option 7 will produce a plot (Figure 11) of the Cooks distance vs leverage [14, 15].
Cooks distance is a measure of the influence a certain data point has, i.e. how much the
fit will change if that data point is omitted from the analysis. A high value indicates
a high influence. The leverage is a measure of how a data point influences the certainty with which the fit is obtained. A high value indicates a higher leverage. A high
leverage data point need not be influential and vice versa. A point with a high value of
31
Individual influence on a GAM fit
13
0.14
40
3
0.12
Cooks distance
0.10
151
0.08
0.06
0.04
64
61
0.02
0.0
52
140
118
47
60
25
145 24
119
35
133115
22
15
6342
2 43
62 9
141
44
158 27
56
49
18
105
39
48108
161
20
122
163
10
1757
162
36
153
121149
142
117
55 164
14
619
30
28
101
4124
8 53
21159
45
65
1 132
54
143
154
38 5
146
125
33
16
26
29
3251
5923
12
58
129
110
41 34
155
46
126
7
31
150
113
0.1
37
50
0.2
0.3
0.4
0.5
Leverage (h/(1-h))
Figure 11: Cooks distance vs leverage for a GAM fit. Data points are labeled by the ID
number
Cooks distance and leverage is very important to the fit and often affects the covariate
selection [14]. This property also seem to “travel” into the NONMEM model, i.e. if an
individual point has a high leverage and influence in the GAM he or she will also be
important for the covariate model in NONMEM [14].
10.4.4 Individual influence on the GAM terms
Option 8 will produce plots of the Cooks distance for each covariate term in the final
GAM model. This plot can be used to identify which of the covariate terms that are
affected by the individuals detected with option 7.
10.5 Changing the default behavior of the GAM
Option 9 leads to the GAM SETTINGS MENU:
GAM SETTINGS MENU
1: Return to previous menu
2: List current settings
3: Estimate dispersion factor (on/off)
32
4: Stepwise search for covariates (on/off)
5: Use all lines (on/off)
6: Use weights (on/off)
7: Exclude individuals
8: Specify starting model
9: Normalize to median (on/off)
10: Set model scope
The options in this menu can be used to change the way the GAM analysis behaves.
10.5.1 List current GAM settings
Option 2 will list the current GAM settings. These settings will be effectual until
changed in the GAM SETTINGS MENU or until S-PLUS is quit. The settings with
which a certain Xpose GAM object was obtained can be listed using the
SUMMARIZE A GAM RUN option in the GAM MENU (see Section 10.3).
10.5.2 Estimation of the dispersion factor
This option is a toggle, e.g. if the setting is not to estimate the dispersion factor (the
default) and the option is selected from the menu, the GAM will estimate it, and vice
versa.
The dispersion factor is used in the definition of the AIC and is equal to the “cost”,
divided by 2, per degree of freedom incurred by adding or dropping a term from the
GAM model. If this option is not set, the dispersion factor is taken to be the scaled
Pearson chi-squared statistic for the starting model17 (see Section 10.5.7). If the option
is set, the dispersion factor is estimated according to the following scheme: For each
covariate, the models without covariate, a linear function of the covariate and nonlinear function of the covariate (a natural cubic spline with one internal breakpoint) are
compared. The dispersion factor is taken from the gam fit of the model resulting from
the combination of the significant models according to this univariate analysis.
10.5.3 Stepwise search for covariates
Option 4 will turn the stepwise search on or of (a toggle). The stepwise search is on
by default. When it is off, the GAM will fit the model specified by the starting model.
This can be useful when a covariate model have been implemented in NONMEM and
the user wants to obtain approximate case deletion statistics for that particular covariate
model. Option 8 (Specify starting model) can be used to specify the model to be fit.
10.5.4 Use all lines
Option 5 will toggle the use of only one line per individual on or off. If the setting is
off, all lines in the Xpose data base will be used.
17 In
Xpose 1.1 the dispersion parameter was not estimated.
33
10.5.5 Use weights
Option 6 will turn the use of prior weights on or off. If the setting is on, Xpose will use
the Xpose data variable weight (see Section 2.5) as prior weights in the GAM analysis.
10.5.6 Exclude individuals from the GAM analysis
If a certain individual is identified as having a large influence and leverage on the final
GAM model, it is interesting to know whether the exclusion of the individual will
change the covariate selection by the GAM. Option 7 can be used to exclude one or
more individuals from the GAM analysis. Selecting the option will prompt the user for
the ID numbers of the individuals to be excluded. The ID number(s) to specify is the
number appearing in the plots of the GAM results.
10.5.7 Specifying a starting model for the GAM
The starting model for the GAM is the model from which the stepwise search is started.
It is also used to define the dispersion factor used in the search. Selecting option 8
will prompt the user for the individual model terms that makes up the starting model.
These terms should be the terms used by S-PLUS to specify the starting model. For
example, if we want to use a linear relationship with AGE and a non-linear relationship with HT as the starting model, the corresponding command in S-PLUS would be
gam(CL˜AGE+ns(HT,df=2)) (assuming we wanted the natural cubic spline with
one internal break point as the non-linear model). The terms that should be given to
Xpose when specifying this model are consequently AGE and ns(HT,df=2).
This option can also be used to specify the model to fit if the stepwise search is turned
off (see Section 10.5.3).
10.5.8 Normalize the covariates to the median
Option 9 will turn the normalization of continuous covariates to the median on or off.
Median normalization is the default, i.e. the parameter estimates of the final GAM
model (see Section 10.3) can be used as initial estimates in the NONMEM model.
Note that the median normalization is done after individuals with missing covariate
values are omitted (see Section 6.5.1).
10.6 Setting the model scope for the GAM
For a continuous covariate, the default model scope in the GAM is: not included, a
linear model and a natural cubic spline with one internal breakpoint18. For a categorical
covariate, the third, non-linear, model is omitted.
Option 11 leads to yet another menu in which the user can alter the default model
scope.
18 In
Xpose 1.1 this is the only available model scope
34
Model 1
1
Model 2
AGE
Model 3
Model 4
ns(AGE,df=2)
Not used in
the default scope
Figure 12: Picture of the default scope for a continuous covariate
GAM SCOPE MENU
1: Return to previous menu
2: Set maximum number of models
3: Default smoothers and their arguments
4: Limit model scope for specific covariates
5: Change models for specific covariates
6: Show current GAM scope
7: Use default scope
Selection:
10.6.1 The GAM scope and its default settings in Xpose
The scope for a given covariate is a hierarchy of models that the GAM will test. It
is hierarchic in the sense that the GAM will never look beyond one step up or down
from the current model, i.e. for the default scope, which is depicted in Figure 12,
the GAM will never try the non-linear model (Model 3) unless it first finds the linear
model (Model 2). The scope shown in Figure 12 is the default scope for a continuous
covariate. For a categorical covariate it is not possible to fit a non-linear model. A 1,
as in Model 1 in Figure 12, is used to denote that the covariate is not included in the
GAM model, the name of the covariate, AGE in Figure 12, denote a linear relationship
and ns(AGE,df=2) denotes a natural cubic spline with one internal breakpoint. The
latter is an example of the non-linear models that can be defined in the GAM scope.
In Xpose it is possible to alter the scope in one or more ways: increasing or decreasing
the number of levels in the model hierarchy, change the default smoother (i.e. ns),
exclude one or more of the covariates from one or more levels in the model hierarchy
and change the model used for a specific covariate in a specific level of the hierarchy.
Note that changing the model scope can alter the final GAM model substantially and it
is consequently possible to “find” the covariate model one wishes to find. An example
of the rational for giving the user the increased flexibility is as follows: Assume that we
have a non-linear relationship between a parameter and a covariate and that the (substantial) curvature is off center (see Section 10.6.2), i.e. the parametric smoothers will
have problems detecting it. Ignoring this fact, i.e. being content with a linear relationship, is likely lead to structures in the unexplained variability that might induce other,
false, relationships, or, and worse, might hide true relationships. In this case it is desirable to be able to specify another, more flexible, non-linear function that captures the
non-linearity without being bound to the breakpoints of the parametric smoothers. A
similar, but opposite, situation might occur if we have outlying individuals that induces
a non-linear relationship even if the true relationship is clearly linear.
35
10.6.2 Smoothers in the GAM scope
The idea with generalized additive models compared to generalized linear models is to
be able to use non-parametric smoothers, e.g. spline functions that use the observed
data for its definition. The default smoother, or non-linear relationship, in the GAM
as implemented in Xpose, is a natural cubic spline with one internal breakpoint, i.e.
a parametric smoother. Consequently, the way that the GAM in Xpose is defined by
default makes it a generalized linear model (parametric smoothers is a requisite of the
approximate case-deletion diagnostics available, see Section 10.4).
There are basically five different smoothers that can be specified. Two are non-parametric,
i.e. lo and s, and three are parametric (at least in the sense that it is possible to produce the GAM diagnostics if they are used), i.e. ns, bs and the hockey stick models
(see Section 10.6.6). The last smoother can only be specified using one of the options in the GAM SCOPE MENU and will be described together with that option (see
Section 10.6.6). The other smoothers are regular S-PLUS smoothers and the S-PLUS
manuals gives further details.
The parametric smoothers have to have the breakpoints specified, i.e. where the centers
of the curvature are. The default value of these breakpoints are the median (for one
breakpoint) and the quartiles (for more than one breakpoint). If the curvature is much
off center it might be a good idea to try one of the non-parametric smoothers or to
specify other breakpoints
10.6.3 Setting the maximum number of models in the scope
The default number of models for a continuous covariate is 3. It is possible to decrease
this to 2 or to increase it to 4. When the maximum number of models is changed,
the default scope is also changed. Reducing the number of models to 2 omits the
non-linear model (Figure 12), increasing the number of models to 4 adds a second nonlinear model (a natural cubic spline with two internal breakpoints, i.e. a more flexible
model than one breakpoint spline). Changing the maximum number of models does
not affect the scope of the categorical covariates.
10.6.4 Changing the default smoothers and their arguments
It is possible to change the default smoothers for each hierarchic level of the scope for
the continuous covariates. Xpose will ask the user for a smoother to use for each level
in scope. The following Xpose output changes the default smoother for the third model
from ns to s:
GAM SCOPE MENU
1:
2:
3:
4:
5:
6:
7:
Return to previous menu
Set maximum number of models
Default smoothers and their arguments
Limit model scope for specific covariates
Change models for specific covariates
Show current GAM scope
Use default scope
36
Selection: 3
Type the name of the smoother you want to use for the *first*
covariate model in the GAM model scope (q=exit,d=default,
0=no covariate effect,1=linear model):
Type the name of the smoother you want to use for the *second*
covariate model in the GAM model scope (q=exit,d=default,
0=no covariate effect,1=linear model):
Type the name of the smoother you want to use for the *third*
covariate model in the GAM model scope (q=exit,d=default,
0=no covariate effect,1=linear model):s
Type any *argument* to the smoother for the third covariate model
in the GAM model scope (multiple argument should be comma
separated, q to exit, d =default):
(Note that the word smoother refers to any model of: not included, linear as well as the
actual smoothers.)
For each model the user can specify the default (d), no covariate effect (0), a linear
model (1) and the name of the smoother (e.g. s). If a smoother is specified the user is
also prompted for the arguments to the smoother. For the s in the above example the
default argument was accepted (df=4) but could have been set to, for example, df=3.
10.6.5 Limit the scope for specific covariates
With option 4 it is possible to limit the scope, or in other words, exclude a continuous
covariate from a specific scope level. For example, if we have two continuous covariates AGE and WT and we want to skip the linear model for AGE in the default scope,
the Xpose session might look something like this:
GAM SCOPE MENU
1: Return to previous menu
2: Set maximum number of models
3: Global smoothers and their arguments
4: Limit model scope for specific covariates
5: Change models for specific covariates
6: Show current GAM scope
7: Use default scope
Selection: 4
The following continuous covariates are defined in the
current data base
AGE WT
Type the names of the covariates you want to exclude
from the first model in the model scope and finish with an empty
line:
1:
37
Type the names of the covariates you want to exclude
from the second model in the model scope and finish with an empty
line:
1: AGE
2:
Type the names of the covariates you want to exclude
from the third model in the model scope and finish with an empty
line:
1:
For each level in the model scope the user is asked for the name(s) of the covariate(s)
that is to be omitted. Answering with a return (and no covariate name) will leave the
scope unaffected for all covariates.
10.6.6 Change models for specific covariates
With option 5 it is possible to specify the scope models for individual continuous covariates. Below is an example session for the covariate AGE and WT:
GAM SCOPE MENU
1: Return to previous menu
2: Set maximum number of models
3: Global smoothers and their arguments
4: Limit model scope for specific covariates
5: Change models for specific covariates
6: Show current GAM scope
7: Use default scope
Selection: 5
The following continuous covariates are defined in the
current data base
AGE WT
Type the name of the covariate you want to specify a special
model scope for (q to quit): AGE
Type the name of the *smoother* you want to use in the first model
of the model scope (q to exit, d=default, 0= exclude
and 1= linear model, R=hockey stick right, L= hockey stick left):
Type the name of the *smoother* you want to use for the second
model in the model scope (q to exit,d=default,
0=exclude,1=linear model, R=hockey stick right, L= hockey stick left):
Type the name of the *smoother* you want to use for the third
model in the model scope (q to exit,d=default,
0=exclude,1=linear model, R=hockey stick right, L= hockey stick left):R
(New covariate)
Type the name of the covariate you want to specify a special
model scope for (q to quit): q
38
The first the user has to do is to type the name of the first covariate to specify models
for, in the above case AGE. Xpose then steps through the levels of the model scope and
prompts the user for a model. The options are the default (d), exclude (0), a linear
model (1), hockey stick right or left (R and L respectively) or the name of a smoother.
In the latter case the user will be prompted for any arguments similar to option 3 on the
GAM SCOPE MENU (see Section 10.6.4). The hockey stick right and left models fits a
slope to the left or right hand side of the median covariate value, leaving the fit on the
opposite side horizontal at the “intercept” in the middle of the data. These models are
fairly inexpensive non-linear alternatives to the normal smoothers and can sometimes
capture non-linearities that would otherwise not be detected.
When Xpose has stepped through the scope levels for the first covariate the user is
prompted for a new covariate name. The answer should be either the name of the next
covariate or q if no more covariate specific adjustments of the scope is needed.
10.6.7 Viewing the current GAM scope
Option 6 prints the current GAM scope with, if any, adjustments made by the user.
10.6.8 Re-setting the scope
Option 7 resets the scope to the default.
11 The bootstrap of the GAM
11.1 Overview the Bootstrap of the GAM
The bootstrap is a proven statistical methodology, which relies more on brute computational power rather than clever analytical solutions. A good starting point to the
bootstrap literature is Introduction to the Bootstrap by Efron and Tibshirani [16].
The bootstrap of the GAM can be used to assess the importance of the covariates and
to obtain similar diagnostics information to that available to the GAM, the difference
being that the information is obtained for all covariates, not only for the “significant”
ones. In addition, the bootstrap of the GAM can also give information about how
covariates interact with respect to inclusion/exclusion from the covariate model.
In the bootstrap of the GAM, the GAM is run a large number of times on bootstrap
realizations of the original data set. (The term data set will in this section be used to
refer to the data set of individual parameter values and covariates, usually one entry, or
line, per individual.) The bootstrapped data sets are constructed by randomly sample
with replacement from the original data set and the GAM is then run on each of them.
The basic results from a bootstrap of the GAM run is obtained simply by counting the
number of times each of the covariates are selected, regardless of functional form of
the relationship, as well as how many times the continuous covariates are selected as
a non-linear function19. This “number of times” are presented as relative frequencies,
19 Xpose
1.1 did not differentiate between linear and non-linear models.
39
i.e. the number of times a certain covariate or covariate model was selected divided by
the number of bootstrapped data sets.
The bootstrap of the GAM, as it is implemented in Xpose, has been described by Jonsson and Karlsson [14] and similar uses of the bootstrap have been described by Mick
and Ratain [17], Sauberei and Schumacher [18] and Ette [19].
To use the bootstrap of the GAM select option 6 in the MAIN MENU and then option 5
from
the
COVARIATE MODEL MENU.
This
will
lead
to
the
BOOTSTRAP OF THE GAM MENU:
BOOTSTRAP OF THE GAM MENU
1: Return to the previous menu
2: Run the bootstrap of the GAM
3: Summarize a bootstrap of the GAM run
4: Plot menu
5: Settings for the bootstrap of the GAM
Selection:
11.2 Running the bootstrap of the GAM
It is necessary to have covariates and at least one parameter defined in the current data
base to run the bootstrap of the GAM.
Option two will run the bootstrap of the GAM. Xpose saves the bootstrap of the GAM
run in Xpose bootgam objects. They are named by a combination of bootgam.xpose.,
the parameter name and the run number, e.g. bootgam.xpose.CL.1. If there already is an Xpose bootgam object in the current directory that matches the parameter
name and run number, the user has to confirm that he or she wants to overwrite it.
One of the important questions in the bootstrap of the GAM is the number of bootstrap
iterations to make, i.e. the number of bootstrapped data sets to use. In Xpose 2.0
there are basically three different strategies. The first is to use a fixed, user specified,
number of iterations20 . The other two strategies uses algorithms to determine when the
inclusion frequencies of the covariates are stable, i.e. Xpose determines the number of
iterations needed. Section 11.5 describes these algorithms in more detail and also gives
information about how to adjust their behavior.
11.3 Summarizing a bootstrap of the GAM run
Bootstrap of the GAM runs can be viewed both numerically and graphically. Option 3
on the BOOTSTRAP OF THE GAM MENU will produce a numerical summary of the
run:
Convergence algorithm: Fluctuation ratio
Convergence criteria: 1.0368 (target= 1.04 )
Number of iterations: 150
20 In
Xpose 1.1 the user always had to specify the number of iterations to use.
40
Initial dispersion not estimated.
No start model specified.
Median normalization on.
Seed number: 286
Model size:
Min. 1st Qu. Median Mean 3rd Qu. Max.
1
3
3 3.18
4
5
HT
AGE
HCTZ
SEX
SMOK
WT
Prob Nonlin FrNonlin
0.747 0.44
0.589
0.613 0.247
0.402
0.6
0
0
0.493 0
0
0.42
0
0
0.307 0.12
0.391
The first half or so of the output contains information about the settings used in the run
and the second half contains results. First is descriptive statistics on the size of all the
final GAM models. Below that comes a table with three columns containing the relative
inclusion frequencies of the covariates and the non-linear covariate models, followed
by the latter divided by the former, i.e. a measure of how important the non-linear
relationship was compared to the total number of times the covariate was found.
11.4 Plotting the results
The results from a bootstrap of the GAM run can also be viewed graphically. Selecting
option 4 on the BOOTSTRAP OF THE GAM MENU leads to the
PLOT MENU FOR THE BOOTSTRAP OF THE GAM:
PLOT MENU FOR THE BOOTSTRAP OF THE GAM
1: Return to previous menu
2: Inclusion frequencies
3: Most common covariate combinations
4: Distribution of model size
5: Inclusion stability - covariates
6: Inclusion stability - non-linear
7: Inclusion index of covariates
8: Inclusion index of non-linear models
9: Inclusion index of covariates/individuals
10: Inclusion index of non-linear models/individuals
Selection:
11.4.1 Plotting the inclusion frequencies
Option 2 will produce a plot of the relative inclusion frequencies of the covariates and
the non-linear covariate relationships (Figure 13).
The relative inclusion frequencies plotted in the top panel in Figure 13 were obtained
by counting the number of times each covariate was selected by the GAM regardless
41
Relative inclusion frequencies of covariates
HT
AGE
HCTZ
SEX
SMOK
WT
0.0
0.2
0.4
0.6
0.8
1.0
Inclusion frequency
Relative inclusion frequencies of non-linear models
HT
AGE
WT
0.0
0.2
0.4
0.6
0.8
1.0
Inclusion frequency
Figure 13: Barplot of the relative inclusion frequencies of the covariates (top panel)
and the non-linear covariate models (lower panel).
of the functional form of the covariate relationship. The relative inclusion frequencies
plotted in the lower panel were obtained by counting the number of times each covariate
was included in the GAM model as a non-linear relationship.
11.4.2 Plotting the most common covariate combinations
Option 3 will plot the most common one, two, three and four covariate combinations
in the GAM model (Figure 14).
The frequencies for these combinations are obtained by counting how many times a
certain combination of covariates are found in the same GAM model. The top left
panel in Figure 14 is the same as the top panel in Figure 13 and the other panels shows
the four most common combinations of two, three and four covariates respectively.
11.4.3 The distribution of model sizes
Another piece of information we can get from a bootstrap of the GAM run are the sizes,
i.e. the number of covariates, of the final GAM models for the bootstrapped data sets.
Option 4 will display this distribution (Figure 15).
The idea here is to learn something about the typical number of covariates necessary to
42
Most common covariate combinations
Covariate inclusion frequency
Most common two covariate
combinations
HT
HT+AGE
AGE
HT+HCTZ
HCTZ
SEX
AGE+HCTZ
SMOK
HT+SMOK
WT
0.0
0.2
0.4
0.6
0.8
1.0
0.0
0.2
Frequency
Most common three covariate
combinations
HT+AGE+HCTZ
SEX+AGE+HCTZ+WT
SEX+AGE+HCTZ
HT+AGE+HCTZ+WT
AGE+HCTZ+WT
SEX+HT+AGE+HCTZ
HT+AGE+SMOK
HT+AGE+SMOK+WT
0.0
0.2
0.4
0.6
0.4
0.6
0.8
1.0
Frequency
0.8
1.0
Most common four
covariate combinations
0.0
Frequency
0.4
0.8
Frequency
Figure 14: The most common one, two, three and four covariate combinations.
explain the variability in the parameter.
11.4.4 The stability of the inclusion frequencies
One of the important questions when running the bootstrap of the GAM is the number
of bootstrapped data set to use (how to set the number of data sets to use is described
in Section 11.5). To assess whether the number of data sets used in a particular run is
enough to make the inclusion probabilities stable, option 5 and 6 can be used. Option
5 will plot the relative inclusion frequencies vs the bootstrap iterations (Figure 16)
and option 6 will make the the same plot for the inclusion frequency of the non-linear
covariate models. In these plots the panels are ordered from lower left to the top right
according to the total inclusion frequency of each covariate.
11.4.5 Inclusion index of covariates
One interesting possibility with the bootstrap of the GAM is to investigate the inclusion/exclusion interactions between the covariates, i.e. will the inclusion of one covariate in the GAM model lead to the inclusion or exclusion of another covariate. Option
7 produces a plot of the inclusion index of covariates (Figure 17).
The inclusion index is given Eq. 1.
43
Final model size distribution
60
50
40
30
20
Percent of Total
10
0
1
2
3
4
5
Number of covariates in model
Figure 15: The distribution of the sizes of the final GAM models.
"!$#&%('*),+ !.-0/"!0213-4!.5067!. 8:9<;=!.#?>@!08:AB!0C13-4!.5067!. 8:9
!.#D>@!08:AB!0E13-4!05067!$ 8,9
(1)
where the expected frequency is the product of the relative inclusion frequencies of
the two covariates in question and the observed frequency is the observed relative frequency of these two covariates appearing in the final GAM models together. The inclusion index will have a value greater than one if the combination of the two covariate
are more common than expected and vice versa.
In Figure 17 each panel refers to one covariate. The inclusion indices of that covariate
together with the other covariates are indicated by +-es. The panels are ordered from
bottom left to top right according to the total inclusion frequency for each covariate as
are the covariates on the y-axes.
Option 8 will produce a similar plot for the inclusion index of non-linear covariate
models and the covariates (Figure 18).
11.4.6 Inclusion index of covariates and individuals
Similar to the inclusion index of covariates we can calculate the inclusion index for
covariates/non-linear covariate models and individuals. The calculation of the index is
done in the same way as for the covariate index (Eq. 1). Option 9 will produce plots of
44
Stability of the relative inclusion frequencies
0
20
40
60
80
AGE
HT
SEX
HCTZ
100
120
140
1.0
0.8
0.6
0.4
0.2
0.0
Frequency of inclusion
1.0
0.8
0.6
0.4
0.2
0.0
WT
SMOK
1.0
0.8
0.6
0.4
0.2
0.0
0
20
40
60
80
100
120
140
Number of bootstrap iterations
Figure 16: Stability of relative inclusion frequencies. Each panel shows the inclusion
frequency vs the number of iterations for the covariate indicated in the strip above it.
the inclusion index of individuals and covariates.
In analogy with the other inclusion indices we can also plot the inclusion index of
individuals and non-linear covariate models.
11.5 Settings for the bootstrap of the GAM
There are a number of ways that the user can influence the way the bootstrap of the
GAM behaves. This is done in the BOOTSTRAP OF THE GAM SETTINGS MENU,
which can be reached by selecting option 5 on the BOOTSTRAP OF THE GAM MENU:
BOOTSTRAP OF THE GAM SETTINGS MENU
1:
2:
3:
4:
5:
6:
7:
8:
9:
Return to previous menu
List current settings
Estimate dispersion factor (on/off)
Specify starting model
Exclude individuals
Normalize to median (on/off)
Set maximum number of bootstrap iterations
Change convergence algorithm
Specify iteration to start check convergence at
45
Inclusion index of covariates
-0.2
0.0
AGE
+
+
+
HCTZ
+
SEX
+
+
+
SMOK
+
+
WT
SEX
HCTZ
+
+
+
+
AGE
+
HCTZ
+
SEX
+
+
SMOK
+
+
WT
WT
HT
0.4
+
HT
AGE
HT
0.2
HT
SMOK
+
+
+
AGE
+
+
HCTZ
+
+
SEX
+
+
SMOK
+
WT
-0.2
0.0
0.2
0.4
Index
Figure 17: The inclusion index (see text) of covariates. Each panel refer to one covariate as indicated in the strip above it. The dashed horizontal line indicates the expected
frequency
10: Specify at what interval to check the convergence
11: Set seed number
12: Use weights
Selection:
Option 2 is used to list the current settings. Options 3-7 and 13 are equivalent to the
same settings in the GAM SETTINGS MENU (see Section 10.5) while options 8-12 are
specific to the bootstrap of the GAM. The settings are in effect until S-PLUS is quit.
11.5.1 Specifying the maximum number of iterations
Option 8 sets the maximum number of bootstrap iteration to the value specified by the
user. The default is 150. Note that this is not the same as specifying a fixed number of
iterations, see Section 11.5.3.
11.5.2 Selecting the convergence algorithm
Option 9 is used to change convergence algorithm and convergence criteria. These
algorithms are used by Xpose to determine when the number of iterations are enough
46
Inclusion index of non-linear models
ID
J
I
H
G
F
o
o
-0.6
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
-0.2
Index
o
o
o
o
0.2 0.4 0.6
ID
118
34
60
24
57
155
158
6
16
44
161
126
35
8
56
52
149
121
47
163
143
31
23
32
122
101
38
49
59
21
25
146
50
58
132
36
45
153
115
3
159
55
15
13
51
141
64
4
65
117
162
142
19
125
10
1
62
124
40
37
151
30
12
20
129
7
42
26
28
119
27
108
46
9
53
54
164
17
43
2
110
63
33
140
105
154
61
150
22
133
39
48
14
41
145
29
18
5
113
LAGE
13
164
110
15
62
39
34
47
115
35
24
55
32
142
52
149
44
58
151
22
141
133
126
46
20
162
23
150
118
161
29
27
154
64
129
53
113
61
41
146
124
26
40
36
37
132
119
54
16
12
45
153
4
65
49
38
19
21
59
51
28
101
33
30
8
57
155
17
18
122
10
3
143
31
50
60
158
105
5
108
14
48
25
125
7
42
2
63
140
117
159
145
1
6
9
121
56
163
43
I
J
F
HG
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
-0.2
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
HT
o
o
o
o
o
o
o
o
o
o
o
o
o
113
39
151
60
115
40
117
19
145
129
64
142
43
30
124
51
2
23
118
29
42
143
50
45
14
52
58
140
7
163
153
4
5
110
54
155
108
9
119
28
126
61
164
63
48
6
46
62
121
65
49
133
55
159
12
105
37
1
57
26
59
161
33
20
41
21
122
141
150
146
125
154
158
162
32
149
24
25
35
15
36
17
16
10
8
56
13
53
44
27
22
38
18
31
101
47
34
132
3
G
H
IF
ID
KWT
J
0.0
0.2
Index
o
o
o
-0.2
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
0.0
0.1
o
0.2
o
o
o
0.3
Index
Figure 18: A plot of the inclusion index of individuals and non-linear models. On the
y-axis are the ID numbers and on the x-axis is the index. Each panel refers to one
continuous covariate.
to satisfy the convergence criteria. The latter depends on the algorithm used.
The default algorithm in Xpose is the fluctuation ratio. This algorithm terminates the
bootstrap of the GAM when the fluctuations in the relative inclusion probabilities of
the covariates is lower than certain value. The fluctuation of the inclusion frequency
for a specific covariate is determined over a certain interval (the default is the last 20
iterations, see Section 11.5.4) and the measure of fluctuation, M , is the ratio of the
highest and lowest inclusion frequency in that interval. The overall fluctuation, MONQPRN is
obtained by Eq. 2:
M
Y
VXWY[ZO\ YS]_^OY
MSNQPRNUT V`aW ZOM \ ^ a
(2)
is^cthe
Y fluctuation of the relative inclusion frequency in the interval of the b th covariate
and is the relative inclusion frequency of the b th covariate at the end of the interval.
47
The value of MSNQPRN , which will be 1 if there are no fluctuations, are compared to the
critical value, by default 1.04.
The fluctuation ratio will put more weight to the covariates with a high inclusion frequency, which is desirable if we are only interested in the overall stability of the covariates. If we are interested in the influence that individuals and/or other covariates exerts,
it is necessary to make sure that also the covariates with low inclusion frequencies are
found by the GAM enough times. This is to make sure that the inclusion indices (e.g.
Eq. 1) do not rely on only a few occurrences of the covariate in the final GAM model.
The second termination algorithm, lowest absolute joint inclusion frequency, makes
sure that the individual that has been included (one or more times) in the bootstrapped
data sets the least number of times, is included at least a certain number of times ( d –
lowest absolute joint inclusion frequency) together with a hypothetical covariate with
a certain, hypothetical, inclusion frequency (e – lowest important relative inclusion
>
frequency). Let be the lowest relative inclusion frequency of all individuals at a certain iteration, f . (The relative inclusion frequency of an individual is the number of
times an individual has been included in any of the bootstrapped data] sets] divided by
> f , which is
the number of data sets.) The critical value for this algorithm is: e
compared to d . The default values of d and e are 25 and 0.2 respectively.
The convergence of the lowest absolute joint inclusion algorithm is only dependent on
the random number permutation used in a specific bootstrap of the GAM problem. This
means that Xpose could actually calculate the number of iterations needed for convergence, However, the bootstrap of the GAM is not implemented that way and Xpose
checks the convergence at each interval as specified by the convergence checking interval (see Section 11.5.4).
11.5.3 Specifying an iteration to start checking convergence
Option 10 is used to specify the first interval at which the convergence should be
checked. The default is 30. If the user wish to set the number of bootstrap iterations to
a specific number, it can be done by setting the first convergence checking interval to
the same as the maximum number of bootstrap iterations.
11.5.4 Specifying the interval between convergence checks
Option 11 is used to specify the interval between convergence checks (after the first
check).
11.5.5 Specifying a seed number
The construction of bootstrapped data sets is a random process and, consequently, each
bootstrap of the GAM run is unique. Option 12 can be used to specify a seed number
for the random number generator. The seed number used for a bootstrap of the GAM
run is given in the numerical summary of the results (see Section 11.3), this is true even
if the seed number was not supplied by the user. To repeat a run exactly as a previous
run, it is necessary to set the seed number to the same as the one used in the old run
48
12 Tree based modeling
Tree based models are another method to find covariates to include in the NONMEM
model [20]. It has so far not been much used in the area of population pharmacokinetic/pharmacodynamic analysis. It offers some, at least theoretical, advantages over
the GAM in that the fit is invariant to transformation of the explanatory variables (covariates) and automatically includes the possibility of identifying interactions between
covariates. For a more detailed description of tree based models, please refer to Statistical models in S by Chambers and Hastie [12] or Modern applied statistics with S-plus
by Venables and Ripley [21].
To fit a tree model in Xpose it is necessary to have covariates and at least one parameter
defined in the current data base. Select option 6 from the MAIN MENU followed by
option 6 in the COVARIATE MODEL MENU. This will lead to the TREE MENU:
TREE MENU
1: Return to previous menu
2: Fit tree
3: Plot tree
4: Find optimal tree size
Selection:
12.1 Fitting a tree model
To fit a tree model, select option 2 from the TREE MENU. If there is more than one
parameter defined in the current data base, Xpose will prompt the user for a parameter
name.
12.2 Plotting a tree
To plot the fitted tree select option 3 from the TREE MENU. Xpose saves the fitted trees so it is also possible to specify an old tree fit. The Xpose tree objects are
named with a combination of tree.xpose., the parameter and the run number, e.g.
tree.xpose.CL.1. The user will be prompted for the size of the tree to be plotted
(see the next section). Pressing return as the answer to this prompt will produce a tree
similar to Figure 19.
12.3 Pruning trees
The tree in Figure 19 is an unpruned tree, i.e. it is a result of growing the tree until it
is no longer possible to make any more splits in the terminal branches, a point which
is reached when there are less than 10 points in each of the terminal branches. This
is likely to induce over fit and it is usually necessary to prune the tree21 , i.e. the user
has to specify which size of the tree that is relevant (hence the prompt when plotting a
21 In Xpose 1.1 it was not at all possible to prune the fitted trees making the tree module in that version
almost useless.
49
Example fit of a tree model
HT<177.5
|
HCTZ:b
AGE<56.5
SEX:b
WT<94.235
HT<184
SEX:b
WT<77.905
WT<81.875
12.42
AGE<58.5
WT<94.46
HT<171.5
26.78
14.96
20.07
15.63
28.68
34.81
HT<162.5
22.13
14.62
25.02
20.68
18.93
18.21
29.73
Figure 19: Plot of a tree fit. The length of the vertical lines are proportional to the
importance of the split
fitted tree). Some guidance to the importance of a specific split is given by the length
of the branches in the tree plot but this can, however, not be used as an indicator of
the relevant size of a tree. One approach to find the relevant tree size is to use a cross
validation procedure. First, the data set is divided into x number of groups, second,
x number of trees are grown, each with one of the x groups omitted from the growth
process and third, the fitted trees are used to predict the group of data not used to grow
the tree. The improvement in the fit (measured by the deviance), at each node of the
tree, is averaged over the x groups and the results are plotted. The key point here is that
the improvement in fit will only continue up to a certain point after which the deviance
will increase, i.e. the plot of the averaged deviance vs tree size will often exhibit a
minimum at some point, which is the suggested optimal tree size. This procedure
will not always work but since it a random process it is possible to repeat it until a
satisfactory minimum is found. The last sentence implies a degree of subjectivity in
the determination of the optimal tree size. To minimize this, Xpose will repeat the
cross-validation six times and display the results. An example of cross-validation plots
are shown in Figure 20 and the resulting pruned tree (size 6) are shown in Figure 21.
Admittedly, this is not satisfactory but is better than using the unpruned trees. With
this implementation it seems as if the the tree models are most useful for exploratory
analysis.
50
Example of tree size exploration
360
110
100
80
53
-Inf
1600
6800
1600
6
53
-Inf
6500
deviance
h
5500
2
4
6
8
10
12
14
2
size
360
110
100
80
53
-Inf
1600
12
14
110
4
6
100
80
53
-Inf
6600
360
6200
deviance
6000
h
5600
5800
5800
6000
g
5600
g
10
6400
6600
6200
deviance
6400
h
8
size
6800
1600
2
4
6
8
10
12
14
2
size
110
4
6
100
80
53
-Inf
1600
deviance
6400
6200
6000
5800
2
10
12
14
8
10
12
14
360
110
4
6
100
80
53
-Inf
5400 5600 5800 6000 6200 6400 6600
360
8
size
6600
1600
deviance
80
6000
6600
6000
6200
deviance
4
100
5800
g
110
h
6400
h
360
2
size
8
10
12
14
size
Figure 20: Results from exploring the optimal tree size using cross-validation. On the
y-axis is the deviance and on the x-axis are the corresponding tree sizes.
13 Printing and exporting graphics
The plots in Xpose are always displayed on screen22 (except the run summary and run
record). When the plot has been drawn, the user is asked if he or she wants to print the
plot or export to a file:
Do you want to print/export the graph? n(p=print,e=export)
Pressing n or return accepts the default – not to print or export the plot. Pressing p will
send the plot to the printer and pressing e will export the plot to a file.
When a plot is printed or exported the user has the possibility to customize the plot
title and/or the axis labels (the latter is not available when there are multiple plots per
page). To omit the plot title completely, type n at the prompt.
22 In
Xpose 1.1 the user had select if the plots should be displayed on screen or sent to the printer before
making the plot.
51
Example of a pruned tree
HT<177.5
|
AGE<56.5
HCTZ:b
HT<184
SEX:b
29.49
15.26
17.96
22.72
18.93
29.73
Figure 21: Pruned tree of size 6.
Do you want to print/export the graph? n(p=print,e=export)p
Type new title (return for default):
Final model
Type new x-axis title (return for default):
Time (h)
Type new y-axis title (return for default):
Weighted residuals
When printing a plot it is sent to the systems default printer. To change that behavior on
a UNIX system it is necessary to use a command similar to
ps.options(command="lp -d my.printer"), please refer to the S-PLUS
manuals for further details. On a PC the user can specify the printer in the usual Windows way.
The format of an exported plot depends on the platform. On UNIX machines the default
format is postscript and the plot will end up in a file called xp.ps in the current
directory. On PCs the plots are exported to the clipboard in windows metafile
format, i.e. when a plot has been exported it is necessary to switch to another Windows
52
application, e.g. Microsoft Word, and paste the plot in a document. Note, on a PC it is
generally not possible to export multi-page plots.
As per default plots are exported and printed in black and white. To use color, go to the
DATABASE MANAGEMENT MENU and select option 26. This option will toggle color
printing and exporting on and off.
If the user wishes to change the behavior of the printing and/or exportation it can be
done in the Xpose functions ask.print and set.xp.print.dev.
14 Altering the the way Xpose draws plots
Section 2.5 describes how the Xpose data variables can be re-defined. For some variables it is also possible to undefine them. To undefine a variable, select the relevant
option on the MANAGE DATABASES MENU and type NULL at the prompt (note the
capitalization). Only some data variables can successfully be undefined: idlab, wres,
iwres, pred, ipred and dv.
Undefining idlab will suppress the usage of ID numbers as plotting symbols.
Undefining either or both of pred and ipred will suppress the plotting of the corresponding curve in the Individual plots option in the GOODNESS OF FIT
PLOTS MENU. This also works in the Predictions vs dependent variable
option in the same menu.
Undefining either or two of pred, ipred and dv will suppress the corresponding plot(s) in
the Predictions vs independent variable in the STRUCTURAL MODEL
DIAGNOSTICS MENU.
Undefining either of iwres or wres will suppress the corresponding plot in options
5 and 6 on the RESIDUAL ERROR MODEL DIAGNOSTICS MENU
15 Making plots of a subset of the data
Sometimes it is desirable to concentrate on a subset of the data, for example the pharmacodynamic data from a fit of a simultaneous pharmacokinetic/
pharmacodynamic model . This can be done in Xpose by specifying two Xpose data
variables: flag and curflag (current value of flag). The flag variable can be specified in
the DATABASE MANAGEMENT MENU or set to a default value by the use of a mutab
(see Section 2.1.4). The flag variable determines which data item to be used to define
the subsets of the data. The flag variable can, however be set without making Xpose
produce plots for a certain subgroup23. To use a certain subgroup it is also necessary
to specify the current value of the flag variable. (See below for exceptions.) This done
with option 14 in the DATA BASE MANAGEMENT MENU:
Type the value to be used as the current flag value. Possible values
are: 2 1 (q to leave it as is, n to unspecify):
23 Using a mutab in Xpose 1.1 made it possible to select plots from a certain menu with plots that knew
how to handle multiple response variables, i.e. it was enough to specify the “flag” variable in the mutab .
53
It is necessary to specify the flag variable before setting the current value of the flag.
In the above example the flag variable has been set to SEX. When selecting the current
value of the flag, Xpose shows the possible values the current value can have, in this
case 1 and 2, and gives the user the options to leave it as is, that is, not to change the
current value of the flag, to unspecify it, i.e. to go back to look at all data at the same
time, and to specify any of the possible values. Note! The flag variable will be treated
as a factor variable, meaning that it is not a good idea to set it to a continuous variable
like AGE.
When the flag and curflag variables are set, all plots and analyses will be made based
on the subset of the data specified by these variables.
If the flag is set and not the curflag there are a few plots that offers to use that flag variable as the conditioning variable. Specifically, this is the coplots on the STRUCTURAL MODEL
DIAGNOSTICS MENU and the RESIDUAL ERROR MODEL DIAGNOSTICS MENU
(see Fig. 1) that corresponds to the plots in the Basic goodness of fit plots
and Additional goodness of fit plots that uses the covariates as the conditioning variable. These options will offer to use the flag variable as the conditioning
variable instead of the data items defined by the covariate variables.
54
References
[1] L. Aarons. Sparse data analysis. Eur. J. Metab. Pharmacokin., 18:97–100, 1993.
[2] T. H. Grasela, E. J. Antal, R. J. Townsend, and R. B. Smith. An evaluation of
population pharmacokinetics in therapeutic trials. Part I. Comparison of methodologies. Clin. Pharmacol. Ther., 39(6):606–612, 1986.
[3] L. B. Sheiner and S. L. Beal. Evaluation of methods for estimating population
pharmacokinetic parameters II. Biexponential model; experimental pharmacokinetic data. J. Pharmacokin. Biopharm., 9(4), 1983.
[4] M. O. Karlsson, E. N. Jonsson, C. Wiltse, and J. R. Wade. Assumption testing in
population pharmacokinetic models: Illustrated within an analysis of moxonidine
pk data. Submitted.
[5] StatSci, a division of Mathsoft, Inc, Seattle. S-PLUS guide to statistical and
mathematical analysis, Version 3.3, 1995.
[6] W. S. Cleveland. Visualizing data. Hobart press, Summit, New Jersey, USA,
1993.
[7] W. S. Cleveland. The elements of graphing data. Hobart press, Summit, New
Jersey, USA, 1985.
[8] J. W. Tukey. Exploratory data analysis. Addison-Wsley, Reading, Massachusetts,
USA, 1977.
[9] R. A. Becker and W. S. Cleveland. S-PLUS Trellis Graphics user’s manual. Seattle:MathSoft, Inc, Murray Hill: Bell Labs, 1996.
[10] J. W. Mandema, D. Verotta, and L. B. Sheiner.
Building population
pharmacokinetic-pharmacodynamic models. I. models for covariate effects. J.
Pharmacokin. Biopharm., 20(5):511–528, 1992.
[11] J.W. Mandema, D. Verotta, and L. B. Sheiner.
Building population
pharmakokinetic-pharmacodynamic models. In D. Z. D’Argenio, editor, Advanced methods of pharmacokinetic and pharmacodynamic systems analysis, Volume 2. Plenum Press, 1993.
[12] J. M. Chambers and T. J. Hastie, editors. Statistical models in S. Chapman &
Hall, London, 1993.
[13] T. J. Hastie and R. J. Tibshirani. Generalized additive models. Chapman and
Hall, New York, 1990.
[14] E. N. Jonsson amd M. O. Karlsson. Identification of factors that influences the importance of covariate relationships in population pharmacokinetic/pharmacodynamic models. Submitted, 1997.
[15] A. C. Davison and E. J. Snell. Residuals and diagnostics. In D. V. Hinkley,
N. Reid, and E. J. Snell, editors, Statistical theory and modelling: In honor of Sir
David Cox. Chapman & Hall, London, 1991.
55
[16] B. Efron and R. J. Tibsgirani. An introduction to the bootstrap. Chapman and
Hall, New York, 1993.
[17] R. Mick and M. J Ratain. Bootstrap validation of pharmacodynamic models
defined via stepwise linear regression. Clin. Pharmacol. Ther., 56(2):217–222,
1994.
[18] W. Sauberei and M. Schumacher. A bootstrap resampling procedure for model
building: Application to the Cox regression model. Statistics in medicine,
11:2093–2109, 1992.
[19] E. I. Ette. Stability and performance of a population pharmacokinetic model. J.
Clin. Pharmacol., 37:486–495, 1997.
[20] E. I. Ette and T. M. Ludden. Population pharmacokinetic modelling: The importance of informative graphics. Pharm. Res., 12(12):1845–1855, 1995.
[21] W. N. Venables and B. D. Ripley.
Springer-Verlag, New York, 1994.
56
Modern applied statistics with S-PLUS.
© Copyright 2026 Paperzz