Beruflich Dokumente
Kultur Dokumente
Users Guide
Version 4.1
Pharsight Corporation
800 West El Camino Real, Suite 200, Mountain View, California 94040
Voice +1-650-314-3800 Fax +1-650-314-3810
http://www.pharsight.com support@pharsight.com
WinNonlin
Version 4.1
WinNonlin copyright 1998-2003 Pharsight Corporation. All rights reserved. This software and manual are
owned by Pharsight Corporation, and may be used only as authorized in the license agreement controlling
such use. No part of this publication or the software it describes may be reproduced, transmitted, or translated,
in any form or by any means, electronic, mechanical, manual, optical, or otherwise, except as expressly pro-
vided by the license agreement or with the prior written permission of Pharsight Corporation. This product
may contain the following software that is provided to Pharsight Corporation under license: Tidestone For-
mula One copyright 1993-02 Actuate, Inc. All rights reserved. SentinelLM 6.0 copyright 1998 Rainbow
Technologies, Inc. All rights reserved. Microsoft XML Parser version 3.0 copyright 1998-2000 Microsoft
Corporation. All rights reserved. IMSL copyright 1993 Visual Numerics, Inc. All rights reserved.
Information in this document is subject to change without notice and does not represent a commitment on the
part of Pharsight Corporation. This document contains proprietary information of Pharsight Corporation and is
for use by Pharsight Corporation customers only. Use of the information contained in this document for any
purpose other than that for which it is intended is not authorized. NEITHER PHARSIGHT CORPORATION NOR
ANY OF THE CONTRIBUTORS TO THIS DOCUMENT MAKES ANY REPRESENTATION OR WARRANTY, NOR SHALL
ANY WARRANTY BE IMPLIED, AS TO THE COMPLETENESS, ACCURACY, OR USEFULNESS OF THE INFORMATION
CONTAINED IN THIS DOCUMENT, NOR DO THEY ASSUME ANY RESPONSIBILITY FOR LIABILITY OR DAMAGE OF
ANY KIND WHICH MAY RESULT FROM THE USE OF SUCH INFORMATION.
Destination Control Statement
All technical data contained in this publication are subject to the export control laws of the United States of
America. Disclosure to nationals of other countries may violate such laws. It is the reader's responsibility to
determine the applicable regulations and to comply with them.
United States Government Rights
The Software and Documentation constitute commercial computer software and commercial computer
software documentation as such terms are used in 48 CFR 12.212 (Sept. 1995). United States Government
end users acquire the Software under the following terms: (i) for acquisition by or on behalf of civilian agen-
cies, consistent with the policy set forth in 48 CFR 12.212 (Sept. 1995); or (ii) for acquisition by or on behalf
of units of the Department of Defense, consistent with the policies set forth in 48 CFR 227.7202-1 (June 1995)
and 227.7202-3 (June 1995). The manufacturer is Pharsight Corporation, 800 West El Camino Real, Suite 200,
Mountain View, CA 94040.
Trademarks
Trial Simulator, PKS Reporter and Knowledgebase Server are trademarks, and Pharsight, WinNonlin and
WinNonMix are registered trademarks, of Pharsight Corporation. Tidestone is a trademark and Formula One is
a licensed trademark of Actuate, Inc. SentinelLM is a trademark of Rainbow Technologies, Inc. Microsoft
Word, Microsoft Excel, MS, MS-DOS, Windows, Windows 98, Windows NT, Windows 2000, Windows XP
and Fortran Powerstation are trademarks or registered trademarks of Microsoft Corporation. IMSL is a regis-
tered trademark of Visual Numerics, Inc. Compaq Visual Fortran is trademark of Compaq Computer Corpora-
tion. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of
SAS Institute Inc. in the USA and other countries. All other brand or product names mentioned in this docu-
mentation are trademarks or registered trademarks of their respective companies or organizations.
iii
Contents
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
WinNonlin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
WinNonlin editions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
WinNonlin user documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Modeling and nonlinear regression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Model fitting algorithms and features of WinNonlin. . . . . . . . . . . . . . . . 5
Summary of regression methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Pharsight Corporation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Scientific and consulting services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Pharsight contact information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Chapter 2 Data Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
WinNonlin windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Text windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chart windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Hidden windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Data files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
File types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Pharsight object files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
File type limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
WinNonlin and WinNonMix file compatibility . . . . . . . . . . . . . . . . . . . 22
Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Print all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
WinNonlin
Users Guide
iv
Page setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
WinNonlin options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Dependencies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Saving dependencies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Refreshing results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Unlocking derived data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Data history worksheets and log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
History worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
WinNonlin Log Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Data export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Microsoft Word export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
SAS Transport file export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
NONMEM export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Chapter 3 ODBC Data Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
ODBC import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Import settings file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Connecting to the data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Loading a saved connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Building a query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Loading a saved query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Loading an import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Refreshing a data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Importing data with the custom query builder . . . . . . . . . . . . . . . . . . . . 64
ODBC export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Export settings file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Defining an export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Loading a saved export definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Loading an export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
The Enterprise Software Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Import file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Export file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Custom query builder interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
VB example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Contents
v
Chapter 4 Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
Editing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Using formulas and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Filling adjacent cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Clearing cell values and formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Inserting and deleting rows, columns or cells . . . . . . . . . . . . . . . . . . . . 90
Inserting or deleting worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Find, find next and replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Go to . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Formatting cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Setting column names and units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Data manipulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Freezing rows and columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Data exclusion and inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Status code transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Rule sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Chapter 5 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Units display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Units options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Unit types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Prefixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Dosing units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Dose normalization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Preferred units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Worksheet units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Entering units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Clearing units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Converting units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Chapter 6 Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Chart Wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
X-Y variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Sort and group variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Error bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Chart titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
WinNonlin
Users Guide
vi
Axis options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Chart Designer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Starting the chart designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Selecting the plot type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Specifying chart backdrops. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Selecting a location for the plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Formatting the walls of a plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Formatting a series on the plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Formatting series data point labels and axis labels. . . . . . . . . . . . . . . . 157
Formatting an axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Formatting axis titles, footnotes, legends, and chart titles . . . . . . . . . . 171
Frequently used graph formatting options. . . . . . . . . . . . . . . . . . . . . . . . . . 178
Changing line style and markers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Changing the axis scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Creating a semi-log plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Removing grid lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Removing walls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Chart templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Preview and page setup for charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Copy and paste. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Save options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Chapter 7 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Table Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Missing table values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Table templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Templates 1-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Templates 4-8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Template 9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Table template variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
ID variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Group variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Variables (or regular variables). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Cross, or X-Cross variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Aggregate variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Mapping variables to the template . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Joining data sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Summary statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Significant digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Contents
vii
Table formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Reformatting data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Data-only tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Table export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Exporting to Microsoft Word. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Exporting to Microsoft Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Table definition files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Creating a table definition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Loading a table definition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Chapter 8 Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
Computing summary statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Output and computational formulae. . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Weighted summary statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Output and computational formulae. . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Chapter 9 Noncompartmental Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
NCA model selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Model variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Lambda z estimation settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Lambda z range selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Calculation of Lambda z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Setting Lambda z ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Partial areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Therapeutic response window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Dosing regimen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Rules for handling of steady-state data. . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Model options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Output options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
NCA settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Parameter names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
WinNonlin
Users Guide
viii
Computational rules for WinNonlins noncompartmental analysis engine. 234
Data checking and pre-treatment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
AUC calculation and interpolation formulas . . . . . . . . . . . . . . . . . . . . 235
Partial areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Computational details for pharmacokinetic parameters . . . . . . . . . . . . 240
Chapter 10 Compartmental Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Loading the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Model properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Data variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Model parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Dosing regimen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Model options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Output options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
PK settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Running the model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Stop modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Text (ASCII) output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Workbook output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Chart output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Chapter 11 User Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Model structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Model components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Transform block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Command block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Temporary variables block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Function block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Starting values block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Differential equation block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Secondary parameters block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
WinNonlin variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Variable names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
PNAMES, SNAMES, and DNAMES. . . . . . . . . . . . . . . . . . . . . . . . . . 286
Contents
ix
The WinNonlin programming language . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
WinNonlin statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
WinNonlin comparison operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Bioassay functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
ASCII models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
User libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Example 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Example 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Example 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Creating a new ASCII model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Loading an existing ASCII user model . . . . . . . . . . . . . . . . . . . . . . . . 300
Compiled user models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Using FORTRAN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Example using Compaq Visual FORTRAN 6.0. . . . . . . . . . . . . . . . . . 302
Using C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Example using Microsoft Visual C++ 6.0 . . . . . . . . . . . . . . . . . . . . . . 305
Using compiled user models in a command file . . . . . . . . . . . . . . . . . 307
Chapter 12 Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309
Command file structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Model definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
WinNonlin commands: basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Model definition commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Loading ASCII models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Model initialization commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Weighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Model parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Dosing regimen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Model options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Data commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Execution control statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Chapter 13 Weighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325
Weighted least squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Iterative reweighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
WinNonlin
Users Guide
x
Reading weights from the data file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Scaling of weights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Weights in ASCII models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Chapter 14 The WinNonlin Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Nonparametric superposition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Data and assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Computation method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Performing nonparametric superposition . . . . . . . . . . . . . . . . . . . . . . . 332
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Semicompartmental modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Data and assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Computation method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Performing semicompartmental modeling . . . . . . . . . . . . . . . . . . . . . . 337
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Crossover design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Data and assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Descriptive analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Hypothesis testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Using the Crossover Design tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Deconvolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Deconvolution methodology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Convolution methodology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Using deconvolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Deconvolution output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Chapter 15 Linear Mixed Effects Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . 363
An example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
The linear mixed effects model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Construction of the X matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Linear combinations of elements of . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Determining estimability numerically . . . . . . . . . . . . . . . . . . . . . . . . . 373
Substitution of estimable functions for non-estimable functions . . . . . 373
Fixed effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Output parameterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Contents
xi
Variance structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Repeated effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Random effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Least squares means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Contrasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Joint versus single contrasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Nonestimability of contrasts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Degrees of freedom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Other options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
LinMix Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
LinMix limits and constraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Fixed effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Variance structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Contrasts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Least squares means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
LinMix general options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
LinMix output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Linear mixed effects text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Linear mixed effects workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Tests of hypotheses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Akaikes Information Criterion (AIC) . . . . . . . . . . . . . . . . . . . . . . . . . 404
Schwarzs Bayesian Criterion (SBC) . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Hessian eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Predicted values and residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Fixed effects parameter estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Coefficients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Iteration history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Parameter key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Computational details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Restricted maximum likelihood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Newtons Algorithm for maximization of restricted likelihood. . . . . . 408
Starting values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Convergence criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Satterthwaites approximation for degrees of freedom . . . . . . . . . . . . 411
Comparing LinMix to ANOVA and SASs PROC MIXED . . . . . . . . . . . 413
WinNonlin
Users Guide
xii
Chapter 16 Bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Introduction to bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Basic terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
The model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Linear model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Variance structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Average bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Study designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Recommended models for average bioequivalence . . . . . . . . . . . . . . . 421
Least squares means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Classical and Westlake confidence intervals . . . . . . . . . . . . . . . . . . . . 424
Two one-sided T-tests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Anderson-Hauck test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Individual and population bioequivalence. . . . . . . . . . . . . . . . . . . . . . . . . . 430
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Bioequivalence criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Details of computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
Bioequivalence Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Using average bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
Using population/individual bioequivalence . . . . . . . . . . . . . . . . . . . . 444
Bioequivalence command files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
Bioequivalence output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Average bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Population/Individual bioequivalence. . . . . . . . . . . . . . . . . . . . . . . . . . 447
Ratio tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Missing data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
Chapter 17 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Simulating responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Simulation of a compiled library model . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Creating the input data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
Setting up the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Data variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Model parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
Dosing regimen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Model options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Running the simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Comparing dosing schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Dosing regimen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Contents
xiii
Chapter 18 Using the Pharsight Knowledgebase Server . . . . . . . . . . . . . . .461
The PKS information structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Study. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Other documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
PKS sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Accessing the PKS from WinNonlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Dosing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
Dosing workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Dosing dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Connecting to the PKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Creating a study or scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Loading a study or scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Creating scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Adding non-WinNonlin documents to a scenario. . . . . . . . . . . . . . . . . . . . 479
Optimizing PKS/WNL performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
Change tracking and audit information. . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Dosing information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Changing the dose regimen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Appending or updating a study. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
WinNonlin and PKS differences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Studies and scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
Chapter 19 Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .489
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Writing and editing a script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
Executing a script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Within WinNonlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
From the command line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
From file manager or explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Scripting object properties and methods. . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Script file components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Note on saving files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Processing multiple profiles in script files . . . . . . . . . . . . . . . . . . . . . . . . . 501
Special file formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
WinNonlin
Users Guide
xiv
Scripting the Pharsight Knowledgebase Server. . . . . . . . . . . . . . . . . . . . . . 512
Example PKS scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
Examples of individual scripting operations . . . . . . . . . . . . . . . . . . . . . . . . 520
Data manipulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
Plots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
Data transformations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Descriptive statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
WinNonlin Model Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
ANOVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Word export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Chapter 20 Scripting WinNonlin Using Visual Basic . . . . . . . . . . . . . . . . . . . 539
Summary of properties and methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
Automating Pharsight Knowledgebase Server functions . . . . . . . . . . . . . . 545
Visual Basic scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
Creating a script using Microsoft Word 2000. . . . . . . . . . . . . . . . . . . . 546
Running a script using Microsoft Word 2000. . . . . . . . . . . . . . . . . . . . 548
Appendix A Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
Appendix B WinNonlin Model Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
Notation and conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
Pharmacokinetic models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
ASCII models and files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
PK models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Pharmacodynamic models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
ASCII library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
PK/PD link models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Notation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Linking PK and PD models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Output parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
Indirect response models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606
Running an indirect response model . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Michaelis-Menten models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Contents
xv
Simultaneous PK/PD link models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
ASCII library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
Appendix C Worksheet Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .615
Appendix D Commands, Arrays and Functions. . . . . . . . . . . . . . . . . . . . . . . .621
Appendix E Scripting Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .645
Appendix F Warnings and Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . .707
Compartmental modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
Troubleshooting modeling problems . . . . . . . . . . . . . . . . . . . . . . . . . . 718
LinMix and Bioequivalence wizards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
Table Wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
Descriptive statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
Noncompartmental analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
Error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
Scripting language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
Appendix G Visual Basic Automation Reference . . . . . . . . . . . . . . . . . . . . . .725
Chart module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
Charts module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
Crossover module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
Deconvolution module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
DescStats module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
LinMix module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
Merge module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
Model module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
PK module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
Plot module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
PrintExportAll module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755
Rule module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
Semicompartmental module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760
StatusCodes module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
Superposition module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
Table module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769
WinNonlin
Users Guide
xvi
TextEditor module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771
TextEditors module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
Variable module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
Variables module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780
Wnl4 module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
Workbook module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
Workbooks module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
Workspace module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
Appendix H References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
Deconvolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
Pharmacokinetics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
Regression and modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
Bioequivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
1
Chapter 1
Introduction
WinNonlin editions, user documentation, and
Pharsight contact information
WinNonlin
WinNonlin is a sophisticated tool for nonlinear modeling. It is particularly
suited to pharmacokinetic and pharmacodynamic (PK/PD) modeling and non-
compartmental analysis to evaluate data from bioavailability and clinical
pharmacology studies. WinNonlin includes a large library of pharmacoki-
netic, pharmacodynamic, noncompartmental, PK/PD link, and indirect
response models. It also supports creation of custom models to enable fitting
and analysis of virtually any kind of data.
WinNonlin editions
WinNonlin is distributed in two editions, WinNonlin Professional and Win-
Nonlin Enterprise. WinNonlin Professional is made for scientists involved
with nonlinear modeling. It supports the analyses and generates the figures,
tables, and listings required for regulatory submission. WinNonlin Enterprise
has been developed for use by scientists working in a networked environment.
In addition to all the features of WinNonlin Professional, the Enterprise edi-
tion can access ODBC-compliant databases, and serves as a portal to the Phar-
sight Knowledgebase Server (PKS), Pharsight's solution for secure
storage, management and tracking of clinical and pre-clinical data. The com-
bination of WinNonlin Enterprise and PKS supports compliance with the
Food and Drug Administrations (FDA) 21 CFR part 11 regulations.
WinNonlin user documentation
WinNonlin includes the following user documentation. Each manual is avail-
able in PDF format on the WinNonlin CD, and installed in the WinNonlin
WinNonlin
Users Guide
2
1
directory under \USER DOCS. In addition, the Getting Started Guide is pro-
vided in hardcopy with each WinNonlin CD shipment.
The manuals are not intended as a comprehensive text on nonlinear estimation
theory, noncompartmental analysis, or statistical analysis. A bibliography of
references on the underlying theory is provided under References on
page 813.
Modeling and nonlinear regression
The value of mathematical models is well recognized in all of the sciences
physical, biological, behavioral, and others. Models are used in the quantita-
tive analysis of all types of observations or data, and with the power and avail-
ability of computers, mathematical models provide convenient and powerful
ways of looking at data. Models can be used to help interpret data, to test
hypotheses, and to predict future results. The concern here is fitting models
to datathat is, finding a mathematical equation and a set of parameter values
such that values predicted by the model are in some sense close to the
observed values.
Most scientists have been exposed to linear models, models in which the
dependent variable can be expressed as the sum of products of the indepen-
dent variables and parameters. The simplest example is the equation of a line
(simple linear regression):
Table 1-1. WinNonlin user documentation
Document Default location Description
Getting
Started Guide
...\WinNonlin\User Docs and
hardcopy with CD shipments
Installation and licensing instructions, and a step-by-step test
to confirm that the installation is complete and functional.
Users Guide ...\WinNonlin\User Docs Operating procedures for each software feature, information
on the calculations performed by WinNonlin, and appendices
detailing WinNonlin functions.
Examples
Guide
...\WinNonlin\User Docs Step-by-step examples illustrating use of WinNonlin features
in realistic scenarios.
Online help Accessed from the application
via the Help menu, F1 key, or
Help button.
Operating procedures for the software features and refer-
ence material on WinNonlins computational engines.
Release
notes
...\WinNonlin\User Docs Known issues and work-arounds in the current version of
WinNonlin.
Introduction
Modeling and nonlinear regression
3
1
where Y is the dependent variable, X is the independent variable, A is the
intercept and B is the slope. Two other common examples are polynomials
such as:
and multiple linear regression.
These examples are all linear models since the parameters appear only as
coefficients of the independent variables.
Note: WinNonlins LinMix module handles linear regression, as well as Analysis of
Variance and Analysis of Covariance.
In nonlinear models, at least one of the parameters appears as other than a
coefficient. A simple example is the decay curve:
This model can be linearized by taking the logarithm of both sides, but as
written it is nonlinear.
Another example is the Michaelis-Menten equation:
This example can also be linearized by writing it in terms of the inverses of V
and C, but better estimates are obtained if the nonlinear form is used to model
the observations (Endrenyi, 1981, pages 304-305).
There are many models which cannot be made linear by transformation. One
such model is the sum of two or more exponentials, such as
+ + = BX A Y
+ + + + =
3
4
2
3 2 1
X A X A X A A Y
+ + + + =
3 4 2 3 1 2 1
X A X A X A A Y
( ) BX Y Y = exp
0
C K
C V
V
m
+
=
max
( ) ( ) X B A X B A Y
2 2 1 1
exp exp + =
WinNonlin
Users Guide
4
1
All of the models on this page are called nonlinear models, or nonlinear
regression models. This manual is not intended to be a comprehensive text on
nonlinear estimation theory. However, two good references for the topic of
general nonlinear modeling are Draper and Smith (1981) and Beck and
Arnold (1977). The books by Bard (1974), Ratkowsky (1983) and Bates and
Watts (1988) give a more detailed discussion of the theory of nonlinear
regression modeling. Modeling in the context of kinetic analysis and pharma-
cokinetics is discussed in Endrenyi (1981) and Gabrielsson and Weiner
(2001).
All pharmacokinetic models derive from a set of basic differential equations.
When the basic differential equations can be integrated to algebraic equations,
it is most efficient to fit the data to the integrated equations. But it is also pos-
sible to fit data to the differential equations by numerical integration. Win-
Nonlin can be used to fit models defined in terms of algebraic equations and
models defined in terms of differential equations as well as a combination of
the two types of equations.
Given a model of the data, and a set of data, how does one fit the model to
the data? Some criterion of best fit is needed, and many have been sug-
gested, but only two are much used. These are maximum likelihood and least
squares. With certain assumptions about the error structure of the data (no
random effects), the two are equivalent. A discussion of using nonlinear least
squares to obtain maximum likelihood estimates can be found in Jennrich and
Moore (1975). In least squares fitting the best estimates are those which
minimize the sum of the squared deviations between the observed values and
the values predicted by the model.
The sum of squared deviations can be written in terms of the observations and
the model. In the case of linear models it is easy to compute the least squares
estimates. One equates to zero the partial derivatives of the sum of squares
with respect to the parameters. This gives a set of linear equations with the
estimates as unknowns; well-known techniques can be used to solve these lin-
ear equations for the parameter estimates.
This method will not work for nonlinear models, because the system of equa-
tions which results by setting the partial derivatives to zero is a system of non-
linear equations for which there are no general methods for solving.
Consequently, any method for computing the least squares estimates in a non-
linear model must be an iterative procedure. That is, initial estimates of the
parameters are made and then in some way these initial estimates are modi-
fied to give better estimates, i.e., estimates which result in a smaller sum of
Introduction
Modeling and nonlinear regression
5
1
squared deviations. The iteration continues until hopefully the minimum (or
least) sum of squares is reached.
In the case of models with random effects, such as population PK/PD models,
the more general method of maximum likelihood (ML) must be employed. In
ML, the likelihood of the data is maximized with respect to the model param-
eters. WinNonMix fits models of this variety.
Since it is not possible to know exactly what the minimum is, some stopping
rule must be given at which point it is assumed that the method has converged
to the minimum sum of squares. A more complete discussion of the theory
underlying nonlinear regression can be found in the books cited previously.
Model fitting algorithms and features of WinNonlin
WinNonlin is a computer program for estimating the parameters in a nonlin-
ear model, using the information contained in a set of observations. WinNon-
lin can also be used to simulate a model. That is, given a set of parameter
values and a set of values of the independent variables in the model, WinNon-
lin will compute values of the dependent variable and also estimate the vari-
ance-inflation factors for the estimated parameters.
A computer program such as WinNonlin is only an aid or tool for the model-
ing process. As such it can only take the data and model supplied by the
researcher and find a best fit of the model to the data. The program cannot
determine the correctness of the model nor the value of any decisions or inter-
pretations based on the model. The program does, however, provide some
information about the goodness of fit of the model to the data and about
how well the parameters are estimated.
It is assumed that the user of WinNonlin has some knowledge of nonlinear
regression such as contained in the references mentioned earlier. WinNonlin
provides the least squares estimates of the model parameters as discussed
above. WinNonlin gives the option of three algorithms for minimizing the
sum of squared residuals: the simplex algorithm of Nelder and Mead (1965),
the Gauss-Newton algorithm with the modification proposed by Hartley
(1961), and a Levenberg-type modification of the Gauss-Newton algorithm
(Davies and Whitting, 1972).
The simplex algorithm is a very powerful minimization routine; its usefulness
has formerly been limited by the extensive amount of computation it requires.
The power and speed of current computers make it a more attractive choice,
especially for those problems where some of the parameters may not be well-
WinNonlin
Users Guide
6
1
defined by the data and the sum of squares surface is complicated in the
region of the minimum. The simplex method does not require the solution of a
set of equations in its search and does not use any knowledge of the curvature
of the sum of squares surface. When the Nelder-Mead algorithm converges,
WinNonlin restarts the algorithm using the current estimates of the parameters
as a new set of initial estimates and resetting the step sizes to their original
values. The parameter estimates which are obtained after the algorithm con-
verges a second time are treated as the final estimates. This modification
helps the algorithm locate the global minimum (as opposed to a local mini-
mum) of the residual sum of squares for certain difficult estimation problems.
The Gauss-Newton algorithm uses a linear approximation to the model. As
such it must solve a set of linear equations at each iteration. Much of the diffi-
culty with this algorithm arises from singular or near-singular equations at
some points in the parameter space. WinNonlin avoids this difficulty by using
singular value decomposition rather than matrix inversion to solve the system
of linear equations. (See Kennedy and Gentle, 1980.) One result of using this
method is that the iterations do not get hung up at a singular point in the
parameter space, but rather move on to points where the problem may be bet-
ter defined. To speed convergence, WinNonlin uses the modification to the
Gauss-Newton method proposed by Hartley (1961) and others; with the addi-
tional requirement that at every iteration the sum of squares must decrease.
Many nonlinear estimation programs, including the original NONLIN, have
found Hartley's modification to be very useful. Beck and Arnold (1977) com-
pare various least squares algorithms and conclude that the Box-Kanemasu
method (almost identical to Hartley's) is the best under many circumstances.
As indicated, the singular value decomposition algorithm will always find a
solution to the system of linear equations. However, if the data contain very
little information about one or more of the parameters, the adjusted parameter
vector may be so far from the least squares solution that the linearization of
the model is no longer valid. Then the minimization algorithm may fail due to
any number of numerical problems. One way to avoid this is by using a 'trust
region' solution; that is, a solution to the system of linear equations is not
accepted unless it is sufficiently close to the parameter values at the current
iteration. The Levenberg and Marquardt algorithms are examples of 'trust
region' methods.
Note: Note that the Gauss-Newton method with the Levenberg modification is the
default estimation method used by WinNonlin.
Introduction
Modeling and nonlinear regression
7
1
Trust region methods tend to be very robust against ill-conditioned data sets.
There are two reasons, however, why one may not want to use them. (1) They
require more computation, and thus are not efficient with data sets and models
that readily permit precise estimation of the parameters. (2) More importantly,
the trust region methods obtain parameter estimates that are often meaning-
less because of their large variances. Although WinNonlin gives indications
of this, it is possible for users to ignore this information and use the estimates
as though they were really valid. For more information on trust region meth-
ods, see Gill, Murray and Wright (1981) or Davies and Whitting (1972).
In WinNonlin the partial derivatives required by the Gauss-Newton algorithm
are approximated by difference equations. There is little, if any, evidence that
any nonlinear estimation problem is better or more easily solved by the use of
the exact partial derivatives.
To fit those models that are defined by systems of differential equations, the
RKF45 numerical integration algorithm is used (Shampine et. al., 1976). This
algorithm is a 5th order Runge-Kutta method with variable step sizes.
It is often desirable to set limits on the admissible parameter space; this results
in constrained optimization. For example, the model may contain a parame-
ter which must be non-negative, but the data set may contain so much error
that the actual least squares estimate is negative. In such a case it may be pref-
erable to give up some of the properties of the unconstrained estimation in
order to obtain parameter estimates that are physically realistic. At other
times, setting reasonable limits on the parameter may prevent the algorithm
from wandering off and getting lost. For this reason, it is recommended that
users always set limits on the parameters (the means of doing this is discussed
in the modeling chapters of this document). In WinNonlin two different meth-
ods are used for bounding the parameter space. When the simplex method is
used, points outside the bounds are assigned a very large value for the residual
sum of squares. This sends the algorithm back into the admissible parameter
space.
With the Gauss-Newton algorithms, two successive transformations are used
to affect the bounding of the parameter space. The first transformation is from
the bounded space as defined by the input limits to the unit hypercube. The
second transformation uses the inverse of the normal probability function to
go to an infinite parameter space. This method of bounding the parameter
space has worked extremely well with a large variety of models and data sets.
Bounding the parameter space in this way is in effect a transformation of the
parameter space. It is well known that a reparameterization of the parameters
will often make a problem more tractable. (See Draper and Smith (1981) or
WinNonlin
Users Guide
8
1
Ratkowsky (1983) for discussions of reparameterization.) When encountering
a difficult estimation problem, the user may want to try different bounds to
see if the estimation is improved. It must be pointed out that it may be possi-
ble to make the problem worse with this kind of transformation of the param-
eter space. However, experience suggests that this will rarely occur.
Reparameterization to make the models more linear also may help.
Because of WinNonlins flexibility and generality, and the complexity of non-
linear estimation, a great many options and specifications may be supplied to
the program. To make WinNonlin easy to use, many of the most commonly
used options are set as WinNonlin defaults.
WinNonlin is capable of estimating the parameters in a very large class of
nonlinear models. Fitting pharmacokinetic and pharmacodynamic models is a
special case of nonlinear estimation, but it is important enough that WinNon-
lin is supplied with a library of the most commonly used pharmacokinetic and
pharmacodynamic models. To speed execution time, the main WinNonlin
library has been built in, or compiled. However, ASCII library files corre-
sponding to the same models as the built-in models, plus an additional utility
library of models, are also provided. The model libraries and their uses are
described in WinNonlin Model Libraries on page 573. Users can also create
custom libraries, as explained in User Models on page 273.
Summary of regression methods
Method 1: Nelder-Mead simplex
Method 1 is a very powerful algorithm. Since it doesn't require the estimated
variance-covariance matrix as part of its algorithm, it often performs very
well on ill-conditioned data sets. Ill-conditioned indicates that for the given
data set and model, there isn't enough information contained in the data to pre-
cisely estimate all of the parameters in the model or that the sum of squares
surface is highly curved. Although the procedure works well, it can be slow.
When used to fit a system of differential equations, it can be extremely slow.
Method 2: Gauss-Newton with Levenberg and Hartley modification
Method 2 is the default, and also performs well on a wide class of problems,
including ill-conditioned data sets. Although the Gauss-Newton method does
require the estimated variance-covariance matrix of the parameters, the Lev-
enberg modification suppresses the magnitude of the change in parameter val-
Introduction
Pharsight Corporation
9
1
ues from iteration to iteration to a reasonable amount. This enables the
method to perform well on ill-conditioned data sets.
Method 3: Gauss-Newton with Hartley modification
Method 3 is another Gauss-Newton method. It is not as robust as Methods 1
and 2 but is extremely fast. Method 3 is recommended when speed is a con-
sideration or when maximum likelihood estimation or linear regression analy-
sis is to be performed. It is not recommended for fitting complex models.
Pharsight Corporation
Pharsight Corporation provides software and services designed to improve the
efficiency of drug development. The company's proprietary technology and
world-class consulting expertise enable pharmaceutical and biotechnology
companies to make more confident decisions in dealing with complex issues
of drug development and product portfolio management. Pharsight Corpora-
tion helps companies make more informed and objective decisions that lead to
more successful and predictable trial outcomes.
Pharsight Corporation is a public company headquartered in Mountain View,
California. More information about the company, products and services is
available on the web at www.pharsight.com. See also Pharsight contact
information on page 10.
Products
Pharsight offers a comprehensive suite of software products, including Win-
Nonlin
, WinNonMix
N 1
-------------------------------
WinNonlin
Users Guide
210
8
Pseudo SD Jackknife estimate of the standard deviation of the harmonic mean. For
n points, x
1
, .... x
n
the pseudo standard deviation is:
where:
and:
Mean log Arithmetic average of the natural logs of the observations
SD Log Standard deviation of the natural logs of the observations
CV% Geometric
Mean
Coefficient of variation of the geometric mean:
CI X% Lower Mean Lower limit of an X% confidence interval for the mean:
Table 8-1. Descriptive statistics output (continued)
Statistic Description
pseudo SD n 1 ( ) H
i
H ( )
2
i 1 =
n
=
H
1
n
---
H
i
i 1 =
n
=
H
i
n 1 ( )
1
x
1
-----
1
x
2
-----
1
x
i 1
----------
1
x
x 1 +
-----------
1
x
n
----- + + + + + +
\ .
| |
---------------------------------------------------------------------------------------------- =
n 1 ( )
1
x
j
----
j 1 =
n
\ .
|
|
| |
1
x
i
----
----------------------------- =
SD_log ( )
2
( ) exp 1 100
Mean t
2
SD
N
--------
Descriptive Statistics
Computing summary statistics
211
8
CI X% Upper Mean Upper limit of an X% confidence interval for the mean:
where is the percentage given for the confidence inter-
val, and is from the t-distribution with N-1 degrees of freedom.
Thus, a 95% confidence level indicates that alpha = 0.05. Note that for
N>30, the t-distribution is close to the normal distribution.
CI X% Lower Var Lower limit of an X% confidence interval for the variance:
CI X% Upper Var Upper limit of an X% confidence interval for the variance:
where
L
2
and
U
2
are from the
2
-distribution with N-1 degrees of
freedom.
L
2
cuts off a lower tail, and
U
2
cuts off an upper tail, of area
/2 where (1 - )*100 is the percentage for the confidence interval.
P(ercentiles)
The p
th
percentile divides the distribution at a point such that p percent
of the distribution are below this point
Skewness Coefficient of skewness:
Kurtosis Coefficient of excess (kurtosis):
Table 8-1. Descriptive statistics output (continued)
Statistic Description
Mean t
2
SD
N
--------
+
1 ( ) 100
t
2
N 1 ( ) Variance
U
2
------------------------------------------------
N 1 ( ) Variance
L
2
------------------------------------------------
w
i
x
i
x
w
( )
3
N
w
i
x
i
x
w
( )
2
N
3 2
---------------------------------------------------------
w
i
x
i
x
w
( )
4
N
w
i
x
i
x
w
( )
2
N
2
---------------------------------------------------- 3
WinNonlin
Users Guide
212
8
Units
When summary statistics are calculated on a variable with units, certain of the
calculations will have units. Assuming that the variable summarized is x and
has x-units specified, the units for the summary statistics are:
Weighted summary statistics
Summary statistics can be weighted, using a column in the data set to provide
weights. If a weight is non-numeric, missing, or excluded, it is set to zero.
To create weighted summary statistics:
1. Make all specifications as for un-weighted summary statistics. See Comput-
ing summary statistics on page 207.
2. Drag the variable containing weights to the Weight Variable box (or high-
light the variable to be used as the weight and press Shift+W).
Units
Units are displayed as for summary statistics. See Units on page 212.
Output and computational formulae
The output for weighted summary statistics contains a column indicating the
summary variable(s), one for each sort variable, and the statistics below.
Statistic Units
N, Nmiss, Nobs No units
CV%, CV% Geometric Mean No units
Skewness No units
Kurtosis No units
Mean log, SD log No units
Variance
x-unit
2
CI Lower Var, CI Upper Var
x-unit
2
Everything else x-unit
Descriptive Statistics
Weighted summary statistics
213
8
Table 8-2. Weighted summary statistics output
Statistic Description
N Number of non-missing observations (including those with weights = 0)
Nmiss Number of observations with missing data
Nobs Number of observations (including observations with weights of 0)
Mean Weighted Arithmetic average:
SD Weighted Standard Deviation:
SE Weighted Standard Error:
Variance Weighted Variance:
where is the weighted mean.
CV% Weighted Coefficient of variation: (Weighted SD/Weighted Mean)*100
CI X% Lower Mean Lower limit of an X% confidence interval, using weighted mean and SD
CI X% Upper Mean Upper limit of an X% confidence interval, using weighted mean and SD
CI X% Lower Var Lower limit of an X% confidence interval, using weighted variance
CI X% Upper Var Upper limit of an X% confidence interval, using weighted variance
Skewness Weighted coefficient of skewness:
Kurtosis Weighted coefficient of excess (kurtosis):
w
i
x
i
w
i
-----------------------
Weighted Variance
Weighted SD
N
-------------------------------
w
i
x
i
x
w
( )
2
N 1
------------------------------------
x
w
w
i
x
i
x
w
( )
3
n
w
i
x
i
x
w
( )
2
n
3 2
--------------------------------------------------------
w
i
x
i
x
w
( )
4
n
w
i
x
i
x
w
( )
2
n
2
--------------------------------------------------- 3
WinNonlin
Users Guide
214
8
215
Chapter 9
Noncompartmental
Analysis
WinNonlin's noncompartmental analysis engine computes derived pharmaco-
kinetic parameters from raw time-concentration data, including:
WinNonlin provides six noncompartmental models to support extravascular,
intravascular (IV) infusion or IV bolus dosing, for concentration data from
blood/plasma data (single dose and steady state) or urine (single dose only).
Additional available calculations include:
The general steps to set up noncompartmental analysis (NCA) include:
1. NCA model selection
2. Model variables
3. Lambda z estimation settings
4. Partial areas
Area under the curve (AUC)
Cmax, peak observed concentration
Tmax, time of peak concentration
Terminal elimination rate (beta)
Terminal half-life
Urinary excretion rate
AUC: Linear trapezoidal or Linear/
Logarithmic rule
Partial Areas under the curve
Derived parameters for parent drug
and metabolites, IV infusion and
bolus dosing, and other formulations
Dose adjustments (AUC/D)
Baseline response
Ratios or percent change from
baseline
Handling of endogenous data
WinNonlin
Users Guide
216
9
5. Dosing regimen
6. Model options
NCA model selection
To load a noncompartmental analysis model:
1. Open the worksheet containing data to be modeled, and select it as the active
worksheet (click on that worksheet to bring it to the front).
2. Start the PK/PD/NCA Analysis Wizard by clicking on that tool bar button or
selecting the command from the Tools menu.
3. Select the Noncompartmental radio button and click Next.
4. Select the appropriate NCA model for the data.
The plasma models can be used for either single-dose or steady-state data.
When using these models (200-202) with steady-state data, the computation
assumes equal dosing intervals (Tau) for each profile, and that the data are
from a final dose given at steady-state. Models 210-212 (urine concentra-
tions) assume single-dose data.
See Computational rules for WinNonlins noncompartmental analysis
engine on page 234 for details on the noncompartmental analysis calcula-
tions.
Table 9-1. Noncompartmental analysis models
Model Type of data Input Constants required
Model 200 Plasma or blood Extravascular Dose, Time of last dose, (Tau)
Model 201 Plasma or blood Bolus IV Dose, Time of last dose, (Tau)
Model 202 Plasma or blood Constant infusion Dose, Length of infusion, Time of last
dose, (Tau)
Model 210 Urine Extravascular Dose, Time of last dose
Model 211 Urine Bolus IV Dose, Time of last dose
Model 212 Urine Constant infusion Dose, Time of last dose
Noncompartmental Analysis
Model variables
217
9
5. Click Next.
6. Confirm that the correct model is selected, and click Finish to load the model.
The model window will open with a sample graph.
Model variables
To specify data columns for each model variable in a noncompartmental analysis:
1. After NCA model selection, open the Data Variables dialog (Model>Data
Variables).
2. For plasma models, drag and drop columns to assign variables to be modeled:
X: the independent variable, generally time.
Y: the dependent variable, i.e., observed values of interest, such as plasma
concentration of drug.
3. For urine models, drag and drop columns to assign variables to be modeled:
Concentration: the dependent variable, drug concentration in urine.
Volume: the volume of urine collected per time interval.
Lower times: the starting times for individual collection intervals
WinNonlin
Users Guide
218
9
Upper times: the ending times for individual collection intervals
Note: WinNonlin computes the midpoint of each collection interval and the excre-
tion rate for each (amount eliminated per unit of time) for urine models.
4. Drag and drop to specify the following (optional):
Sort Variable(s): categorical variable(s) identifying individual data pro-
files, e.g., subject ID, or treatment in a crossover study. A separate analy-
sis is done for each unique combination of sort variable values.
Carry Along Variables: data to be copied into the analysis output work-
book.
Note: The output data set will automatically include, in addition to the output vari-
ables, the original values of the Sort variable(s) and variables being modeled
(X and Y for plasma models or midpoint and rate for urine models).
5. Click OK.
Lambda z estimation settings are the next step in setup of a noncompartmental
analysis.
Lambda z estimation settings
WinNonlin will attempt to estimate the rate constant,
z
, associated with the
terminal elimination phase. Noncompartmental parameters will be estimated
using linear or linear/log trapezoidal rule, as selected in the Model Options
(see Model options on page 225). If
z
can be estimated, the calculated
parameters will be extrapolated to infinity.
Lambda z range selection
The user may specify the data points to be included in the calculation of
z
or
choose that
z
not be estimated (See Setting Lambda z ranges on page 220).
If neither of these options is selected, WinNonlin determines the data points to
be included, as follows. During the analysis, WinNonlin repeats regressions
using the last three points with non-zero concentrations, then the last four
points, last five, etc. Points prior to Cmax or prior to the end of infusion are
not used unless the user specifically requests that time range. Points with a
Noncompartmental Analysis
Lambda z estimation settings
219
9
value of zero for the dependent variable are excluded. For each regression, an
adjusted R
2
is computed:
where n is the number of data points in the regression and R
2
is the square of
the correlation coefficient.
The regression with the largest adjusted R
2
is selected to estimate
z
, with
these caveats:
If the adjusted R
2
does not improve, but is within 0.0001 of the largest
adjusted R
2
value, the regression with the larger number of points is used.
z
must be positive, and calculated from at least three data points.
Calculation of Lambda z
Once the time points being used in the regression have been determined, Win-
Nonlin can estimate
z
by performing a regression of the natural logarithm of
the concentration values in this range on sampling time.
z
is defined as:
z
= -1 (estimated slope)
Note: Using this methodology, WinNonlin will almost always compute an estimate
for
z
. It is the users responsibility to evaluate the appropriateness of the esti-
mated value.
Limitations of Lambda z estimation
There are a number of instances in which it is not possible for WinNonlin to
estimate
z
(see below). In these instances, parameters that do not depend on
z
(i.e. Cmax, Tmax, AUClast, etc.) will still be reported. In these instances,
the software will issue a warning in the text output, indicating that
z
was not
estimable:
There are only two observations after eliminating missing values and the
user requested automatic range selection for
z
.
The user has supplied bounds, but the lower bound was greater than the
last non-missing data point.
Adjusted R
2
1
1 R
2
( ) n 1 ( )
n 2 ( )
------------------------------------------- =
WinNonlin
Users Guide
220
9
Automatic range selection is activated, but there are fewer than 3 positive
concentration values at or after the Cmax of the profile.
For infusion data, automatic range selection is activated, and there are
fewer than 3 points at or after the infusion stop time.
The time difference between the first and last data points in the estimation
range used is approximately < 1e-10.
Setting Lambda z ranges
To set the
z
range for each profile:
1. Open the Lambda z Ranges tab of the Model Properties dialog
(Model>Lambda z Ranges).
A plot is available for each data profile. Individual profiles are defined by the
Sort variable(s) specified in Model variables on page 217.
2. Select the axis scale for the graphical representation: Linear or Log Linear.
3. To move between profiles, use the arrow buttons directly below the plot.
4. Define the terminal elimination phase for each profile (optional) as follows. If
these are not set, WinNonlin will determine the data points to be used as
described under Lambda z range selection on page 218.
Noncompartmental Analysis
Partial areas
221
9
a. Select the first data point to be included: left-click on a data point or enter
a time value under Start time.
b. Select the last data point to be included: hold down the Shift key while
left-clicking on a data point or enter a time value under End time.
Note: The units for Start and End time are those of observation times in the data set.
5. Exclusions (optional): to exclude a data point from the
z
calculations, hold
down the Ctrl key and left-click on that point. Repeat to reverse an exclusion.
6. Curve stripping can be disabled for all profiles by checking Disable Curve
Stripping at the bottom left. With this option checked:
z
will not be estimated.
Parameters that are extrapolated to infinity will not be calculated.
Note: To disable curve stripping for one or more individual profiles, rather than for
all profiles, enter a start time that is greater than the last time point in the pro-
file, and an end time greater than the start time.
7. When done, click Apply to save the settings and move to another tab of the
Model Properties dialog. To save the settings and close the dialog, click OK.
Loading Lambda z Ranges from an ASCII file
The Load and Save buttons make it possible to store Lambda z time ranges to
an external ASCII data file, and reload those settings for reuse.
Partial areas
Up to 126 partial areas can be computed per profile. Partial areas are included
by setting start and end times for each desired time interval. The start and end
times need not appear on the data set, and can be later than the last observed
time, if
z
is estimable. See Partial areas on page 236 for further informa-
tion on partial area computations.
To specify the partial areas to be calculated:
1. Select Model>Partial Areas from the menus or click on the Partial Areas
tool bar button.
WinNonlin
Users Guide
222
9
2. Enter the start time in the cell labeled AUC1 Lower, and the end time in the
cell labeled AUC1 Upper.
3. For another partial area (AUC2L, AUC2U, etc.), repeat this step.
4. Repeat steps 2 and 3 for other profiles or use the fill-down method (drag bot-
tom right corner of selected cells) to copy from one profile to those below.
Note: Different partial areas can be computed for each profile.
5. To compute time spent within a therapeutic concentration range, and AUCs
for said time periods, check Therapeutic Response Window. Enter the upper
(optional) and lower concentrations delimiting the therapeutic range. See
Therapeutic response window below for calculation details.
6. Click OK.
The Save button stores the Lambda z settings to an external ASCII file.
Therapeutic response window
The therapeutic response window specifies the lower and upper concentra-
tions for therapeutic range (response window). When this option is checked,
WinNonlin computes additional parameters to be included in the Final Param-
eters table of the NCA output. The parameters computed differ depending
Noncompartmental Analysis
Dosing regimen
223
9
whether the user enters values for both the lower concentration field (lower)
and upper concentration field (upper), or only for the lower concentration.
If both values are entered, the output includes the parameters listed in the top
two rows of Table 9-2 below. If only one concentration value is specified, the
therapeutic response window function reports output below and above this
value. WinNonlin sets the upper concentration field to twice Cmax (maximum
concentration) so that the calculated output is that reported in the third row of
Table 9-2. See Therapeutic windows on page 237 for further details on ther-
apeutic response window computations.
Dosing regimen
Models 200 to 202 (Plasma) in the WinNonlin library assume that data were
taken after a single dose, or after a final dose given at steady state. For steady
Table 9-2. Therapeutic window output
Input
values
Time range for
computation
Parameter Description
Lower and
upper
from dosing time
to last observation
TimeLow
TimeDuring
TimeHigh
AUCLow
AUCDuring
AUCHigh
total time below lower limit
total time between lower limit and upper limit
total time above upper limit
AUC for time below lower limit
AUC for time between lower limit and upper limit
AUC for time above upper limit
Lower and
upper
from dosing time
to infinity using
z
(if
z
exists)
TimeInfDuring
TimeInfHigh
AUCInfLow
AUCInfDuring
AUCInfHigh
total time between lower limit and upper limit
total time above upper limit
AUC for time below lower limit
AUC for time between lower limit and upper limit
AUC for time above upper limit
Lower only from dosing time
to last observation
TimeLow
TimeHigh
AUCLow
AUCHigh
total time below lower limit
total time above lower limit
AUC for time below lower limit
AUC for time above lower limit
Lower only from dosing time
to infinity using
z
(if
z
exists)
TimeInfHigh
AUCInfLow
AUCInfHigh
total time (extrapolated to infinity) above lower limit
AUC for time (extrapolated to infinity) below lower limit
AUC for time (extrapolated to infinity) above lower limit
WinNonlin
Users Guide
224
9
state data, WinNonlin also assumes equal dosing intervals. Models 210 to 212
(urine) assume single-dose data.
To enter the dosing information:
1. Choose Model>Dosing Regimen from menus or click the Dosing Regimen
tool bar button. The Dosing Regimen tab of the Model Properties dialog
opens.
It is possible to save dosing information to an external ASCII file for reuse,
using the Save button. The Load button reloads this file.
To enter single dose information:
1. Enter the dosing constant(s) requested, in the column labeled Value.
2. Enter dosing constants for each level of the sort variable(s), if applicable.
3. Set the dosing units. See Dosing units on page 122 for details.
4. Click Apply or OK.
To enter steady state information (plasma data only):
1. In the Dosing Regimen tab of the Model Properties dialog click the Steady
State check box. The list of constants in the spreadsheet changes.
Noncompartmental Analysis
Model options
225
9
2. Enter the dose.
3. If the last dose was given at a time other than 0, enter the time of the last dose
in the Time of Last Dose entry box.
4. Enter the dosing interval (Tau).
5. Set the dosing units. See Dosing units on page 122 for details.
6. Click Apply or OK.
Rules for handling of steady-state data
When using steady-state data, WinNonlin computes AUC0-tau based on the
tau that the user specifies. However, in most studies, there will be sampling
time deviations. That is, if tau=24, the last sample might be at 23.975 or
24.083 hours. In this instance, the program will estimate the AUC based on
the estimated concentration at 24 hours, and not the actual concentration at
the time deviation.
For steady state data, Cmax, Tmax, Cmin and Tmin are found from points at
or after the dosing time, but no later than dosing time+tau, where tau is the
dosing interval.
Model options
Options for NCA model output are divided into the following groups:
Table 9-3. NCA model options
Category Options
Output options Workbook, chart, and/or ASCII text formats for modeling results
Weight Uniform or weighted least squares
Title Text title for workbook, ASCII and chart output
NCA settings Method for computing area under the curve, and format of final
parameters worksheet
Units Default units for output parameters
Parameter names Option to set the variable names for final model parameters
WinNonlin
Users Guide
226
9
To set NCA model options:
1. Select Model>Model Options from the WinNonlin menus or click on the
Model Options tool bar button. The Model Options dialog box appears.
Figure 9-1. The Model Options dialog, output options for NCA
2. Click on a tab to select and adjust a group of options from those in Table 9-3.
3. Click Apply (to set options and keep the dialog open) or OK.
Output options
After noncompartmental analysis is run, one or more new windows is gener-
ated, with content as selected in the following NCA Model options.
Note: The default output options are set via Tools>Options in the WinNonlin menus.
Exclude profiles with insufficient data
If this option is checked, profiles with all or many missing parameter esti-
mates are excluded from the results. If it is not checked, profiles with insuffi-
cient data will generate output with missing parameter values. The cases in
which parameters are reported as missing are also discussed under Data defi-
ciencies that will result in missing values for PK parameters on page 235.
The following cases will be excluded:
Noncompartmental Analysis
Model options
227
9
Workbook
This option selects whether to generate a workbook containing the output.
The NCA workbook contains several worksheets summarizing the results.
These worksheets present the same information as the ASCII output, but in a
more convenient form for use in further analyses.
Chart
If workbook output is selected, output charts are available. The NCA Chart
window provides a plot of observed versus predicted data for each profile.
Profile issue(s) Parameters reported as missing
Profile includes only one or no observations all final parameters
Blood/plasma data with no non-zero observation values All final parameters except Cmax,
AUClast, AUCall, AUMClast
Blood/plasma data with all zero values except one non-
zero value at dosing time
all final parameters
Urine data with urine volumes equal to zero all final parameters
Urine data with concentration values equal to zero All final parameters except
Max_Rate, Amount_Recovered,
Percent_Recovered
Table 9-4. Summary of NCA worksheets
Sheet name Contents
Final Parameters Estimates of the final parameters for each level of the sort variable
Dosing The dosing regimen for the analysis
Summary Table The sort variables, X, points included in the regression for
z
,Y, pre-
dicted Y for the regression, residual for the regression, AUC, AUMC
and weight used for the regression
Partial Areas See Partial areas on page 221.
User Settings User defined settings
WinNonlin
Users Guide
228
9
Text
This option provides an ASCII text version of the output, containing the same
information as the workbook output. It is often used for reporting and
archiving analyses. Modeling errors are also reported in this file. This output
can be used for reporting, and is also very useful for archiving analyses. The
NCA text window contains an ASCII form of the analysis results. The text
output contains the same information as the workbook output. This window
will only appear if Text output was selected on the Output Options tab in the
Modeling Options dialog, or if an error occurs in the calculations.
Page Breaks
This check box turns page breaks in the ASCII output on or off.
Output intermediate calculations
If this option is checked, the text output for the next analysis only will include
values for iterations during estimation of
z
, and for each of the sub-areas
from partial area computations, as shown below.
Noncompartmental Analysis
Model options
229
9
Weight
For noncompartmental analysis, the selections made on the Weight tab of the
Model options dialog apply to the regression used to estimate
z
.
Note that it is not the weights themselves that are important; rather it is the
relative proportions of the weights. See Weighting on page 325 for discus-
sion of weighting schemes.
CAUTION: When a log-linear fit is done, it already uses weighting implicitly, approxi-
mately equal to 1/Yhat
2
.
To use uniform weighting:
1. Select the Pre-selected Scheme radio button.
2. Select Uniform Weighting from the pull-down list.
To use weighted least squares:
1. Select Observed to the Power n button.
2. Enter the value of n in the entry box provided.
3. Use the Pre-selected scheme button to select the most common weighted
least square options: 1/Y and 1/Y
2
.
WinNonlin
Users Guide
230
9
Note: When weighting by 1/Y and using the Linear/Log trapezoidal rule, one could
argue that the weights should be 1/LogY, rather than 1/Y. However, if this
were the case, concentrations between 0 and 1 would have negative weights,
and therefore could not be included.
Title
A title can be displayed at the top of each printed page in ASCII text output.
The title is also included on the User Settings worksheet in the workbook out-
put, at the top of each chart in chart output.
To include a title:
1. Make sure that Title Text is checked on the Title tab of the Model options dia-
log. If it is not, the title will not display even if text is entered below.
2. Enter the title text below. To include a line break use Shift + Enter. The title
will be centered on the page.
NCA settings
Calculation methods for AUC
Four methods are available for the calculation of area under the curve, in the
NCA Settings tab of the Model options dialog. The method chosen applies to
all AUC, AUMC, and partial area computations. All methods reduce to the
Noncompartmental Analysis
Model options
231
9
log trapezoidal rule and/or linear trapezoidal rule, but differ with regard to
when these rules are applied.
Linear Trapezoidal rule (Linear Interpolation) [default]. This method
(method 2 in Command Files) uses the linear trapezoidal rule, given
below, applied to each pair of consecutive points in the data set that have
non-missing values, and sums up these areas. If a partial area is selected
that has an endpoint that is not in the data set, then the linear interpolation
rule, given below, is used to inject a concentration value for that endpoint.
Linear Trapezoidal Method with Linear/Log Interpolation (method 4). As
above except that if a partial area is selected that has an endpoint that is
not in the data set: the linear interpolation rule is used to inject a concen-
tration value for that endpoint if the endpoint is before Cmax; the loga-
rithmic interpolation is used after Cmax. If Cmax is not unique, then the
first occurrence of Cmax is used.
Linear/Log Trapezoidal Method (method 1). Uses the linear trapezoidal
rule up to Cmax and then the log trapezoidal rule for the remainder of the
curve. If Cmax is not unique, then the first occurrence of Cmax is used.
Linear interpolation is used up to Cmax for injecting points for partial
areas, and logarithmic interpolation is used after Cmax.
Linear Up/Log Down Method (method 3). The linear trapezoidal rule is
used any time that the concentration data is increasing, and the logarith-
mic trapezoidal rule is used any time that the concentration data is
decreasing. Points for partial areas are injected using the linear interpola-
tion rule if the surrounding points show that concentration is increasing,
and the logarithmic interpolation rule if the concentration is decreasing.
See AUC calculation and interpolation formulas on page 235 for equations
applied in these computations.
Note: Both the Linear/Log Trapezoidal and the Linear Up/Log Down method have
the same exceptions with regard to the area calculation method used: If a con-
centration is less than or equal to zero, the program defaults to the linear trap-
ezoidal method for that point. If the concentration values are equal to each
other, then program also defaults to the linear trapezoidal rule.
Transpose Final Parameter Table
Transpose Final Parameter Table, if checked, will create a Final Parameters
worksheet with one column for each statistic of each parameter. A second
WinNonlin
Users Guide
232
9
worksheet called Non-transposed Final Parameters will present one row for
each parameter and one column for each type of statistic. If the Transpose
Final Parameters option is not checked, the Final Parameters worksheet will
present the untransposed format, and the second worksheet, entitled Trans-
posed Final Parameters, will present the transposed version. This option is
provided primarily for WinNonlin scripts that depend on one format or the
other in the Final Parameters worksheet. See Transpose final parameter
table on page 262 for example output compartmental modeling.
Units
Select the preferred units for the output. The Units dialog lists default units for
output parameters. When preferred units are specified on the Units tab of the
Model options dialog (below), WinNonlin makes the necessary conversions to
display the output in the preferred units.
Note: Before preferred units can be entered, units must be set for the X-variable, Y-
variable, and, for plasma models, the Dosing Regimen. The units for the X-
variable and Y-variable are read in from the data set.
To set a preferred unit:
1. Enter the unit under Preferred for the appropriate row. The units cannot con-
tain space characters. WinNonlin will convert output values to use this unit.
2. Click Apply or OK.
Noncompartmental Analysis
Model options
233
9
Note: Preferred Units can be set only if the units are already set for the X-variable,
Y-variable, and, for plasma models, dosing.
Preferred units can be saved as a template for units (an ASCII data file) then
loaded back for later modeling using the Save and Load buttons.
Parameter names
For noncompartmental analyses (NCA) only, WinNonlin provides the option
to set the variable names for the final model parameters. These names cannot
contain space characters.
Preferred parameter names can be saved to an external file for reuse. As the
parameters vary by model and depending whether the dosing is at steady state,
save parameter names for specific models to different files, for example:
model200.nam model200SS.nam
model201.nam model201SS.nam
model202.nam model202SS.nam modelurine.nam
WinNonlin also provides the option to include only a subset of final parame-
ters in NCA workbook output. Click on a cell under Include in Workbook to
toggle between Yes (include parameter in that row) and No (exclude).
WinNonlin
Users Guide
234
9
Computational rules for WinNonlins noncompartmental analysis engine
Data checking and pre-treatment
Prior to calculation of pharmacokinetic parameters, WinNonlin institutes a
number of data-checking and pre-treatment procedures as follows.
Sorting
Prior to analysis, each pharmacokinetic profile is sorted in ascending order
with regard to time. (A profile is identified by each unique value or combina-
tion of values for the sort variable(s).)
Insertion of initial time points
If a PK profile does not contain an observation for the dosing time, WinNon-
lin automatically inserts such a point based on the following rules:
For extra-vascular and infusion models, the value of the inserted point
will depend upon whether the data is from a single dose profile, or was
sampled at steady-state. For single dose data, a concentration value of
zero will be used. In the case of steady-state the minimum value observed
during the dosing interval will be used.
For IV bolus data, the same rule will be used for both single-dose and
steady-state data. Generally, the program will perform a log-linear regres-
sion of first two data points to back-extrapolate C0. However, in the
instance that the regression yields a slope >= 0 or at least one of the first
two y-values is 0, then the first observed positive y-value will be used as
an estimate for C0.
Data exclusions
WinNonlin will automatically exclude unusable points from NCA analysis.
Missing values: For plasma models, if either the X-value or the Y-value is
missing, then the associated record is excluded from the NCA analysis.
For urine models, records with missing values for any of the following
will be similarly excluded: collection interval start time; collection inter-
val stop time; drug concentration; or collection volume.
Data points preceding the dose time: If the time value for a data point is
earlier than the dosing time, then the point is excluded from the NCA
Noncompartmental Analysis
Computational rules for WinNonlins noncompartmental analysis engine
235
9
computations. For urine models, the lower time point is checked. Note
that the dosing time must be non-negative.
Data points for urine models: In addition to the rules described above, for
urine models if the lower time is greater than or equal to the upper time,
or if the concentration or volume is negative, then the user will be
required to correct the data before NCA computations can be done.
Data deficiencies that will result in missing values for PK parameters
There are a number of cases in which WinNonlin will report missing values
for most PK parameters:
The number of non-missing data points is <=1. For definitions of what
constitutes a Missing Value, please see the relevant section above.
A urine profile has values for collection volumes or concentration values
that are all zero.
A plasma concentration profile has either concentration values that are all
zero, or only one non-zero concentration at the dosing time.
Multiple observations at the same time point
For noncompartmental analysis, WinNonlin only permits one observation at
each time point within a profile. If the software detects more than one such
point, the NCA analysis is halted, and an error message is issued. No PK out-
put is generated in this instance.
AUC calculation and interpolation formulas
The computational formulas for area under the curve calculations and interpo-
lation follow.
Linear trapezoidal rule
AUC
t
1
t
2
t
C
1
C
2
+
2
------------------- =
AUMC
t
1
t
2
t
t
1
C
1
t
2
C
2
+
2
--------------------------------------- =
WinNonlin
Users Guide
236
9
Logarithmic trapezoidal rule
where t is (t
2
-t
1
).
Linear interpolation rule (to find C* at time t*)
Logarithmic interpolation rule
Partial areas
Rules for interpolation and extrapolation
Generally speaking partial areas are calculated using the rules described under
AUC calculation and interpolation formulas on page 235 and Calculation
methods for AUC on page 230. However, there are several rules for handling
cases in which some portion of the partial area falls after the last positive con-
centration value:
If a starting or ending time occurs before the first data observation, the
corresponding Y value is interpolated between the first data point and the
value used as C0. C0=0 except in IV bolus models (model 201), where C0
is the dosing time intercept estimated by the program, and except for
models 200 and 202 at steady state, where C0 is the minimum value
between dosing time and tau.
AUC
t
1
t
2
t
C
2
C
1
ln
C
2
C
1
------
\ .
| |
------------------
=
AUMC
t
1
t
2
t
t
2
C
2
t
1
C
1
ln
C
2
C
1
------
\ .
| |
--------------------------------------- t
2
C
2
C
1
ln
C
2
C
1
------
\ .
| |
2
------------------- =
C* C
1
t* t
1
t
2
t
1
---------------
C
2
C
1
( ) + =
C* C
1
( )
t* t
1
t
2
t
1
---------------
C
2
( ) ln C
1
( ) ln ( ) + ln
\ .
| |
exp =
Noncompartmental Analysis
Computational rules for WinNonlins noncompartmental analysis engine
237
9
If a starting or ending time occurs within the range of the data but does
not coincide with an observed data point, then a linear or logarithmic
interpolation is done to estimate the corresponding Y, according to
whether the linear trapezoidal rule, the linear/log trapezoidal rule, or the
Linear up/Log down trapezoidal rule was selected in the Model Options
dialog box.
If a starting or ending time occurs after the last observation (Tlast) and
lambda z is estimable, lambda z is used to estimate the corresponding Y:
Y = exp(alpha Lambda-Z * t)
= exp(alpha Lambda-Z * tlast) * exp(Lambda-Z * (t-tlast))
= (predicted concentration at tlast) * exp(Lambda-Z * (t-tlast))
If a starting or ending time occurs after the last data observation and
lambda z is not estimable, the partial area will not be calculated.
If both the start and end times for a partial area occur after the last data
observation, then the log trapezoidal rule will be used regardless of the
selection made, because a logarithmic decline must be assumed in order
to obtain the predicted values.
If the start time for a partial area is before the last data observation and the
end time is after the last data observation, then the log trapezoidal rule
will be used for the area from the last data observation time to the end
time for the partial area, regardless of the selection made.
Partial area boundaries
There are limitations regarding partial area boundaries that will evoke an error
message from the software: The end time for the partial area must be greater
than the start time. Both the start and end time for the partial area must be at or
after the dosing time.
Therapeutic windows
For therapeutic windows, one or two boundaries for concentration values can
be given, and the program computes the time spent in each window deter-
mined by the boundaries and computes the area under the curve contained in
each window. To compute these values, for each pair of consecutive data
points, including the inserted point at dosing time if there is one, it is deter-
WinNonlin
Users Guide
238
9
mined if a boundary crossing occurred in that interval. Call the pair of time
values from the data set (t
i
, t
i+1
) and called the boundaries y
lower
and y
upper
.
If no boundary crossing occurred, the difference t
i+1
t
i
is added to the appro-
priate parameter TimeLow, TimeDur, or TimeHgh, depending on which win-
dow the concentration values are in. The AUC for (t
i
, t
i+1
) is computed
following the users specified AUC calculation method as described above in
section 3. Call this AUC*. The parts of this AUC* are added to the appropri-
ate parameters AUCLow, AUCDur, or AUCHgh. For example, if the concen-
tration values for this interval occur above the upper boundary, the rectangle
that is under the lower boundary is added to AUCLow, the rectangle that is
between the two boundaries is added to AUCDur and the piece that is left is
added to AUCHgh. This is equivalent to these formulae:
AUCLow = AUCLow + y
lower
* (t
i+1
t
i
)
AUCDur = AUCDur + (y
upper
y
lower
) * (t
i+1
t
i
)
AUCHgh = AUCHgh + AUC* y
upper
* (t
i+1
t
i
)
If there was one boundary crossing, an interpolation is done to get the time
value where the crossing occurred; call this t*. The interpolation is done by
either the linear rule or the log rule following the users AUC calculation
method as described above in section 3, i.e., the same rule is used as when
inserting a point for partial areas. To interpolate to get time t* in the interval
(t
i
, t
i+1
) at which the concentration value is y
w
:
Linear interpolation rule for time:
t* = t
i
+ [ (y
w
y
i
) / (y
i+1
y
i
) ] * (t
i+1
t
i
)
Log interpolation rule for time:
t* = t
i
+ [ (ln(y
w
) ln(y
i
) ) / ( ln(y
i+1
) ln(y
i
) ) ] * (t
i+1
t
i
)
The AUC for (t
i
, t*) is computed following the users specified AUC calcula-
tion method. The difference t* t
i
is added to the appropriate time parameter
and the parts of the AUC are added to the appropriate AUC parameters. Then
the process is repeated for the interval (t*, t
i+1
).
If there were two boundary crossings, an interpolation is done to get t* as
above for the first boundary crossing, and the time and parts of AUC are
added in for the interval (t
i
, t*) as above. Then another interpolation is done
from t
i
to t
i+1
to get the time of the second crossing t** between (t*, t
i+1
), and
Noncompartmental Analysis
Computational rules for WinNonlins noncompartmental analysis engine
239
9
the time and parts of AUC are added in for the interval (t*, t**). Then the
times and parts of AUC are added in for the interval (t**, t
i+1
).
The extrapolated times and areas after the last data point are now considered
for the therapeutic window parameters that are extrapolated to infinity. For
any of the AUC calculation methods, the AUC rule after tlast is the log rule,
unless an endpoint for the interval is negative or zero in which case the linear
rule must be used. The extrapolation rule for finding the time t* at which the
extrapolated curve would cross the boundary concentration y
w
is:
t* = (1/lambdaZ) * (alpha ln(y
w
)).
If the last concentration value in the data set is zero, the zero value was used
in the above computation for the last interval, but now ylast is replaced with
the following if Lambda z is estimable:
ylast = exp(alpha lambdaZ * tlast). (only if the last concentration was zero)
If ylast is in the lower window: InfDur and InfHgh values are the same as Dur
and Hgh values. If lambdaZ is not estimable, AUCInfLow is missing. Other-
wise, AUCInfLow = AUCLow + ylast / lambdaZ.
If ylast is in the middle window for two boundaries: InfHgh values are the
same as Hgh values. If lambdaZ is not estimable, InfLow and InfDur parame-
ters are missing. Otherwise: Use the extrapolation rule to get t* at the lower
boundary concentration. Add time from tlast to t* into TimeInfDur. Compute
AUC* from tlast to t*, add the rectangle that is under the lower boundary into
AUCInfLow, and add the piece that is left into AUCInfDur. Add the extrapo-
lated area in the lower window into AUCInfLow. This is equivalent to:
t* = (1/lambdaZ) * (alpha ln(y
lower
))
TimeInfDur = TimeDur + (t* tlast)
AUCInfDur = AUCDur + AUC* y
lower
* (t* tlast)
AUCInfLow = AUCLow + y
lower
* (t* tlast) + y
lower
/ lambdaZ
If y
last
is in the top window when only one boundary is given, the above pro-
cedure is followed and the InfDur parameters become the InfHgh parameters.
If there are two boundaries and ylast is in the top window: If lambdaZ is not
estimable, all extrapolated parameters are missing; otherwise:
Use the extrapolation rule to get t* at the upper boundary concentration value.
Add time from tlast to t* into TimeInfHgh. Compute AUC* for tlast to t*, add
WinNonlin
Users Guide
240
9
the rectangle that is under the lower boundary into AUCInfLow, add the rect-
angle that is in the middle window into AUCInfDur, and add the piece that is
left into AUCInfHgh. Use the extrapolation rule to get t** at the lower bound-
ary concentration value. Add time from t* to t** into TimeInfDur. Compute
AUC** from t* to t**, add the rectangle that is under the lower boundary into
AUCInfLow, and add the piece that is left into AUCInfDur. Add the extrapo-
lated area in the lower window into AUCInfLow. This is equivalent to:
t* = (1/lambdaZ) * (alpha ln(y
upper
))
t** = (1/lambdaZ) * (alpha ln(y
lower
))
TimeInfHgh = TimeHgh + (t* tlast)
TimeInfDur = TimeDur + (t** t*)
AUCInfHgh = AUCHgh + AUC* y
upper
* (t* tlast)
AUCInfDur = AUCDur + (y
upper
y
lower
) * (t* tlast) + AUC** y
lower
* (t** t*)
AUCInfLow = AUCLow + y
lower
* (t* tlast) + y
lower
* (t** t*) + y
lower
/ lambdaZ
Computational details for pharmacokinetic parameters
Plasma data
Parameters that are estimated regardless of
z
estimation
C0 Initial concentration. Given only for bolus IV models. It is equal to the first observed con-
centration value if that value occurs at the dose time. Otherwise, it is estimated by back-
extrapolating from the first two concentration values according to the rules given under
Insertion of initial time points on page 234.
Dosing_time Time of last administered dose. This is assumed to be zero unless otherwise specified.
This is mainly used with steady-state data, which may code time as the time elapsed
since the first dose, or the elapsed time since the time of the first dose.
Tlag Tlag is the time prior to the time corresponding to the first measurable (non-zero) con-
centration. This is computed for plasma extravascular models and all urine models.
Tmax Time of maximum observed concentration. For non-steady-state data, the entire curve is
considered. For steady-state data, Tmax corresponds to points collected during a dosing
interval.
Cmax Maximum observed concentration, occurring at Tmax.
Tlast Time of last measurable (non-zero) concentration.
Noncompartmental Analysis
Computational rules for WinNonlins noncompartmental analysis engine
241
9
Parameters that are estimated when
z
is estimated
Parameters that are extrapolated to infinity are computed two ways. One
extrapolation is based on the last observed concentration, while the second
extrapolation is based on the last predicted concentration, where the predicted
value is based on the linear regression performed to estimate
z
.
Clast Concentration corresponding to Tlast.
AUClast Area under the curve from the time of dosing (Dosing_time) to the last measurable con-
centration.
AUCall Area under the curve from the time of dosing (Dosing_time) to the time of the last obser-
vation. If the last concentration is non-zero AUClast=AUCall. Otherwise, AUCall will be
greater than AUClast as it includes the additional area from the last measurable concen-
tration down to zero.
AUMClast Area under the moment curve from the time of dosing (Dosing_time) to the last measur-
able concentration.
MRTlast Mean residence time from the time of dosing (Dosing_time) to the time of the last mea-
surable concentration. For non-infusion models: MRTlast = AUMClast/AUClast. For infu-
sion models: MRTlast = (AUMClast/AUClast) - TI/2.
No_points_
Lambda_z
Number of points used in the computation of
z
. If
z
cannot be estimated, zero.
AUC_%Back_
Ext
Computed for Bolus IV models: the percentage of AUCINF that was due to back extrapo-
lation to estimate C(0). If C2<C1, the C(0) is estimated by log-linear regression of the first
two time points; otherwise, C(0) is set to C1.
Rsq Goodness of fit statistic for the terminal elimination phase.
Rsq_adjusted Goodness of fit statistic for the terminal elimination phase, adjusted for the number of
points used in the estimation of
z
.
Corr_XY Correlation between time (X) and log concentration (Y) for the points used in the esti-
mation of
z
.
Lambda_z First order rate constant associated with the terminal (log-linear) portion of the curve.
This is estimated via linear regression of time vs. log concentration.
Lambda_z_lower Lower limit on Time for values to be included in the calculation of
z
.
WinNonlin
Users Guide
242
9
Lambda_z_upper Upper limit on Time for values to be included in the calculation of
z
.
HL_Lambda_z
Terminal half-life
AUCINF AUC from the time of dosing (Dosing_time) extrapolated to infinity.
AUCINF/D AUCINF divided by the administered dose.
AUC_%Extrap Percentage of AUCINF that is due to extrapolation from Tlast to infinity =
AUMC_%Extrap Percent of AUMCINF that is extrapolated.
=
Vz, Vz/F**
(see note below)
Volume of distribution based on the terminal phase.
Cl, Cl/F **
(see note below)
Total body clearance for extravascular administration.
=Dose/AUCINF
AUMCINF Area under the first moment curve (AUMC) extrapolated to infinity.
MRTINF Mean residence time (MRT) extrapolated to infinity for non-infusion models.
MRTINF Mean residence time (MRT) extrapolated to infinity for infusion models.
Steady-state
Tau The (assumed equal) dosing interval for steady-state data.
( )
=
ln 2
Z
= + AUClast
Clast
Z
AUCINF AUClast
AUCINF
100
AUMCINF AUMClast
AUMCINF
100
Dose
AUCINF
Z
=
AUMCINF
AUCINF
( ) =
AUMCINF
AUCINF
TI
2
Noncompartmental Analysis
Computational rules for WinNonlins noncompartmental analysis engine
243
9
Tmin For steady-state data: time of minimum concentration based on samples collected dur-
ing a dosing interval.
Cmin For steady-state data: the minimum concentration between 0 and Tau (at Tmin).
Cavg For steady-state data: computed as AUC(0-Tau) divided by Tau.
%_Fluctuation For steady-state data: computed as 100*(Cmax-Cmin)/Cavg, where Cmin and Cmax
were obtained between 0 and Tau.
V
SS
For non steady-state or steady-state data: an estimate of the volume of distribution at
steady state (not computed for model 200), equal to: MRTINF*Cl.
Accumulation
Index
Clss, Clss/F For steady-state data: an estimate of the total body clearance.
Cmax For steady-state data: the maximum observed concentration between 0 and Tau.
MRTINF Mean residence time (MRT) extrapolated to infinity. For steady-state data, non-infusion
models:
=
MRTINF Mean residence time (MRT) extrapolated to infinity. For steady-state data, infusion
models:
=
V
z
, V
z
/F For steady-state data:
=
Dose
AUC
0
|
AUMC
0
AUCINF AUC
0
( ) +
AUC
0
-----------------------------------------------------------------------------------
AUMC
0
AUCINF AUC
0
( ) +
AUC
0
-----------------------------------------------------------------------------------
T1
2
------
=
Dose
AUC
Z
0
WinNonlin
Users Guide
244
9
Note: For extravascular models the fraction of dose absorbed cannot be estimated,
therefore Volume and Clearance for these models are actually Volume/F or
Clearance/F where F is the fraction of dose absorbed.
Urine data
Data structure
Noncompartmental analysis for urine data requires the following input:
Starting and ending time of each urine collection interval
Urine concentrations
Urine volumes
From this data WinNonlin computes the following variables for the analysis:
Midpoint of each collection interval
Excretion rate for each interval (amount eliminated per unit of time) =
(Concentration * Volume) / (Ending time - Starting time)
Parameters that are estimated regardless of Lambda-Z estimation
Dosing_time Time of the last administered dose. This is assumed to be zero
unless otherwise specified.
Tlag Time prior to the time corresponding to the first measurable (non-
zero) concentration. This is computed for all urine models.
Tmax_Rate Midpoint of collection interval associated with the maximum
observed excretion rate.
Max_Rate Maximum observed excretion rate.
Mid_Pt_last Midpoint of collection interval associated with last measurable
rate.
Rate_last Last measurable rate.
AURC_last Area under the urinary excretion rate curve from time 0 to the last
measurable rate.
Amount_Recovered Cumulative amount eliminated.
(Concentration * Volume)
Noncompartmental Analysis
Computational rules for WinNonlins noncompartmental analysis engine
245
9
Parameters that are estimated when
z
is estimated.
The following parameters are calculated only when
z
is estimated. All asso-
ciated extrapolations are done two ways: 1) based on the last observed con-
centration, and 2) based on the last predicted concentration.
Vol_UR Sum of Urine Volumes
Percent_Recovered 100*Amount_Recovered/Dose
AURC_all Area under the urinary excretion rate curve from time 0 to the last
rate. This equals AURC_last if the last rate is measurable.
No_points_lambda_z Number of points used in the computation of
z
.
Rsq Goodness of fit statistic for the terminal elimination phase.
Rsq_adjusted Goodness of fit statistic for the terminal elimination phase, adjusted
for the number of points used in the estimation of
z
.
Corr_XY Correlation between time (X) and log concentration (Y) for the points
used in the estimation of
z
.
Lambda_z Lambda z. First order rate constant associated with the terminal (log-
linear) portion of the curve. This is estimated via linear regression of
time vs. log concentration.
Lambda_z_lower Lower limit on Time for values to be included in the calculation of
z
.
Lambda_z_upper Upper limit on Time for values to be included in the calculation of
z
.
HL_Lambda_z
Terminal half-life
AURC_INF Area under the urinary excretion rate curve extrapolated to infinity.
AURC_%Extrap Percent of AURC_INF that is extrapolated.
( )
=
ln 2
Z
WinNonlin
Users Guide
246
9
247
Chapter 10
Compartmental Modeling
Using WinNonlins library of compiled and ASCII
models
Compartmental modeling setup in WinNonlin involves:
1. Loading the model
2. Model properties
3. Output
See WinNonlin Model Libraries on page 573 for details on each compart-
mental model.
Loading the model
The WinNonlin mode library contains two types of models: one is compiled
into machine language; the other is stored in ASCII text.
To load a model:
1. Open the data set to which the model will be fit.
2. Click on the PK/PD/NCA Analysis Wizard button on the tool bar, or choose
Tools>PK/PD/NCA Analysis Wizard from the WinNonlin menus.
3. If there is more than one workbook open in WinNonlin, make sure that the
input data set is selected in the data set field at the top of the dialog.
Note: Hidden data sets do not show in the list box. Therefore, if the data set to be
used for modeling has been hidden, it must first be unhidden.
WinNonlin
Users Guide
248
10
4. Select the type of model to load from among the following.
Table 10-1. WinNonlin model types
Model type Description
Models for Noncom-
partmental Analysis
Support for blood (plasma) or urine data for IV infusion, IV bolus, and
first-order inputs.
Pharmacokinetic
models
WinNonlin includes nineteen pharmacokinetic (PK) models, including
1 to 3 compartment models with 0
th
or 1
st
order absorption, with or
without a lag time to the start of absorption.
Pharmacodynamic
models
WinNonlin includes eight pharmacodynamic (PD) models, including
variations on Emax and Sigmoid Emax models.
PK/PD link models WinNonlin's pharmacokinetic/pharmacodynamic (PK/PD) link mod-
els can use any combination of compiled PK and PD models. They
treat the pharmacokinetic parameters as fixed and generate concen-
trations at the effect sites to be used by the PD models.
Indirect response
models
WinNonlin provides four indirect response models, based on mea-
sured drug effect (inhibition or stimulation of response) and parame-
ters defining either the build-up or dissipation of that effect. These
models can be based on any WinNonlin PK model, and are available
only as compiled models.
Michaelis-Menten
models
WinNonlin provides four Michaelis-Menten (saturable elimination)
models, which are stored as ASCII library files in WIN-
NONLN\LIB\MM.LIB.
Compartmental Modeling
Model properties
249
10
Note: Only one model may be loaded in WinNonlin at a time.
5. If Pharmacokinetic or Pharmacodynamic modeling is selected, specify
whether to use an ASCII or a Compiled model. Compiled models run faster.
6. Click Next.
7. Select the specific model or, for ASCII models, model file and number, and
any associated settings. See also Loading an existing ASCII user model on
page 300 and Using compiled user models in a command file on page 307.
8. Click Next.
9. For compiled user models, it is necessary to enter the number of algebraic and
differential equations (if any; else, un-check this option) in the model, and
enter each estimated and secondary parameter. To ascertain this information,
look at the code from which the user model .DLL was compiled.
10. The Selection Summary dialog appears, with a description of the model. Click
Finish to load the selected model.
Model properties
Once the model has been loaded as described under Loading the model on
page 247, some or all of the following information must be supplied:
Data variables
Model parameters and initial parameter estimates
Dosing regimen (when appropriate)
Simultaneous PK/PD
link models
WinNonlin provides a library of link models that simultaneously fit PK
and PD data. Each includes a different PK model combined with PD
model 105. These models are stored as ASCII library models in
WINNONLN\LIB.
User Models Custom models can be written and saved to an ASCII text file, or
compiled using C++ or FORTRAN, then loaded into WinNonlin using
this option.
Command Files Command files can load ASCII or compiled user models.
Table 10-1. WinNonlin model types (continued)
Model type Description
WinNonlin
Users Guide
250
10
Model options to set the output types, computational algorithms and pre-
ferred units
Data variables
Compartmental Modeling requires that the data variables be selected before
any other settings are made.
To specify the roles of data columns in the model:
1. Select the X (or independent) variable in the Variables list and drag it to the
X-Variable field.
2. Select the Y variable (or dependent), and drag it to the Y-Variable field.
3. Simulations: No Y-variable is needed for simulations; instead check the Sim-
ulate Data check box.
4. Select Sort Variable(s) (optional) that identify individual data profiles, for
example, Subject and Treatment for a crossover study. A separate analysis
will be done for each level of the sort variables.
5. Select Carry Along Variables (optional) to include additional variables in the
analysis output. For example, Study Number or Gender might be included as a
carry-along variable to make it available for post-modeling analyses.
6. Select a Function Variable (optional). When fitting multiple functions, the
function variable tells WinNonlin which data observations go with which
function. For example, the data set may include data on two compartments
for example, plasma and urine. The function variable might have the value 1
for observations belonging to the plasma data, and a value of 2 for the data
observations belonging to the urine data.
Note: The data observations corresponding to the first (sorted) value of the function
variable will be used with the first function; those corresponding to the second
value are used with the second function, etc.
Model parameters
All iterative estimation procedures require initial estimates of the parameters.
For some types of models WinNonlin is capable of producing these initial
estimates; for others, initial estimates are required.
Compartmental Modeling
Model properties
251
10
For single-dose compiled PK models, PD models, or PK/PD link models,
WinNonlin can compute initial estimates using curve stripping. For all other
situations, the user must supply initial estimates or provide boundaries to be
used by WinNonlin to create initial estimates via grid search.
Initial estimates and parameter boundaries are specified through the Model
Parameter tab of the Model properties dialog.
To set up the initial parameter estimates:
1. Select Model>Model Parameters from the menus or click on the Model
Parameters tool bar button. The Model Parameter tab of the Model Proper-
ties dialog appears.
2. Specify the type of Parameter Calculation. The options are:
User Supplied Initial Parameter Values. Enter the initial estimates in
the column labeled Initial.
WinNonlin Generated Initial Parameter Values. When WinNonlin
Generated Initial Parameter Values has been selected in the Parameter
Calculation group box, and WinNonlin Bounds in the Parameter Bound-
aries group box, WinNonlin will curve strip for initial estimates then pro-
duce boundaries on the model parameters for model fitting. In this case, if
curve stripping fails, the program will terminate, as WinNonlin will be
unable to grid search for initial estimates.
For WinNonlin Generated Initial Parameter Values and User-Sup-
plied Bounds WinNonlin will do curve stripping then grid search
if that fails.
Propagate Final Estimates. The Propagate Final Estimates option is
available when sort keys are being used. When Propagate Final Estimates
is chosen, initial estimates are input, or calculated only for the first sort
level. The final estimates from each sort level are used as the initial esti-
mates for each successive level. Initial estimates and boundaries entered
for profiles other than the first profile will be ignored.
3. Specify the Parameter Boundaries. Parameter boundaries are used not only as
a basis for grid searching but also during modeling. The values input for
Lower and Upper limit the range of values that the parameters can take on
during the model-fitting process. This can be very valuable if the parameter
values become unrealistic or the model won't converge. It is generally recom-
mended that boundaries be routinely used. When they are used, every param-
WinNonlin
Users Guide
252
10
eter must be given bounds and both Upper and Lower must be specified. The
options are:
User Supplied Bounds. Enter the bounds in the columns labeled Lower
and Upper.
WinNonlin Bounds. WinNonlin establishes bounds for the parameters.
Do Not Use Bounds. No bounds are specified for the modeling.
4. When all values have been set, click Apply (to leave the dialog open and Pro-
ceed to the Dosing regimen) or OK (to close the dialog).
5. The Save and Load buttons can be used to store the parameter settings in an
external ASCII text file for future re-use.
Multiple sort levels
If the data has one or more sort variables, initial estimates for each level of the
sort variable(s) must be provided unless Propagate Final Estimates has been
selected.
The same method of parameter calculation and type of parameter boundaries
must be used for all sort levels.
To copy cells within the Model Parameters data grid:
1. Select (highlight) the cells to copy.
2. Click Copy.
3. Highlight the first cell of the destination.
4. Click Paste.
To copy model parameter information from the first profile to the remaining profiles:
1. Select (highlight) the cells for the first profile with the mouse. Note that the
cursor becomes a small black cross when held in the lower right-hand corner
of this selection. This is called the handle.
2. Press and hold down the left mouse button when this black cross appears.
3. Drag the handle over the target cells (to the bottom of the grid).
4. Release the mouse button.
Compartmental Modeling
Model properties
253
10
To copy data from outside the Model Parameters data grid:
1. Copy data to the clipboard prior to opening the Model Parameters dialog box.
2. Open the Model Parameters dialog box.
3. Select the first cell of the destination.
4. Click on the Paste button.
Note: The Load and Save buttons in the dialog can be used to save the parameter
values and settings to an external ASCII file and to reload settings for a model
fitting. The structure of this file (.ParmFile) is described in the chapter on
Scripting. See Special file formats on page 502.
Recommendations for initial parameter estimates
The use of boundaries (either User supplied or WinNonlin supplied) is
recommended.
When the WinNonlin Parameters option is selected for any model other
than a compiled WinNonlin model (i.e., grid searching is requested),
boundaries, either user supplied or WinNonlin supplied, are required.
WinNonlin only utilizes curve stripping if the data corresponds to admin-
istration of a single dose of drug. If multiple dose data is being fit to a
model in WinNonlin's library of models, and WinNonlin Parameters is
selected, a grid search is performed to obtain initial estimates. In this case,
boundaries are required.
For linear regressions, Method 3 (Gauss-Newton (Hartley)) and Do not
use bounds are recommended.
The grid used in grid searching includes three values for each parameter.
Thus, if four parameters are to be estimated, the grid will be comprised of
3
4
= 81 possible points. The point on the grid associated with the smallest
sum of squares is used as an initial estimate for the estimation algorithm.
Note that this option has been added for convenience, but it may dramati-
cally slow down the parameter estimation process if the model is defined
in terms of differential equations.
If the data are to be fit to a micro constant model, WinNonlin will perform
curve stripping for the corresponding macro constant model then use the
macro constants to compute the micro constants. It is still recommended
WinNonlin
Users Guide
254
10
that the lower and upper boundaries be specified, even when WinNonlin
is computing the initial estimates.
When the Gauss-Newton method is used to estimate the parameters
(METHODS 2 and 3), the boundaries are incorporated by applying a nor-
mit transform to the parameter space. With the Nelder-Mead option
(METHOD 1), the residual sum of squares is set to a large number if any
of the parameter estimates go outside the specified constraints at any iter-
ation, which forces the parameters back within the specified bounds.
Unlike the linearization methods, the use of bounds does not affect
numerical stability when using the Nelder-Mead simplex option. The use
of bounds with Nelder-Mead will, however, keep the parameters within
the bounds. The use of bounds (either user-supplied or WinNonlin sup-
plied) is always recommended with the Gauss-Newton methods.
Unless No Bounds is specified, and initial estimates have been entered by
the user or derived by WinNonlin, WinNonlin will automatically compute
bounds.
Dosing regimen
WinNonlin uses constants to store dosing information, including the number
of doses, amount of the dose(s), and dosing time(s). These are input as con-
stants. Each model requires specific information described below. For some
models the number of constants depends upon the number of doses adminis-
tered.
Model Number
Constant 1, 3-7, 11, 12 2, 9, 10, 19 8, 13, 14, 18
1 # of doses # of doses stripping dose
2 dose 1 dose 1 # doses
3 time of dose 1 start time 1 dose 1
4 dose 2 end time 1 time of dose 1
5 time of dose 2 dose 2 dose 2
6 (etc.) start time 2 time of dose 2
7 end time 2 (etc.)
8 (etc.)
9
Compartmental Modeling
Model properties
255
10
Where: NCON = the total number of constants to be specified by the user, and
nd = number of administered doses.
Note: Note that WinNonlin assumes that the time of the first dose is zero.
To enter dosing data:
1. Select Model>Dosing Regimen from the Model menu. The Dosing Regimen
tab of the Model properties dialog appears.
NCON (2*nd)+1 (3*nd)+1 (2*nd)+2
Model Number:
Constant 15, 16 17
1 bolus dose stripping dose
2 IV dose bolus dose
3 length of infusion IV dose
4 length of infusion
NCON 3 4
Model Number
Constant 1, 3-7, 11, 12 2, 9, 10, 19 8, 13, 14, 18
WinNonlin
Users Guide
256
10
Compiled models
Figure 10-1. The Dosing Regimen for compiled models
If a sort variable has been specified, the grid that appears in this dialog box
accommodates the constants required for all levels of the sort variable(s). The
same number of doses must be entered for each level of the sort variable.
Note: If a different number of doses for different levels of the sort variable is
needed, enter the largest number required, and enter doses of 0 for the extra
doses. Be sure to include time values in the data set beyond the actual time of
dose for these phantom doses.
ASCII models
When an ASCII model has been selected the Constant column contains the
names of elements of the constants array. Check the ASCII text in the Model
window to see how many and what constants to enter. See the Examples
Guide for an example using an ASCII model.
To enter dosing data for ASCII models:
1. Use the Insert Row, Add Row, and Delete Row buttons, if needed, to size the
grid appropriately for the number of constants required by the model.
Compartmental Modeling
Model options
257
10
2. If the data set includes multiple profiles, a row will be added for each profile.
3. Enter each constant value for each profile in the column labeled Value.
Figure 10-2. The Dosing Regimen tab for ASCII models
Copy, paste and fill-down in the Dosing Regimen data grid
Copy data (using the Windows clipboard) into the Dosing grid as well as from
the Dosing grid. Data from one profile can also be copied to others (using
copy down). All of these operations function the same on each tab of the
Model Properties dialog. See Model parameters on page 250.
Note: The Load and Save buttons in the dialog can be used to save the dosing values
and units to an external ASCII file and to reload settings for re-use. The struc-
ture of this file is described below in the chapter on Scripting. See Special
file formats on page 502.
Model options
The options for model output and computational algorithm appear on five tabs
in the Model Options dialog.
WinNonlin
Users Guide
258
10
To open the Modeling Options dialog:
1. Select Model Options from the Model menu or click on the Model Options
tool bar button. The Model Options dialog appears. This dialog has five
tabbed pages.
2. Select the desired options using the following tabs.
3. Click OK or Apply.
Output options
The defaults for output options are set via the Options command in the Tools
menu. The settings on the Output Options tab of the Model options dialog,
shown below, override the defaults only during the current WinNonlin model-
ing session.
Tab Description
Output options Select text, chart (plots) and/or workbook output forms
Weight Weighting of observation data. See also Weighting on page 325.
Title Text title to appear at the top of modeling output (text and charts)
PK settings Model fitting algorithm
Units Default output units for parameter estimates
Compartmental Modeling
Model options
259
10
Workbook
Tabular output in a workbook. For the contents of the workbook output, see
Output on page 265.
Chart
This option generates plots showing predicted values versus observed values
for each level of the ID variable.
Text
WinNonlin provides an ASCII (text) version of the output. This output con-
tains all modeling settings and output in one file. Modeling errors are also
reported in this file. This output is useful for reporting, and may also be very
useful for archiving analyses.
Page Breaks
Checking this box generates page breaks in the ASCII output.
Note: When a difficult model fit is to be attempted, enable the ASCII output and
check the output for modeling errors.
Weight
Compartmental modeling, there are four ways of assigning weights, other
than uniform weighting:
1. Weighted least squares weights by a power of the observed Y.
2. Iterative reweighting sets weights as the predicted value of Y to a speci-
fied power.
3. Include Weight as a variable on the data file allows specific weight val-
ues to be applied to each observed value.
4. Programming statements can be used to define weights as part of a user
defined model. See User Models on page 273.
See Weighting on page 325 for a detailed discussion of weighting schemes.
WinNonlin
Users Guide
260
10
To set the weighting scheme for a modeling session:
1. Open the Weight tab of the Model options dialog (Model>Model Options).
2. Select from the options discussed below, and click OK.
Weights on File in Column to read weights from a column on the data file.
Pre-Selected Scheme to select from among the most common schemes:
weight by 1/observed Y
weight by 1/observed Y2
weight by 1/predicted Y (iterative reweighting)
weight by 1/predicted Y2 (iterative reweighting)
Observed to the Power n (Weighted Least Squares) to specify weighted least
squares. Input the value of n in the box provided.
Predicted to the Power n (Iterative Reweighting) to specify iterative reweight-
ing. Input the value of n in the box provided.
Scaling of Weights
When weights are read from the data file or when weighted least squares is
used, the weights for the individual data values are scaled so that the sum of
the weights for each function is equal to the number of data values (with non-
zero weights). This scaling of the weights has no effect on the model fitting,
as the weights of the observations are proportionally the same. However, scal-
ing of the weights provides increased numerical stability. See Scaling of
weights on page 326 for further discussion.
Compartmental Modeling
Model options
261
10
To to turn off scaling of weights, check the No Scaling of Weights check box.
Title
Titles can be displayed at the top of each printed page. Unchecking the Title
check box suppresses the use of the titles without deleting the title text from
the Model options dialog.
Enter titles with multiple lines by using either CTRL + ENTER or SHIFT +
ENTER to move to the next line. The titles will be displayed on the screen for
graphical output generated by modeling. These titles appear on the workbook
output only when it is printed.
PK settings
The PK Settings tab of the Model options dialog (Model>Model Options)
provides control over the model fitting algorithm and related settings.
Minimization
Select among the 3 minimization methods:
Method 1: Nelder-Mead simplex
Method 2: Gauss-Newton with Levenberg and Hartley modification
Method 3: Gauss-Newton with Hartley modification
These methods are described in Model fitting algorithms and features of
WinNonlin on page 5. The use of bounds is especially recommended with
WinNonlin
Users Guide
262
10
Methods 2 and 3. When doing linear regression, use Method 3 and do not use
bounds.
Transpose final parameter table
If transposed output is selected (i.e., this option is checked), the Final Parame-
ters output table will show each parameter statistic in a separate column, as
shown in the upper window of Figure 10-3. A second worksheet, called Non-
transposed Final Parameters, will present each parameter in a separate row,
with one column per statistic. If the Transpose Final Parameters Table option
is not checked, the two worksheets will be reversed, with the Final Parameters
worksheet displaying non-transposed data, as shown in the lower window of
Figure 10-3. The second worksheet, called Transposed Final Parameters will
display the transposed version.
Figure 10-3. Example modeling output: transposed (upper) and non-transposed
(lower) Final Parameters.
The transposed form is particularly useful when creating final report tables.
This format may also be useful when summarizing a subset of the final
parameters using descriptive statistics.
Increment for partial derivatives
Nonlinear algorithms require derivatives of the models with respect to the
parameters. The program estimates these derivatives using a difference equa-
tion. For example:
Compartmental Modeling
Model options
263
10
where = the Increment multiplied by the parameter value.
Number of predicted values
This setting determines the number of points in the Predicted Data file. Use
this option to create a data set used to plot a smooth curve. The minimum
allowable value is 10 and the maximum is 10,000.
If the number of derivatives is greater than 0 (i.e., differential equations are
used), this command is ignored and the number of points is equal to the num-
ber of points in the data set.
For compiled models without differential equations the default value is 1000.
The default for user models is the number of data points in the original data
set. This value may be increased only if the model has only one independent
variable.
Note: To better reflect peaks (for IV dosing) and troughs (for extravascular, IV infu-
sion and IV bolus dosing), the Predicted Data file for the built-in PK models
includes dosing times, in addition to the concentrations automatically gener-
ated. For all three types of concentrations are generated at dosing times; in
addition, for infusion models, times are generated for the end of infusion.
When fitting or simulating multiple dose data the predicted value data curves
may be much improved by increasing the Number of Predicted Values.
Convergence criteria
Use this option to set the convergence criterion. The default is 0.0001. Con-
vergence is achieved when the relative change in the residual sum of squares
is less than the convergence criterion.
Mean square
The variance is normally a function of the weighted residual SS/df, or the
Mean Square. For certain types of problems, when computing the variance,
the mean square needs to be set to a fixed value.
F
P 1 ( )
--------------
F P 1 ( ) + ( ) F P 1 ( ) ( )
--------------------------------------------------------- =
WinNonlin
Users Guide
264
10
Iterations
Use this option to change the maximum number of iterations. For Methods 2
and 3, the default is 50. For Method 1, the default is 500.
For Method 1, each iteration is really a reflection of the simplex.
Model size
Use this option to alter the default memory requirements. Model size may
range from 1 to 64; the default size is 4.
Units
Specify the preferred units for output of modeling or simulation. The input
data (X-variable, Y-variable, dosing) must contain units to use this option.
WinNonlin performs appropriate conversions as needed.
To specify preferred units:
1. Select the Units tab of the Model options dialog.
2. Select the row with the appropriate parameter name. The default units are dis-
played in the Default column.
3. Enter the units in the Preferred column for that row. Alternately, click the
Units Builder button to construct and specify units in the Units Builder.
Compartmental Modeling
Running the model
265
10
4. In case of an error the parameters can be reset to their original setting by
clicking on the Reset to Defaults button.
5. The preferred units can be saved to a (*.TXT) file for later re-use, using the
Save and Load buttons.
Running the model
To start modeling:
1. Select Model>Start Modeling from the menus or click the Start Modeling
tool bar button.
Note: At some point during modeling, the Select Data for Modeling dialog box may
appear. This can occur when the original data set selected for modeling
becomes un-associated with the model. In this case, select the data set to be
used for the modeling, and click OK.
Stop modeling
To stop modeling:
1. Click on the Stop Modeling tool bar button.
Output
One of the examples from the Examples Guide is used here to discuss the
modeling output provided by WinNonlin. This example uses a pharmacoki-
netic (PK) model.
Note: This section is not intended as a statistical or PK text. It is meant to provide
guidance and references to aid in the interpretation of modeling output.
After Example 1 is run, up to three new child windows appear in the WinNon-
lin window. They are labeled:
PK Text
WinNonlin
Users Guide
266
10
PK Workbook
PK Chart
The Text Output window contains an ASCII form of the output. All of the
data in the PK Workbook is included in this ASCII output. This window will
only appear if ASCII output is selected on the Output Options tab in the Mod-
eling Options dialog box, or if there is an error in the model.
Note that these windows are named PK... because this was a pharmacoki-
netic model. Other analyses will, naturally, produce appropriately-named win-
dows.
Text (ASCII) output
The text output window contains a complete summary of the modeling for
this PK example.
Model Commands
The first page is a copy of the input commands created to run the model. If the
menus were used to define the model specifications, commands will appear
here that indicate that. If the model is defined in a user library, then the state-
ments that define the model are also printed. Those statements are equivalent
to a WinNonlin command file.
Minimization Process
The second page varies, depending on which method is used for minimiza-
tion. If a Gauss-Newton method is used (Methods 2 or 3), this page shows the
values of the parameters and the computed weighted sum of squared residuals
at each iteration. In addition, the following two values are printed for each
iteration:
RANK - Rank of the matrix of partial derivatives of the model parame-
ters. If the matrix is of full rank, RANK = # of parameters. If the RANK is
less than the number of parameters, then the problem is ill-conditioned.
That is, there is not enough information contained in the data to precisely
estimate all of the parameters in the model.
COND - Condition number of the matrix of partial derivatives. COND is
the square root of the ratio of the largest to the smallest eigenvalue of the
matrix of partial derivatives. If the condition number gets to be very large,
Compartmental Modeling
Output
267
10
say greater than 10e6, then the estimation problem is very ill-conditioned.
When using Methods 2 and 3, using bounds (LOWER and UPPER con-
straints) often helps reduce the condition number.
If the simplex algorithm is used, the second page only shows the parameter
values and the weighted sum of squares for the initial, final (best, or smallest,
sum of squares) point, and the next-to-best point.
Final Parameters
The third page of the output lists the parameter estimates, the asymptotic esti-
mated standard error of each estimate, and two confidence intervals based on
this estimated standard error. The confidence interval labeled UNIVARIATE
is the parameter estimate plus and minus the product of the estimated standard
error and the appropriate value of the t-statistic. The confidence interval
labeled PLANAR is obtained from the tangent planes to the joint confidence
ellipsoid of all the parameter estimates. For a complete discussion of the
UNIVARIATE and PLANAR confidence intervals see page 95 of Draper and
Smith (1981). The UNIVARIATE confidence intervals ignore the other
parameters being estimated, while the PLANAR confidence intervals take
into account the correlations among the parameter estimates. Only in the very
rare event that the estimates are completely independent (uncorrelated) will
the two confidence intervals be equal; usually the PLANAR intervals will be
wider than the UNIVARIATE intervals. Both are 95% confidence intervals.
The estimated standard errors and confidence intervals are only approximate,
as they are based on a linearization of the nonlinear model. The nearer the
model is to being linear, the better is the approximation. See Chapter 10 of
Draper and Smith (1981) for a complete discussion of the true confidence
intervals for parameter estimates in nonlinear models.
The estimated standard errors are valuable for indicating how much informa-
tion about the parameters is contained in the data. Many times a model will
provide a good fit to the data in the sense that all of the deviations between
observed and predicted values are small, but one or more parameter estimates
will have standard errors that are large relative to the estimate.
Variance-Covariance Matrix, Correlation Matrix, and Eigenvalues
Page four of the output shows the correlation matrix of the estimates and the
eigenvalues of the linearized form of the model. High correlations among one
or more pairs of the estimates indicate that the UNIVARIATE confidence lim-
its are underestimates of the uncertainty in the parameter estimates and,
WinNonlin
Users Guide
268
10
although the data may be well fit by the model, the estimates may not be very
reliable. Also, data sets that result in highly correlated estimates are often dif-
ficult to fit, in the sense that the Gauss-Newton algorithm will have trouble
finding the minimum residual sum of squares.
The eigenvalues are another indication of how well the data define the param-
eters. If the parameter estimates are completely uncorrelated, then the eigen-
values will all be equal. A large ratio between the largest and smallest
eigenvalue may indicate that there are too many parameters in the model.
Unfortunately, it is usually not possible to drop one parameter from a nonlin-
ear model. For discussion of the use of eigenvalues in the modeling process
see Belsley, et. al. (1980).
Residuals
Page five of the output lists the observed data, calculated predicted values of
the model function, residuals, weights, the standard deviations (S) of the cal-
culated function values and standardized residuals. Runs of positive or nega-
tive deviations indicate non-random deviations from the model and are
indicators of an incorrect model and/or choice of weights.
Also on page five are the sum of squared residuals, the sum of weighted
squared residuals, an estimate of the error standard deviation, and the correla-
tion between observed and calculated function values. Unlike the linear model
case, the correlation is not a particularly good measure of fit; for most prob-
lems it will be greater than 0.9, and anything less than 0.8 probably indicates
serious problems with the data and/or model. Two measures which have been
proposed for comparing competing models, AIC (Akaike, 1978) and SBC
(Schwarz, 1978), are also printed on page five.
If the data have been fit to any of the models in the built-in library with
extravascular or constant infusion input, area under the curve (AUC) is
printed at the end of page five. The AUC is computed by the linear trapezoidal
rule. If the first time value is not zero, then a pseudo time value of zero is gen-
erated, with an associated concentration of zero, in order that AUC is com-
puted from zero to the last time.
Note: Note that the AUC values may not be meaningful if the data were obtained
after multiple dosing or IV dosing (due to time 0 extrapolation problems).
Compartmental Modeling
Output
269
10
Secondary Parameters
If there are any secondary parameters, they, along with their estimated asymp-
totic standard errors, are printed on page six. The secondary parameters are
functions of the primary parameters whose estimates are given on page three
of the output. The standard errors of the secondary parameters are obtained by
computing the linear term of a Taylor series expansion of the secondary
parameters. As such, they represent about the third level of approximation and
must be regarded with caution.
Workbook output
A PK Workbook window contains summary tables of the modeling data, a
summary of the information in the ASCII output. These worksheets present
the output in a form that can be used for reporting and further analyses.
.
Table 10-2. Summary of PK worksheets
Item Contents
Initial Parameters Parameter names, initial values, and lower and upper bounds
for each level of the sort variables.
Minimization Process Iteration number, weighted sum of squares, and value for
each parameter, for each level of the sort variables.
Final Parameters Parameter names, units, estimates, standard error of the esti-
mates, CV%, univariate confidence intervals, and planar con-
fidence intervals for each level of the sort variables.
Dosing The dosing regimen specified for the modeling.
Correlation Matrix A correlation matrix for the parameters, for each value of the
sort variables.
Eigenvalues Eigenvalues for each level of the sort variables.
Condition Numbers Iteration number, rank and condition number for each value
of the sort variables.
Variance-Covariance Matrix A variance-covariance matrix for the parameters, for each
value of the sort variables.
Summary Table
a
The sort variables, X, Y, transformed X, transformed Y, pre-
dicted Y, residual, weight used, standard error of predicted Y,
standardized residuals, for each value of the sort variables.
For link models the Summary table also includes C
P
and C
e
.
For indirect response models, it also includes C
P
.
WinNonlin
Users Guide
270
10
Note: Note that the worksheets produced will depend on the type of analysis and the
model settings.
These output worksheets are presented together in one workbook window.
Use the tabs at the bottom of the window to select the worksheet to use. An
example is given below.
Diagnostics For each function and for the total, the following diagnostics
are provided: corrected sum of squared observations,
weighted corrected sum of squared observations, sum of
squared residuals, weighted sum of squared residuals, S
(estimate of residual standard deviation) and df, correlation
between observed Y and predicted Y, AIC and SC.
Differential Equations Values of the differential equations at each time on the data
set.
Partial Derivatives The value of the partial derivatives for each parameter at
each time point for each value of the sort variables.
Predicted Data Time and predicted Y for multiple time points, for each value
of the sort variables.
Secondary Parameters Secondary parameter name, units, estimate, standard error
of the estimate, and CV% for each value of the sort variables.
User Settings Title, model number, weighting used, minimization method
used, convergence criterion used, and the maximum number
of iterations allowed.
a. If there are no statements to transform the data, then X and Y will equal
X(obs) and Y(obs).
Table 10-2. Summary of PK worksheets (continued)
Compartmental Modeling
Output
271
10
Figure 10-4. Workbook output
Chart output
This PK analysis produces a chart window with five graphs for each level of
the sort variable:
X vs. Observed Y and Predicted Y plots the predicted curves as a function
of X, with the Observed Y overlaid on the plot. Used for assessing the model
fit.
Observed Y vs. Weighted Predicted Y plots weighted predicted Y against
observed Y. Scatter should lie close to the 45 degree line.
Weighted Predicted Y vs. Weighted Residual Y used to assess whether
error distribution is appropriately modeled throughout the range of the data.
X vs. Weighted Residual Y used to assess whether error distribution is
appropriately modeled across the range of the X variable.
Partial Derivatives plots the partial derivative of the model with respect to
each parameter as a function of the x variable. If f(x; a, b, c) is the model as a
function of x, based on parameters a, b, and c, then
df(x; a, b, c)/da, df(x; a, b, c)/db, df(x; a, b, c)/dc
are plotted versus x. Each derivative is evaluated at the final parameter esti-
mates. Data taken at larger partial derivatives are more influential than those
taken at smaller partial derivatives for the parameter of interest.
WinNonlin
Users Guide
272
10
Select a graph type using the tabs at the bottom of the window.
Figure 10-5. A sample PK Chart
273
Chapter 11
User Models
Creating custom models using WinNonlin
command language, FORTRAN, or C++
WinNonlin includes a library of standard PK and PK/PD models, detailed
under WinNonlin Model Libraries on page 573. In addition, WinNonlin
provides a flexible command language for creating more complex and custom
models. The commands can be saved in a user model. WinNonlin supports
two types of user models, ASCII user models and compiled user models.
ASCII models are created in a text window or a separate text file, then
loaded in WinNonlin. WinNonlin must parse the ASCII file to run the
model, so ASCII models do not run as quickly as compiled models.
Compiled user models are created and compiled using a Fortran or C++
compiler. As a result, WinNonlin need not parse the file; it simply calls
the compiled .DLL file.
A command file is made up of blocks of text, including a model block, and
other blocks specifying all or most of the information required to run the
model. The model can be an ASCII user model, a WinNonlin library model,
or a user compiled model.
Information that is fixed across modeling sessions, such as the number and
names of the model parameters, should be included with the model statements
to reduce the amount of information that must be supplied at run time. In gen-
eral, however, use variables to represent model quantities that may vary
across uses, to make each command file as general as possible.
Templates
Two user model templates are provided with WinNonlin: one for models that
include only algebraic equations and one for models that include differential
equations. Examples are also provided in the Examples Guide. All ASCII
WinNonlin
Users Guide
274
11
models in WinNonlins libraries, in the WinNonlin LIB directory, may be used
as examples and starting templates. For additional examples, see Pharmacok-
inetic and Pharmacodynamic Data Analysis: Concepts and Applications, sec-
ond edition, by Gabrielsson and Weiner.
Model structure
The following questions need to be considered for custom models:
1. Is the model(s) expressible as an algebraic nonlinear function, a system of
differential equations, or a combination of algebraic functions and differ-
ential equations?
2. Does the data set contain all the necessary information, or will new vari-
ables which are functions of the input data need to be created?
3. Does the model change according to values of the data or estimated
parameters?
4. How many parameters and constants will be needed to define the model?
5. If the model uses differential equations, what are the initial values?
Each user model must begin with the key word MODEL. It can be followed by
a number to identify the model, such as MODEL 5. The model ends with the
command EOM which indicates the end of the model definition.
Examples of algebraic nonlinear models
Examples of differential equations
Y a *t ( ) exp =
( ) ( )
Y a t b t = + cos sin
dz dt k t =
1
dz dt k w k y =
1 2
User Models
Model structure
275
11
The minimum information needed to define a model is a MODEL statement, a
FUNCTION block, and an EOM statement. If a model is stored in a user
library it must also have a model number.
Any of the above seven groups of commands can be specified with only the
first four characters of the group name. However using the entire name will
also work. For example, either
FUNCTION 1
or FUNC 1
could be used to signify that Function 1 is being defined.
Table 11-1. Model structure
Example:
MODEL
TRANSFORM
statements
END
Statements to alter data values before the functions or differential
equations are fit go here.
COMMAND
statements
END
This block contains the WinNonlin commands which load the model.
TEMPORARY state-
ments
END
Commands to create variables that will be used in more than one
block (i.e. global variables), go here.
FUNCTION
statements
END
A function block must be included for each different model or equa-
tion for which corresponding data are available.
START
statements
END
Initial conditions for the system of the differential equations are placed
in this section.
DIFFERENTIAL
statements
END
If the model is a function of one or more differential equations, state-
ments defining the differential equations are included in this section.
SECONDARY state-
ments
END
All secondary parameters, which are parameters defined as functions
of the model parameters, are specified here.
EOM
WinNonlin
Users Guide
276
11
Note: Each of the seven groups of commands (or blocks) must end with an END
statement. In addition, an EOM (end of model) statement must follow the last
group of commands. These blocks may appear in any order.
The model file can be created in any of three ways:
1. Select File>New, and then select Text and click OK. This creates the
model in a text file within WinNonlin.
2. Type the model statements into a text file outside of WinNonlin and load
it from an external file.
3. Select the PK/PD/NCA Analysis Wizard and choose User Model. Then
specify Create a New ASCII Model. This method utilizes one of the
built-in templates for creating models.
Model components
Each block except the COMMAND block can include WinNonlin program-
ming language statements in addition to the special variables WinNonlin
makes available to access data and parameter estimates. These are explained
at the end of this chapter.
Transform block
This group of statements is called once for each observation, prior to starting
the estimation procedure. This allows defining the dependent variable (Y) or
the weight (WT) as a function of other variables on the input data set. Inde-
pendent variables can also be derived or transformed here. See the files
EXP3.CMD, EXP4.CMD, and EXP9.CMD, stored in the \EXAMPLES directory for
examples of the use of the TRANSFORM block.
Note: When the variable WT is specified in a model file, this specification will over-
ride any weighting specified via the Data Variables dialog box.
If an existing variable is transformed in the transform block, both the original
values and the transformed values will be included in the output grids. New
variables created in the transform block will not be included. For example, if a
data set has the variables X8 and Y, and the following statements are included:
User Models
Model components
277
11
X8 = SQRT(X8)
Y=log(Y)
then the output worksheet will include the variables X8 and Y (the trans-
formed values), and X8(Obs) and Y(Obs), (the original values). However, if
the statement included:
LOGY = log(Y)
then the variable LOGY will not be included in the output worksheet.
Command block
The WinNonlin commands which are also used in command files and dis-
cussed in chapter 4 of this manual can be used in the COMMANDS block of a
user model. This group of commands is included in the library along with the
model to define such values as NPAR (the number of parameters) and NSEC
(the number of secondary parameters). Specifying commands in this block
can reduce the amount of information that must be specified at run time.
The COMMAND - END block allows WinNonlin commands to be associated
with a model. Following the COMMANDS statement, any WinNonlin com-
mand such as NPARAMETERS, NCONSTANTS, PNAME, etc. may be
given.
A
The COMMAND section concludes with an END statement.
The following WinNonlin commands are related to model definition. They
can be placed in the COMMAND block of the model or in a WinNonlin com-
mand file.
Note: Any command that is fixed should be placed in the COMMAND block, other-
wise the command should be specified at run time using the menu commands
or tool bar buttons, or it may be included in a WinNonlin command file.
The NPARAMETERS command specifies the number of parameters that will
be estimated. The INITIAL, LOWER and UPPER commands must have as
many values specified as indicated by the NPARAMETER command.
A. See the list of commands given in chapter 4 of this manual.
WinNonlin
Users Guide
278
11
Note: The NCONSTANTS command specifies the number of constants to be used
in the model. Each constant must be initialized either using the CONSTANTS
command or via the WinNonlin interface.
Some models, such as the multiple dosing models in WinNonlin's library, use
a variable number of constants. In this case, the NCONSTANTS and the
CONSTANTS commands should not go in the MODEL file, but should be
specified at run time using the menu commands or tool bar buttons, or they
may be included in a WinNonlin command file.
The NDERIVATIVES command tells WinNonlin the number of differential
equations in the model.
The NFUNCTIONS command specifies the number of different equations
that have observations associated with them. These functions can share some
of the same parameters. The data are organized so that the first function's data
come first, followed by the next function's data and so on. The NFUNC-
TIONS command must have an argument that is the number of different mod-
els or equations with corresponding data, or the number of FUNCTION
blocks.
When more than one function is defined (NFUN>1) it is important to delin-
eate for WinNonlin which data observations belong to each function. This is
most easily done by using a FUNCTION variable through the Data Variables
dialog box. To indicate a FUNCTION variable when writing a command file,
use the FNUMBER command. An example is shown below.
Example - Command block
COMM
NPARAMETER 5
PNAMES K01 K10 K12 K20 VOLUME
NFUNCTIONS 1
NCONSTANTS 2
END
User Models
Model components
279
11
In this example, the data set has data for two different functions, for example,
plasma and urine data. The observations which belong to the first function
have a type of 1, and the observations which belong to the second function
have a type of 2. The variable TYPE will be specified as the FUNCTION
variable in the Data Variables dialog box.
Note: The NOBSERVATIONS command provides a means to specify the number of
observations that belong to each function. In the example shown above, it is
possible to include the statement:
NOBSERVATIONS 6 5
However, this method is not recommended. The NOBSERVATIONS com-
mand is included for compatibility with PCNonlin. Note that using this state-
ment requires accurately counting the number of observations for each
function, and updating this statement if the number of observations changes.
It is recommended using a FUNCTION variable rather than the NOBS com-
mand.
The NSECONDARY command indicates the number of secondary parame-
ters to be computed. A secondary parameter is estimated using the values of
the estimated model parameters in a function that defines the secondary
parameters.
WinNonlin
Users Guide
280
11
The PNAMES, and SNAMES, commands are used to name the primary and
secondary parameters. These names are used as labels in the output, and may
be used in programming statements. The command is followed by the names
in single quotes separated by blanks or commas.
The DNAMES command may be used to define names for the columns in the
data file. These names can then be used in the model definition statements to
refer to input data columns.
The PUNIT and SUNIT commands may be used to supply units for the pri-
mary and secondary parameters. For user models, units are not manipulated
but are carried along to the output.
Temporary variables block
Variables defined in the temporary block are global variables; that is, they
may be used in any block. This optional group of statements can be used to
Example of a secondary parameter: Clearance
COMMANDS
NSEC 1
END
SECO
S(1)=0.693/K10
END
Example of PNAMES, DNAMES, PUNITS, SUNITS and
SNAMES Commands
COMM
DNAMES SUBJECT, FORM, TIME, CONC
NPARM 3
PNAMES 'K10', 'VOLUME', 'K1E'
PUNIT 1/hr, ml,1/hr
NSEC 1
SNAMES 'CL'
SUNIT ml/hr
END
SECO
CL =0.693/K10
END
User Models
Model components
281
11
define global variables, which may make it easier to define the functions, dif-
ferential equations and secondary parameters.
For example, it may be better to provide input for a given model as micro con-
stants but use macro constants in the model definition statements and report
these macro constants as secondary parameters. If these macro constants are
defined in the Temporary block, they will only need to be defined once, and
used in both the FUNCTION and SECONDARY blocks, rather than being
defined in both the FUNCTION and SECONDARY blocks.
Temporary variable names can be eight (8) characters long. They may contain
letters, numbers, or underscores, but must start with a letter.
Note: Temporary variables that are only used within a given group of statements can
be defined within that group of statements. Temporary variables that are used
in more than one block of statements must be placed in the TEMPORARY
VARIABLES group.
Function block
When the model is fitting multiple functions that share a parameter or param-
eters it may be more efficient statistically to model the functions simulta-
neously. For example, when modeling both plasma and urine data for a one
compartment IV bolus model it would be more efficient to model these simul-
taneously, since the equations for the plasma and urine compartments both
involve K10. Usage:
FUNCTION N
statements
END
This group of statements defines the model to be fit to a set of data. The letter
N denotes the function number. A function block must appear for each of the
NFUN functions. The variable F should be assigned the function value. The
function may be:
an algebraic function (e.g.: F= (D/V) * exp(-K10 * t)), or
a function of a differential equation or differential equations defined in
one or more differential blocks (e.g.: F=Z(1), or F= Z(1) + 3*Z(2)).
WinNonlin
Users Guide
282
11
The number of function blocks is equal to the number of simultaneous func-
tions to be fit, that is, the number of functions that have data associated with
them.
It is important to delineate which observations in the data file belong to which
functions. This is generally most easily done using a variable on the data file
whose values correspond to the function numbers. This would be referred to
as a Function variable. (See Model initialization commands on page 312. )
Weights can also be defined in this section by setting WT equal to the weight
associated with the observation.
Starting values block
When a model is defined by a system of one or more differential equations
(i.e., NDER > 0), the starting values corresponding to each differential equa-
tion in the system must be specified. In most instances, this will be the value
of the dependent variable when X = 0. If the initial values do not occur at X =
0, then X should also be assigned accordingly. The actual starting values
should be assigned to elements of the Z array. Note that the initial conditions
could be estimated as parameters, such as C0 below.
Example - Function Blocks
FUNC 1 <--An algebraic function
F=A*EXP(-ALPHA*T)
END
FUNC 2 <--A differential equation
F=Z(1)
END
Example - Starting Values
START
Z(1)=C0
Z(2)=0
END
User Models
Model components
283
11
Differential equation block
This set of statements is used (when NDER > 0) to define a system of differ-
ential equations which define a model. DZ(1), DZ(2), etc. should be used to
define the set of differential equations.
Secondary parameters block
In many instances, interest is not in the model parameters per se, but in func-
tions of the model parameters. For example, the model may be defined in
terms of the micro constants, but what really is of interest is clearance. This is
easily handled by defining clearance as a function of the model parameters in
the secondary block.
When secondary parameters are to be estimated (NSEC > 0), they are defined
using this group of statements.
S(1) denotes the first secondary parameter, S(2) the second, etc. If an SNAME
command has been included, these aliases may be used in the definition of
these parameters in the secondary block.
Example - Differential Equation Block
DIFF
DZ(1)=-K12*Z(1)
DZ(2)=K12*Z(1) - K20*Z(2)
END
Example - Secondary Block
SECO
REMARK Note that D and AUC must be defined
S(1) = D/AUC
END
WinNonlin
Users Guide
284
11
Note: REMARKS can be placed within or between any of the above groups of state-
ments. These lines must begin with REMA (or REMARK). Individual lines
are marked as remarks. It is not possible to begin a line with REMA and then
enter comments that wrap around to more lines. The other lines would also
need to begin with REMA or REMARK.
WinNonlin variables
WinNonlin provides access to both input data and parameter estimates during
the model-fitting process. This allows creating adaptive modelsthat is,
models which can be altered based on the current data observation or value of
the parameter estimates.
The data and parameters can be accessed by using the variable names
described below. Examples of their use in defining models will be shown later
in this chapter.
Example - Secondary Block, using SNAME
COMM
NSEC 1
SNAME CL
END
SECO
CL = D/AUC
END
DTA(N) This array contains values of all variables (columns) on the input
data file (in the same order) corresponding to the current observa-
tion. Thus, for a given data observation,
DTA(1) = value of 1st variable (column)
DTA(2) = value of 2nd variable (column) etc.
These variables can also be accessed using DNAMES.
F The value of the function evaluated at the current observation, and
current values of the parameters to be estimated, P(1), P(2), etc.
User Models
WinNonlin variables
285
11
Note: When the variable WT is specified in a model file, this specification will over-
ride any weighting specified via the Data Variables dialog box.
Variable names
It may be advantageous to create other variables to define the model or
parameters. These may be created as global variables in the Temporary block
or as temporary variables within any block.
Variable names can be 1-8 letters, numbers and/or underscores in length but
must start with a letter. None of the variables can be subscripted (e.g.,
TIME(2) is invalid).
Reserved variable names
Any additional variables which are defined must not have names beginning
with any WinNonlin keyword (e.g., TRAN, TEMP, FUNC, SECO, STAR,
DIFF, COMM, OBJF, END, or EOM) or with any WinNonlin command or
data array (e.g., CARR, CON, DTA, DTAARRAY(i,j), DTIM, F, NCAR,
X Value of the independent variable at which the functions or differen-
tial equations are to be evaluated. This value is identical to
DTA(XNUM) (See the XNUM command, p. 56.) If the model is a
function of more than one independent variable, the independent
variables can be accessed via the DTA( ) array, or using DNAMES.
P(N) This array contains the current values of the parameters to be esti-
mated. These variables can also be accessed using PNAMES.
CON(N) This array contains the constants which have been input by the
user (e.g., dose).
Z(N) This array contains the current integrated values corresponding to
a system of differential equations. These values are computed by
WinNonlin (except when starting values for the system of differen-
tial equations are defined by the user).
DZ(N) This array contains the current values of the differential equations
evaluated at X, P( ) and Z( ).
S(N) This array contains the values of the estimated secondary parame-
ters. These variables can also be accessed using SNAMES.
WT This value corresponds to the weight assigned to the current obser-
vation.
WinNonlin
Users Guide
286
11
NDER, NCON, NOBS, NPARM, NPAU, NSEC, NTOT, NVAR, OBJFN,
OBSN, P, PAUC, STEA, X, XARRAY(j), YARRAY(j), WTARRAY(j), Z).
See also Commands, Arrays and Functions on page 621.
PNAMES, SNAMES, and DNAMES
The commands PNAMES, SNAMES, and DNAMES may be used in code to
define aliases for parameter names, secondary parameter names, constant
names, and columns on the data file.
The WinNonlin programming language
WinNonlin provides a flexible programming language to define models. It
provides control statements, mathematical functions and loop control. It is
possible to define new variables for easier programming.
The following pages describe the elements of the WinNonlin language.
Valid mathematical operators are +, -, *, **, and /. Expressions are evaluated
using standard operator precedence. Note that ** denotes exponentiation.
WinNonlin statements
GOTO
Action Transfers processing to a labeled statement.
Syntax GOTO label
Where label is the statement label of an executable statement in
the model file.
Remarks There should not be any blank spaces between GO and TO.
Example GOTO GREEN
LABEL
Action Denotes a label. Control is transferred here via a GOTO state-
ment.
Syntax The label must end with a colon (:).
Example GREEN:
IF THEN ELSE
User Models
The WinNonlin programming language
287
11
Action If expression is true, statements in the IF block are executed; if
expression is false, control is transferred to the next ELSE, ELSE
IF, or ENDIF statement at the same IF level.
Syntax IF expression THEN
Where expression is a logical expression.
Example IF I>4 THEN
GOTO GREEN
ELSE
GOTO BLUE
ENDIF
Remarks IF statements can be nested up to 10 deep with the default model
size (2), and up to 30 for model sizes 3 or greater.
ELSE
Action Marks the beginning of an ELSE block.
Syntax ELSE
This statement is optional.
Remarks An ELSE block consists of any executable statements between
the ELSE statement and the next ENDIF statement at the same
IF level.
Example See IF - THEN.
ENDIF
Action Terminates an IF block.
Syntax
Remarks Each block of statements corresponding to each IF or ELSEIF
statement must end with an ENDIF.
Example See IF - THEN.
DO
Action Repeatedly executes the statements following the DO statement,
through the statement which ends the loop.
WinNonlin
Users Guide
288
11
WinNonlin comparison operators
Syntax DO var=exp1 TO exp2 [STEP exp3]
Where var is a variable to be incremented during the looping.
exp1 is an expression whose value is the initial value of var.
exp2 is an expression whose value is the limit for the loop.
STEP exp3 is optional. If omitted, exp3 is assumed to be 1.
exp3 is an expression whose value is the incrementor for the
loop.
Remarks If exp3 is positive, exp2 is an upper limit for the loop.
If exp3 is negative, exp2 is a lower limit for the loop.
Var is always initialized to exp1, even if the loop is not executed
(because the value of exp1 is beyond the limit placed by exp2).
After executing the last round through the loop, var has the value
which caused the loop to exit (i.e., it is beyond the limit set by
exp2).
IF statements can be nested up to 10 deep with the default
model size (2), and up to 30 for model sizes 3 or greater.
Example DO I=1 TO 3
DO J=1 TO 5
statements
NEXT
NEXT
NEXT
Action Marks the end of a DO loop.
Syntax DO .......
NEXT
Example See DO.
Operator Definition
AND and
OR or
GT > greater than
LT < less than
EQ = equal to
GE >= greater than or equal to
User Models
The WinNonlin programming language
289
11
Functions
Function names which are grouped together are interchangeable. For exam-
ple, both EXP(X) and DEXP(X) will produce the same result, namely, e
x
.
LE <= less than or equal to
Function Name Result
LAG(var) This function will return the value of var at the last
execution. Var can be X, Y, WT, or any temporary
variable.
INT(var) This function will truncate var to an integer value.
E.G.: INT(3.9) = 3
EXP (X), DEXP (X)
e
x
ALOG (X),
DLOG (X), LOGE (X)
natural log of X: ln(X)
ALOG10 (X), DLOG10 (X) LOG10 (X) log base 10 of X: log
10
(X)
SQRT (X), DSQRT (X)
SIN (X), DSIN (X) sine (X)
COS (X), DCOS (X) cosine (X)
MAX (X, Y), DMAX1 (X, Y) returns the maximum of X and Y
MIN (X, Y), DMIN1 (X, Y) returns the minimum of X and Y
ABS (X), DABS (X) returns the absolute value of X
ATAN (X), DATAN (X)
tan
-1
(X)
ATAN2 (X, Y),
DATAN2 (X, Y)
tan
-1
(X/Y)
Operator Definition
X
WinNonlin
Users Guide
290
11
Bioassay functions
ASCII models
User Models can be created as ASCII text files, or Compiled user models.
User libraries
Several user models can be stored in an ASCII text file, with each model iden-
tified by a unique model number. Individual ASCII models may be up to 24 K
in size. An ASCII library, containing one or more ASCII models, cannot be
more than 30 K in size.
Table 11-2. Bioassay functions
Function name Result
NORMIT (R,N) Let p denote R/N. This function returns the normit of p.
That is, it returns the value NOR such that
Note: If R=0, then p is set to 1/2N.
If R=N, then p is set to 1-1/2N
WTNORM (NOR,N) This function returns the wt, WTNOR, associated with the
normit (NOR) and a sample size N.
LOGIT(P)
( ) p Z dz
NOR
=
1
2
2
2
exp
( ) ( )
WTNOR
N Z
p p
=
2
1
( ) Z NOR =
1
2
2
2
exp
( ) p X dx
NOR
=
1
2
2
2
exp
where
and
( )
ln
P
P 1
LOGIT =
User Models
ASCII models
291
11
WinNonlin provides a library of ASCII models in its \LIB directory. To use
one of these WinNonlin library files as a template, copy the library file and
modify the copy, thereby maintaining the original library unaltered.
Within the ASCII file, each model begins with a MODEL n statement, identi-
fying the model by number, n, and ends with an end-of-model (EOM) state-
ment. Note that the model number must be greater than 0.
For example: three models are written and stored in a file called MYMOD-
ELS.LIB, in a subdirectory called USERMODS. The structure of this file is:
The model statements are further described under Model structure on
page 274 and Model components on page 276.
Examples
The following examples demonstrate how to use the above groups of state-
ments in order to define a model. Examples demonstrating how to fit a user
model to a set of data can be found in the Examples Guide.
Example 1
To fit a set of data to the following model:
A, and are parameters to be estimated, t denotes time and C(0) is con-
strained to be zero (i.e., A + B = 0). In addition, suppose it is desired to esti-
mate the half lives of and , namely
MODEL 1
model statements
EOM
MODEL 2
model statements
EOM
MODEL 3
model statements
EOM
( ) ( ) ( ) C t A t B t = + exp
WinNonlin
Users Guide
292
11
Note: For this model, there are three parameters to be estimated: A, and . B is not
a parameter to be estimated since C(0) = 0. This constraint implies that B is
equal to -A.
To define this model and secondary parameters in WinNonlin the following
statements can be used:
The FUNCTION statement specifies that function one is being defined (in
this example there was only one function). F denotes the concentration pre-
dicted by the model, and is a function of X (which is time for this example)
and three parameters A, a, and b, which are to be estimated. The first END
statement signifies the end of the statements which define function one.
SECONDARY specifies that the next set of statements will be defining sec-
ondary parameters (functions of the model parameters) to be estimated. The
second END statement signifies the end of the statements which defines the
secondary parameters.
EOM signifies that the model specification is complete.
The above set of statements will work fine. However, the model definition
statements can be more easily interpreted by using parameter and secondary
parameter names, and remarks. For example, the following set of statements
is functionally equivalent to the previous set.
( ) LN .5
( ) LN .5
and
MODEL
FUNCTION 1
F=P(1)*EXP(-P(2)*X)-P(1)*EXP(-P(3)*X)
END
SECONDARY
S(1)=-LOGE(.5)/P(2)
S(2)=-LOGE(.5)/P(3)
END
EOM
User Models
ASCII models
293
11
COMMAND specifies that the next set of statements will be model com-
mands. The PNAMES and SNAMES statements defined the parameter names
and secondary names that are used in the programming statements and in the
output. The first END statement signifies the end of the COMMAND block.
Note: The use of remarks helps describe the model. In addition, note the use of
SNAMES and PNAMES to assign meaningful variable names to the parame-
ters (such as alpha and beta) and to facilitate defining the model. The vari-
ables A, B, TIME, E1 and E2 were not needed in defining the secondary
parameters, and consequently were only defined as (local) temporary vari-
ables within the statements which defined FUNC 1. However, equivalent
results would have been obtained if A, B, TIME, E1 and E2 had been defined
as (global) temporary variables within a TEMP block.
The MODEL statement without a number and file name instructs WinNonlin
that the statements immediately following the MODEL statements are model
definition statements and not commands.
MODEL
remark: Example problem
COMMAND
NPARM 3
NSEC 2
PNAMES A, ALPHA, BETA
SNAMES ALPHA_HL, BETA_HL
END
FUNC 1
B=-A
remark: Model is constrained so that C(0)=0
TIME=X
E1=EXP(-ALPHA*TIME)
E2=EXP(-BETA*TIME)
F=A*E1 + B*E2
END
remark: Secondary parameters
SECO
ALPHA_HL=-LOGE(.5)/ALPHA
BETA_HL=-LOGE(.5)/BETA
END
EOM
WinNonlin
Users Guide
294
11
If these commands were stored in a disk file as part of a library, the first state-
ment should be MODEL n, where n is the model number.
In a command file, a model stored in an external library file could be recalled
by specifying the following command:
MODEL n, filename
where n is the associated model number and filename is the name of the disk
file containing the library. This is equivalent to selecting Existing ASCII
Model from the User Model group box in the Libraries of Models dialog box.
If the statements were to be stored in a library, it would be appropriate to also
store the commands that pertain directly to the model. For example, to store
NSEC and NPAR with the model, include the following set of statements:
Normally, this block of commands would be placed immediately after the
MODEL statement.
Note: Print out the WinNonlin library files to study as additional examples of how to
define models. It is recommended, however, that these files not be modified.
Instead, make copies of these files for modification, leaving the library files
intact.
Example 2
Consider a model characterized by the following system of differential equa-
tions.
COMMANDS
NPAR 2
NSEC 2
END
dZ
dt
K Z
( )
( )
1
12 1 =
dZ
dt
K Z K Z
( )
( ) ( )
2
12 1 20 2 =
User Models
ASCII models
295
11
with initial conditions Z
1
(0) = D and Z
2
(0) = 0. The parameters to be esti-
mated are K12, K20 and D.
As in the previous example, first use a PNAMES statement to assign mean-
ingful names to the parameters and facilitate defining the model.
Next, define the initial values for the differential equations.
A FUNCTION block is required when modeling differential equations. In this
case model only Z(2) - the plasma compartment.
The next set of statements completes the specification of the model.
One could have also defined secondary parameters to be estimated. As dis-
cussed previously, if the above statements were to be stored in a user library,
the first statement would be: MODEL n where n denotes the assigned model
number.
MODEL
COMMAND
NPARM 3
PNAMES K12, K20, D
END
START
Z(1) = D
Z(2) = 0
END
FUNC 1
F=Z(2)
END
DIFF
DZ(1) = -K12 * Z(1)
DZ(2) = K12 * Z(1) - K20 * Z(2)
END
EOM
WinNonlin
Users Guide
296
11
Example 3
This example shows how to use the predefined variables to alter a model
based on the current observation. Suppose there are two sets of data to fit
simultaneously. Both data sets have the same model and parameters except
that the second set needs a time lag in order to be fit properly.
Assume that the data look like this:
The first column is time and the second is concentration. The third column is
an indicator variable. Its value indicates to which set of data the observations
belong. To access its value during the model-fitting process, use the DTA( )
variable. Since the third column contains the indicator values, the statement:
I = DTA(3)
assigns the variable I the current value of the indicator variable. Now write the
model as follows:
0.5 0.03 1
1.0 0.7 1
2.0 0.9 1
... ....
0.5 0 2
1.0 0 2
2.0 0 2
3.0 0.02 2
User Models
ASCII models
297
11
When I equals 1 the function without the time lag is fit. When I is not 1, that
is, I = 2, the function with the time lag is fit.
There is another way to fit these data. The two functions can be separately
defined. Using the FNUMBER command, the data are partitioned between
the two functions.
MODEL
COMM
NPAR 5
PNAMES A, B, ALPHA, BETA, LAG
END
FUNC 1
I = DTA(3)
IF I = 1 THEN :First Set of Data
T = X
F = A*EXP(-ALPHA*T) + B*EXP(-BETA*T)
ELSE :Second Set of Data
T = X-LAG
F = A*EXP(-ALPHA*T) + B*EXP(-BETA*T)
ENDIF
END
EOM
WinNonlin
Users Guide
298
11
These two approaches will produce the same final parameter estimates but
different summary output. In the first case a single summary table is created.
In the second case, two summary tables will be created, one for each function.
Creating a new ASCII model
To create a new ASCII model:
1. Launch the PK/PD/NCA ANalysis Wizard by clicking on the PK/PD/NCA
Analysis Wizard tool bar button or choosing Tools>PK/PD/NCA Analysis
Wizard from the WinNonlin menus.
1. Select User Model in the Model Types dialog.
2. Click Next. The ASCII Model Selection dialog appears.
3. Select Create New ASCII Model.
4. Click Next. The Model Parameters dialog appears.
5. Enter the number of algebraic functions in the model.
MODEL
COMM
NPAR 5
PNAMES A, B, ALPHA, BETA, LAG
END
FUNC 1
T = X
F = A*EXP(-ALPHA*T) + B*EXP(-BETA*T)
END
FUNC 2
T = X-LAG
F = A*EXP(-ALPHA*T) + B*EXP(-BETA*T)
END
EOM
.
.
NFUNC 2 : Number of Functions
FNUM 3 : Column number representing the function variable
.
User Models
ASCII models
299
11
6. If the model includes differential equations, check the Include differential
equations check box and enter the number of differential equations.
7. Assign the model a positive number between 1 and 32767, as its model num-
ber. This number will be needed to save and re-use the model.
8. Enter the Primary Parameters and Secondary Parameters in the grid. Parame-
ter names may include up to 8 alphanumeric characters.
9. Click Next. The Selection Summary dialog appears.
10. When everything is correct click Finish. Click Back to change any setting.
Note: The system must know if the model includes differential equations in order to
provide the correct template.
11. Edit the model as needed, using the syntax and guidelines provided under:
Model structure on page 274
Model components on page 276
WinNonlin variables on page 284
12. To save this model, save it as an ASCII file (.LIB). The default model library
file name is USERASCI.LIB. It is often convenient to save under a new file
name that describes the model. Several models can be saved to one .LIB file,
so long as each uses a unique model number. To do this, open the library file
in a text editor, and copy and paste the new model text into the existing file.
Undo for ASCII model development
Some operations can be reversed in the ASCII model window. Only the most
recent operation can be undone. Undo is available for the following:
Table 11-3. Undo operations
Operation Undo effect
Cut Restore cut text string.
Paste Remove newly pasted text string.
Clear Restore cleared text string.
Replace Restore original string.
WinNonlin
Users Guide
300
11
Loading an existing ASCII user model
To use a user-defined ASCII model:
1. Open the data set to be modeled.
2. Click on the PK/PD/NCA Analysis Wizard button on the tool bar or choose
Tools>PK/PD/NCA Analysis Wizard from the menus.
3. Select User Model from the Model Types dialog.
4. Click Next.
5. In the next dialog select Load Existing ASCII Model.
6. Click Next.
7. Enter the model number in the field provided for Model Number. Each
ASCII model in a library file (.LIB) must have a unique model number.
8. Type in or click ... to enter the absolute path and file name of model library.
9. Click Next, then Finish to load the model.
WinNonlin will look for a model of the appropriate number and load it into a
model window.The model may be edited from within that window. See
ASCII models on page 290 for further detail.
User Models
Compiled user models
301
11
Compiled user models
For User Models defined in terms of several differential equations, the model
fitting process can be greatly accelerated by compiling the model into a 32-bit
Windows dynamic link library (DLL) using either Compaq Visual FORTRAN
6.0 or Microsoft Visual C++ 6.0.
Creating a DLL requires the following steps:
1. Create a source file.
2. Compile the source file.
3. Link the source file with the language libraries to build a DLL.
The source code file contains one subroutine specifying the model. This sub-
routine must be named USRMOD( ). Note, however, that the project should
not be named USRMOD; USRMOD.DLL is a reserved name in WinNonlin.
Compiled user models can be called in command files (see Command Files
on page 309) or loaded using WinNonlins PK/PD/NCA Analysis Wizard (see
Loading the model on page 247).
Using FORTRAN
Creating a source file
The format of this file is very similar to a WinNonlin ASCII model file. The
same blocks are included, with a slightly different implementation. A tem-
plate for this file is provided for FORTRAN 6.0.
The files required to build a DLL in FORTRAN have been installed to the
\USERCOMP subdirectory of the WinNonlin installation directory. Two sets of
files have been provided. Either of these f90 files can be used as a template.
These files include:
File Purpose
F_UEXP6.F90 FORTRAN source file for Example 6.
F_UEXP6.DLL Compiled .DLL for Example 6.
F_UEXP15.F90 FORTRAN source file for Example 15.
F_UEXP15.DLL Compiled .DLL for Example 15.
WinNonlin
Users Guide
302
11
Note: To demonstrate the benefits of compiling models, run Example 15 in both the
ASCII form and in the compiled form.
Example using Compaq Visual FORTRAN 6.0
To compile a user model:
1. Open Compaq Visual Fortran.
2. Choose File>New from the menus.
3. Select Fortran Dynamic Link Library as the kind of product to create.
4. Enter a project name at the top left.
5. Click OK.
6. In the next dialog select Empty dll application.
User Models
Compiled user models
303
11
7. Click Finish.
8. Click OK.
9. Choose Project>Add to Project>New from the menus.
10. Select Fortran Free format source file.
11. Enter a file name. This example uses modelname.f90.
This opens a frame for the Fortran file.
12. Enter the code using the templates provided (see the table above).
WinNonlin
Users Guide
304
11
13. Select from the Build menu Set Active Configuration Win32 Release.
This minimizes the size of the file.
14. Select from the Build menu Build mymodel.dll. The .DLL is built in the spec-
ified directory (D:\MYPROJECTS\MYMODEL\RELEASE\MYMODEL.DLL).
Note: Statements in the FORTRAN source file with a ! in the first column are
comments.
To alter the example templates for a custom model:
1. FORTRAN will assume that any variables beginning with the letters I through
N are integer, and any others are real. If there are any variables to explicitly
declare as integer, add these in an INTEGER statement. Any variables to
explicitly declare as real should be specified via the REAL*8 statement. No
other changes need to be made to this section of the template.
2. Replace k12 = p(1) ... etc. with the parameters for the model as they would
be stated in a Temporary block.
3. For each block other than the Command block that appears in the model
include the corresponding block from the template file:
4. Include any information from the Command block in the associated .CMD
file. This command file is the file which calls the compiled model in the DLL.
The source file stored on disk can be assigned any name, but the subroutine
must be named USRMOD( ).
Transform block Set Transformations
Temporary block Set Temporary variables
Function block Set Functions
Starting values block Set Starting values
Differential block Set Differential equations
Secondary block Set Secondary parameters
User Models
Compiled user models
305
11
Using C++
Creating a source file
The format of this file is very similar to a WinNonlin model file. The same
blocks are included, with a slightly different implementation. An example of
this file is provided for Microsoft Visual C++ 6.0.
The files required to build a DLL in Visual C++ have been installed to the
\USERCOMP subdirectory. Two sets of files have been provided. Either of these
files can be used as a template. These files include:
Note: To demonstrate the benefits of compiling models, run Example 15 in both the
ASCII form and in the compiled form.
Example using Microsoft Visual C++ 6.0
To compile a user model:
1. Open Microsoft Visual C++ v. 6.0.
2. Select New from the File menu.
3. Select Win32 Dynamic Link Library.
4. Enter a project name.
5. Press OK.
6. In the next dialog select An empty dll project.
7. Click Finish.
8. Click OK.
File Purpose
C_UEXP6.C C source file for Example 6.
C_UEXP6.DLL Compiled .DLL file for Example 6.
C_UEXP15.C C source file for Example 15.
C_UEXP15.DLL Compiled .DLL file for Example 15.
WinNonlin
Users Guide
306
11
9. On the Project menu select Add to ProjectNew.
10. Select C++ Source File.
11. Enter a file name. This example uses modelname.c.
Note: It is important to use the .c file extension rather than the .cpp extension.
12. A frame opens for the program. Enter the code for the model. Use the tem-
plates provided (see table above).
13. Select from the Build menu Set Active ConfigurationWin32 Release.
This is not essential, but it builds a smaller DLL file.
14. Select from the Build menu Build mymodel.dll. The DLL is built in the spec-
ified directory (D:\MYPROJECTS\MYMODEL\RELEASE\MYMODEL.DLL)
Note: Statements in the Visual C++ source file with // starting in the first column are
comments. A comment line begins with /* and ends with */.
To alter this example for another model:
1. C++ makes no assumptions about types of variables. All integers should be
declared as INT and all real numbers should be declared as DOUBLE.
2. Replace k12 = p[0]; ... etc. with the parameters for the model as they would
be stated in a Temporary block.
3. For each block, other than the Command block, that appears in this model
include the corresponding block from the template file:
4. Include any information from the Command block in the associated .CMD
file.
Transform block Set Transformations
Temporary block Set Temporary variables
Function block Set Functions
Starting values block Set Starting values
Differential block Set Differential equations
Secondary block Set Secondary parameters
User Models
Compiled user models
307
11
The source file stored on disk can be assigned any name, but the subroutine
must be called USRMOD( ).
Using compiled user models in a command file
Compiled user models may be loaded into WinNonlin through a command
file to communicate any of the following model information. The format of
this file is the same regardless of the language used to compile the model.
NPARAMETERS
PNAMES
NDERIVATIVES
NFUNCTIONS
NSECONDARY
SNAMES
CNAMES
PUNIT
SUNIT
Although the following information may also be included in the command
file, it may also be specified via the interface once the model is loaded.
Data set to be modeled
Data Variables and Weighting
Model Parameter information
Dosing information/Constants
Model Options
To load a user compiled model in a command file:
1. Include the command MODEL 1000 C:\MYPATH\MYDLL.DLL in a com-
mand file. If no path is given, WinNonlin will expect to find MYDLL.DLL in
the directory containing the command file.
Note: Do not store a file named USRMOD.DLL in the installation directory. This is a
reserved name in WinNonlin.
WinNonlin
Users Guide
308
11
Code in boldface is
required in the
command file. All
else may be
specified via the
interface rather
than included in the
command file.
title
Fitting a system of two differential equations - data available on both
model 1000, 'c_uexp6.dll'
npar 3
pnames 'K12', 'K20', 'C0'
nder 2 <--- 2 diff. equations in the system
nfun 2 <--- data available on both equations
init .1, .05, 100
lower 0 0 0
upper 1 1 200
reweight -1 <--- iteratively reweight by 1/(pred. conc.)
nvar 3
fnum 3
data
0 100 1
1 85.34 1
2 79.44 1
3 79.13 1
4 71.18 1
5 56.2 1
10 29.66 1
15 17.47 1
20 10.8 1
25 5.81 1
30 3.23 1
40 .93 1
50 .32 1
60 .1 1
0 0 2
1 10.86 2
2 21.1 2
3 27.01 2
4 34.45 2
5 36.41 2
10 46.27 2
15 48.73 2
20 48.17 2
25 41.76 2
30 27.32 2
40 20.70 2
50 11.18 2
60 5.76 2
begin
finish
309
Chapter 12
Command Files
Storing and running models through WinNonlin
commands
A command file can store and run compartmental and noncompartmental
models. Command files do have some limitation in functionality: model ini-
tial parameter specification, Lambda Z range specification, dosing, and partial
areas can not be specified separately for each sort level in a command file.
Pharsight Model Objects (.PMOs) can also be used to store all information
required to run a compartmental or noncompartmental model. LinMix com-
mand (*.LML) files can be used to store linear mixed effects models.
Command file structure
A WinNonlin command file has three main components: Model definition,
Commands and Data.
WinNonlin
Users Guide
310
12
Model definition
The model definition section is a set of WinNonlin statements that define the
function(s) to be used to fit data. It may be as simple as calling up a pre-
defined model (either a WinNonlin model or a user model) or involve compli-
cated sequences of commands. Models which will be used more than once
should be stored in a user library and called using the model statement. See
User Models on page 273 for further information.
Commands
Commands that wont vary across sessions should be included in the model
file. When running WinNonlin using the WinNonlin interface, modeling
instructions are specified via dialog boxes. WinNonlin uses this input to create
commands which deliver this information. When a command file is used,
these commands are specified directly. The commands are placed after the
model definition and before the data set is specified.
WinNonlin commands are described in this chapter. They fall into two main
categories: model initialization and model options. The model initialization
commands provide WinNonlin with information to start the fitting process.
This includes initial values of parameters, constants (such as dosing informa-
tion), specification of variables, weighting and bounds on the parameters.
Model option statements determine the type of algorithm to use, appearance
of the output, etc.
Data
The data section indicates the data to be used by WinNonlin. This section may
simply be a reference to a data set, or the data itself may be included in the
command file.
It is generally best to store models in libraries and the data in Pharsight work-
books so that the models may be used with other data and the data may be
used with different models.
WinNonlin commands: basics
Each line in a WinNonlin command file begins with a WinNonlin command
followed by its arguments, if any. All commands can be abbreviated to the
first four letters of the command and can be in upper or lower case. After
Command Files
WinNonlin commands: basics
311
12
WinNonlin identifies the first four characters it then looks for the arguments,
if any, the command requires. All other characters are ignored.
Although commands may be up to 250 characters in length, it is possible to
split commands into multiple lines. This is done by adding an ampersand (&)
to the end of each line to be continued. The '&' must be preceded by at least
one space.
Commands which take two (2) or more numeric arguments may have the
arguments separated by spaces or commas.
A WinNonlin command file can be commented in two different ways. If a line
begins with the command REMARK, the entire line is considered to be a
comment. See the first line of the example below.
Alternatively, any text following the last argument is considered a comment.
In the example above, in lines 3 and 5, the references to Nelder-Mead consti-
tute comments following the Method statement.
Example
(The following are equivalent)
NVARIABLES, NVAR, nvariables, nvar
Example
INITIAL ARE.05 &
1.D-3 &
100
is equivalent to
INIT.05, 1D-3, 100
Examples of Comments
REMARK - USING NELDER-MEAD
or
METHOD 1: NELDER-MEAD
or
METHOD 1 NELDER-MEAD
WinNonlin
Users Guide
312
12
Model definition commands
The following commands are used to define functions. Details on each are
provided under Commands, Arrays and Functions on page 621. With one
exception noted below, predefined models do not require these commands.
NPARAMETERS NCONSTANTS
NSECONDARY NFUNCTIONS
NDERIVATIVES PNAMES
SNAMES PUNITS
DNAMES SUNITS
Note: All of these commands except NCONSTANTS are generally defined in the
Model block. In models with a fixed number of constants, NCONSTANTS
should also be defined in the Model block.
Loading ASCII models
To load an ASCII library model, include the following command in the com-
mand file:
MODEL n FILENAME
where n is the model number, and FILENAME is the appropriate library file
name.
Model initialization commands
Model initialization includes initial values of parameters, constants (such as
dosing information), specification of variables and bounds on the parameters.
Variables
WinNonlin must know what variables from the data worksheet are to be used
in the model fitting. The grid below is used in the descriptions that follow.
Command Files
Model initialization commands
313
12
The XNUMBER and YNUMBER commands tell WinNonlin which variables
or columns on the data grid to use as X and Y. The XNUMBER and YNUM-
BER commands have as their arguments the column number of the X and Y
variable, respectively. These commands must precede DATA. The following
example selects Time as the X variable, and Conc as the Y variable.
The SIMULATE command indicates that a simulation is to be performed.
This command should appear before the data command. Note that if SIMU-
LATE is used no Y variable is needed. If a YNUM statement is included it
will be ignored.
The SORT command has as its arguments the number 1, followed by the vari-
able(s) selected as sort variables. Although the number 1 included with this
command each time serves no purpose in the modeling for this version, it is
included to provide compatibility with PCNonlin Version 4. The following
example tells WinNonlin to use Study and Subject as sort variables.
Study Subject Time Conc Weight Type
1 1 0 3.8 1.9 1
1 1 .5 4.8 2.2 1
1 1 1 5.1 2.3 1
. . . . . .
Example - XNUMBER and YNUMBER
XNUMBER is 2
YNUM 3
Example - Simulate
XNUM 2
SIMULATE
Example - Sort variables
SORT 1, 1, 2
WinNonlin
Users Guide
314
12
When modeling two functions simultaneously there must be some way to
delineate which data observations belong with each function. This is most
easily done by including a dummy variable whose values are equal to the
number of the function (i.e. FUNC 1, FUNC 2, etc.). This variable is called a
Function variable.
The FNUMBER command has as its argument the number of a column to be
used as the Function variable. The following example tells WinNonlin to use
Type as the function variable.
The URINE command is used to specify variables when doing noncompart-
mental analysis for urine data (Models 210-212). These models require:
the beginning time of the urine collection interval,
the ending time of the urine collection interval,
the volume of urine collected, and
the concentration in the urine.
These are specified using a keyword and a column number as shown below.
where # is replaced with the appropriate column numbers on the data file.
Weighting
There are four ways of assigning weights, other than uniform weighting, for
compartmental modeling in WinNonlin
A
:
Example - Function variable
FNUM 6
Example - URINE command
URINE LOWER = # UPPER = # VOLUME = # CONCENTRATION = #
URINE CONC # VOLU # LOWE # UPPE #
A. Note that for Noncompartmental models, only option 1 is allowed.
Command Files
Model initialization commands
315
12
1. Instruct WinNonlin to weight by a power of the observed Y
(Weighted least squares).
2. Specify weights as the predicted value of Y to a specified power
(Iterative reweighting).
3. Include Weight as a variable in the data file.
4. Use programming statements to define weights as part of a user defined
model.
The command WEIGHT [W] specifies that weighted least squares computa-
tions are to be used. The optional argument indicates that the weight to use is
Y
W
. If W is not specified, one of the columns in the data set is used as the
weights. The default column is column 3. This may be overridden using the
WTNUMBER command.
Similarly, the REWEIGHT [W] command specifies that iterative reweighting
is to be done. The optional argument indicates that the weight to use is F
W
,
where F is the predicted response (also denoted as Yhat).
Note: If W and Y or Yhat are less than 0, then the corresponding weight is set to 0.
When weights are read from the data file or when weighted least squares is
used, the weights for the individual data values are scaled so that the sum of
the weights for each function is equal to the number of data values (with non-
zero weights). The scaling provides numerical stability but does not alter the
Example - Weighted Least Squares
WEIGHT -2
uses 1/Y
2
as the weight
WEIGHT
WTNUM 7 uses the values in Column 7 as the weights
WEIGHT uses the values in Column 3 as the weights
Example - Iterative Reweighting
REWEIGHT -.5 uses 1/sqrt(Yhat) as the weight
REWEIGHT 2 uses Yhat
2
as the weight
WinNonlin
Users Guide
316
12
final estimates of the parameters. The NOSCALE tells WinNonlin not to scale
the weights.
When writing a user model, the user may use programming statements to
define weights. When doing so, use the variable name WT. When using this
option, make sure the WT is always defined. For example, setting WT = 1/
(F*F) will generate an error if F ever takes on the value of zero.
Note: When the variable WT is specified in a model file, this specification will over-
ride any weighting specified via the Data Variables dialog box.
Note: When using the Windows interface, Variables and Weighting are specified
through the Data Variables Dialog Box
Model parameters
The NPARAMETERS command has as its argument the number of parame-
ters that are required for the model. The NPARAMETERS command must
precede the INITIAL, LOWER, and UPPER commands, if they are used.
The INITIAL command takes as its arguments the initial values of the param-
eters defined in the model. When doing a simulation, these are the parameter
values. If the initial command is not included, WinNonlin will attempt to
compute initial estimates. In most cases, boundaries will need to be included
to allow the computation of initial estimates.
The LOWER and UPPER commands have as their arguments the user-sup-
plied lower and upper boundaries. If bounds are not to be used, include the
NOBOUNDS command. If NOBOUNDS is not specified, and LOWER and
UPPER are not used, WinNonlin will calculate boundaries (providing that an
INITIAL command is given.)
Example - Defining weights with programming statements
WT = 1/(F*F) equivalent to using REWEIGHT -2
IF X > 10 THEN
WT=1/Y
ELSE
WT=1/(Y*Y)
ENDIF
sets the weight of the observation equal to 1/Y if the value of X is greater
than 10, or equal to 1/Y
2
if X is less than or equal to 10
Command Files
Model initialization commands
317
12
Names may be assigned to the parameters using the PNAMES command.
These names will be used in the output as labels, and may also be used in the
modeling code. See many of the example files provided with WinNonlin in
the Examples subdirectory; in particular, see BG2.CMD or EXP10.CMD.
When using a library model which includes a PNAMES command and enter-
ing parameter information through the WinNonlin interface, the parameter
names will be displayed when the Model parameters dialog box opens.
Note: If the INITIAL statement is included in a command file, rather than being
input via the WinNonlin interface, then the NPARAMETERS must proceed
the INITIAL statement. However, the NPARAMETERS statement is not nec-
essary when fitting models in WinNonlin's library of models, as NPAR is
stored as part of the model or definition commands in the library.
Dosing regimen
WinNonlin uses constants to communicate dosing information. See the Win-
Nonlin library models for examples of the use of constants.
The NCONSTANTS command has as its arguments the number of constants
required for the model. For a given model this may be fixed, or it may vary.
For example, for models with multiple dosing, this number will vary. If the
number of constants is fixed it is generally easiest to include this statement in
a COMMANDS block in the model file.
The CONSTANTS command has as its arguments any constants defined in
the model. There must be a value for each constant specified in the model.
Example
NPAR 3
INIT .1, .05, 10
LOWER 0, 0, 0
UPPER 1, .5, 100
User supplied boundaries
NPAR 3
INIT .1, .05, 10
WinNonlin will compute bounds on the parameters
NPAR 3
INIT .1, .05, 10
NOBO
No boundaries will be used
WinNonlin
Users Guide
318
12
Note: Remember that the NCONSTANTS command must be specified prior to the
CONSTANTS command.
Model options
Headers
The TIME and DATE commands tell WinNonlin to include the current time
and date, respectively, on the output.
The TITLE [N] command indicates that the following line contains a title to
be printed on each page of the output. Up to five titles may be included. To
specify any title other than the first, a value N must be included with the
TITLE command. N may take on the values 1 through 5.
Example
NCON 3
REMARK # Doses, Dose 1, Time of Dose 1
CONSTANTS 1 50 0
NCON 5
CONS 2, 50, 0, 25, 6
Example
TIME
DATE
Example
TITLE
Experiment A-4115
TITLE
Experiment A-4115
TITLE 2
Subject #1
Command Files
Model initialization commands
319
12
Output options
The NOPLOTS command tells WinNonlin not to include plots in the output.
The NOPAGE command excludes page breaks in the ASCII output.
Settings
When modeling, the METHOD command specifies the type or fitting algo-
rithm WinNonlin is to use. The argument N takes on the following values:
1. Nelder-Mead Simplex
2. Levenberg and Hartley modification of Gauss-Newton algorithm
3. Hartley modification of Gauss-Newton algorithm
When doing noncompartmental analysis, the METHOD command specifies
the method to be used to compute area under the curve. The argument N takes
on the following values:
1. Lin/Log - Linear trapezoidal rule up to Tmax, and log trapezoidal rule for
the remainder of the curve.
2. Linear Trapezoidal rule (Linear Interpolation)
3. Linear Up/Log Down
4. Linear Trapezoidal (Linear/Log Interpolation)
Method 2 is the default method in each case.
The DINCREMENT command has as its argument the increment for partial
derivatives. The default is 0.001. This default should generally not be altered.
The NPOINTS command has as its argument the number of predicted values
to be produced for the plots. The default is 1000
A
.
The CONVERGENCE command has as its argument the value for Conver-
gence Criteria. The default is 0.0001.
The MEANSQUARE has as its argument the value to be used for Mean-
square.
A. For WinNonlin library models, the defaults are as follows:
IV bolus or extravascular administration: 1000 + the number of administered doses
IV infusion: 1000 + the number of doses times 2.
WinNonlin
Users Guide
320
12
The ITERATIONS command has as its argument the number of iterations to
be performed. (The default is 500 for Method 1 and 50 for Methods 2 and 3.)
The SIZE command has as its argument the model size. Model size sets
default memory requirements. It may range from 1 to 65, the default size is 4.
Model size is only applicable when using ASCII models.
Data commands
Generally data are stored in WinNonlin worksheets so that the data may be
used with different models and/or processed further (plots, descriptive statis-
tics, etc.). This section describes both how to indicate the WinNonlin grids to
be used, and how to include data and information about the data in a com-
mand file.
The name of the file the data are stored in may be specified by the DATA
command. If the file name is omitted, the program assumes that the data begin
immediately following the DATA command.
When creating a command file with an ASCII model with NFUNCTIONS
greater than 1, and a FNUMBER variable to tell WinNonlin which variable is
the Function variable has not been specified, a NOBSERVATIONS command
must be included. The arguments for this command are the number of obser-
vations to be used for each function. If used, the NOBS command must be
placed prior to the DATA command.
Examples
DATA are in 'MYDATA.FIL
DATA 'B:TEST.DTA
DATA
.5 1.3
.75 1.7
Examples
One function: NOBSERVATIONS ARE 15
(Optional)
Two functions: NOBS 15, 18
Command Files
Data commands
321
12
Note: Note that the ability to use the NOBS statement in this way is provided for
compatibility with PCNonlin. The recommended method for indicating which
observations are to be used with each function, is the use of a FUNCTION
variable. An example of the use of a function variable is shown below.
Values in the data file can be accessed via the DTA( ) array. For a given obser-
vation, the value in column one of the input data file is stored in DTA(1), the
value in column two is stored in DTA(2), etc. This permits models to be func-
tions of more than one independent variable. Statements such as
X3 = DTA(3) and X34 = DTA(3) * DTA(4)
are permissible when defining the model.
The SORT command may be used to fit data subsets from a large database,
one at a time. Multiple SORT variables, e.g. subject, and formulation may be
used to define unique profiles for processing.
Three functions: NOBS 15, 18, 12
Examples
Example: FNUM
REMA Using a FUNCTION variable to indicate to which func-
tion data belongs.
NFUN 2
FNUM 3
DATA
0 0
.25
.50
1.0
2.0
4.0
0
.3
.5
.4
.25
.15
1
1
1
1
1
1
start of data for function 1
0
.25
.50
1.0
2.0
4.0
0
.28
.45
.43
.30
.30
2
2
2
2
2
2
start of data for function 2
WinNonlin
Users Guide
322
12
The model that is to be fit can be a function of several independent variables.
XNUMBER specifies the variable that will be plotted on the horizontal axis in
plots 1 and 4 (see NOPLOTS on page 632). In addition, if the model is
defined by a system of one or more differential equations (NDERIVA-
TIVES>0), then XNUM is used to signify which variable the differential
equations are with respect to (e.g., time).
If XNUM is omitted, the program assumes that the primary independent vari-
able corresponds to the first column in the data file.
The column in the data file that corresponds to the dependent variable (e.g.,
concentration) is specified via the YNUMBER command.
If YNUM is omitted, the program assumes that the dependent variable corre-
sponds to the second column in the data file.
If the user has specified that weights are to be read in from the data file (via
the WEIGHT command), the program assumes that the weights are in the
third column on the data file. If this is not the case, the column number must
be specified by using the WTNUMBER command.
Note: See Model definition commands on page 312.
Execution control statements
The BEGIN statement indicates that the commands for a problem have ended
and that processing can begin.
The FINISH statement tells WinNonlin that no more commands will follow.
This command is included to ensure compatibility with PCNonlin Version 4.
It should immediately follow the BEGIN command.
Example
YNUM is 4
XNUM is 3
Command Files
Execution control statements
323
12
Example - using BEGIN and FINISH
.
DATA
1 .05
2 1.0
3 2.0
6 1.0
8 .05
BEGIN
FINISH
WinNonlin
Users Guide
324
12
325
Chapter 13
Weighting
Weighted nonlinear regression
WinNonlin provides flexibility in performing weighted nonlinear regression
and using weighted regression. Weights are assigned after loading a model,
via the Model Options dialog box (Model>Model Options).
There are three ways of assigning weights, other than uniform weighting,
through the WinNonlin user interface:
1. Weighted least squares: weight by a power of the observed value of Y
2. Iterative reweighting: weight by a power of the predicted value of Y
3. Reading weights from the data file: include weight as a column in the data
For a user ASCII model, programming statements may also be used to define
weights as part of the model.
Weighted least squares
When using weighted least squares, WinNonlin weights each observation by
the value of the dependent variable raised to the power of n, i.e., WEIGHT =
Y
n
. For example, selecting this option, and setting n = -0.5 instructs WinNon-
lin to weight the data by the square root of the reciprocal of observed Y, i.e.,
.
If n has a negative value, and one or more of the Y values are less than or
equal to zero, then the corresponding weights are set to zero.
The program scales the weights such that the sum of the weights for each
function equals the number of observations with non-zero weights. See Scal-
ing of weights on page 326.
1 Y ( )
WinNonlin
Users Guide
326
13
Iterative reweighting
Iterative Reweighting redefines the weights for each observation to be F
n
,
where F is the predicted response. For example, selecting this option, and set-
ting n = -0.5 instructs WinNonlin to weight the data by the square root of
reciprocal of the predicted value of Y, i.e.,
.
As with Weighted least squares, if N is negative, and one or more of the pre-
dicted Y values are less than or equal to zero, then the corresponding weights
are set to zero.
Iterative reweighting differs from weighted least squares in that for weighted
least squares the weights are fixed. For iteratively reweighted least squares the
parameters change at each iteration, and therefore the predicted values and the
weights change at each iteration.
For certain types of models, iterative reweighting can be used to obtain maxi-
mum likelihood estimates (see the article by Jennrich and Moore in the Refer-
ences).
Reading weights from the data file
It is also possible to have a variable in the data file which has as its values the
weights to use. The weights should be the reciprocal of the variance of the
observations. As with Weighted Least Squares, the program will scale the
weights such that the sum of the weights for each function equals the number
of observations with non-zero weights (see Scaling of weights).
Scaling of weights
When weights are read from the data file or when weighted least squares is
used, the weights for the individual data values are scaled so that the sum of
the weights for each function is equal to the number of data values (with non-
zero weights).
The scaling of the weights has no effect on the model fitting as the weights of
the observations are proportionally the same. However, scaling of the weights
provides increased numerical stability.
Consider the following example:
1 Y
( )
Weighting
Weights in ASCII models
327
13
Suppose weighted least squares with the power -2 was specified (i.e., weight-
ing by 1/Y*Y). The corresponding values are as shown in the third column.
Each value of Y
-2
is divided by the sum of the values in the third column, and
then multiplied by the number of observations, e.g.,
(0.0277778/.0452254) * 3 = 1.8426238, or 1.843 after rounding.
Note that 0.0278/0.0051 is the same proportion as 1.843/0.338.
Note: Scaling can be turned off by selecting the No Scaling of Weights option on
the Weight tab of the Model Options dialog or by using the NOSCALE com-
mand in a command file.
Weights in ASCII models
When writing a custom ASCII model, it is possible to define the weights
using programming statements at the same time the model is defined. WT is a
special variable name in WinNonlin. If the variable WT is defined with pro-
gramming statements, this variable overrides any weighting specified in the
WinNonlin Model Options dialog. Consider the following example:
X Y Y
-2
Weight assigned
by WinNonlin
1 6 0.0278 1.843
10 9 0.0123 0.819
100 14 0.0051 0.338
Sum 0.0452 3.000
MODEL
TRANSFORM
IF X > 10 THEN
WT = 1/Y
ELSE
WT = 1/(Y*Y)
ENDIF
END
(additional statements here)
WinNonlin
Users Guide
328
13
The above statements would set the weight of the observation equal to 1/Y if
the value of X is greater than 10, and 1/Y
2
if X is less than or equal to 10. As
the values of Y are constant across iterations, the corresponding weights are
also constant. However, it is also possible to use programming statements to
iteratively reweight the observations, as shown in the following example:
This is equivalent to specifying Predicted to power n = -2. (See Iterative
reweighting on page 326.)
Each function to be fit can use a different weighting scheme. For example:
MODEL
FUNC 1
F = A*EXP(-ALPHA*X) - A*EXP(-BETA*X)
WT = 1/(F*F)
END
(additional statements here)
MODEL
TEMP
(additional statements here)
END
FUNC 1
(additional statements here)
WT = (some function)
END
FUNC 2
(additional statements here)
WT = (a different function)
END
(additional statements here)
329
Chapter 14
The WinNonlin Toolbox
Nonparametric Superposition, Semicompartmental
Modeling, Crossover Design, and Deconvolution
The WinNonlin toolbox includes the following four tools:
Nonparametric superposition: used to predict drug concentrations after
multiple dosing at steady state.
Semicompartmental modeling: estimates effect-site concentration given
plasma concentration and a value for Ke0.
Crossover design: performs nonparametric statistical tests; calculates con-
fidence intervals for treatment median and median difference between
treatments, and estimates relevance of direct, residual, and period effects.
Deconvolution: used to evaluate in vivo drug release and delivery based
on data for a known drug input.
Example are provided in the Examples Guide.
Nonparametric superposition
In pharmacokinetics it is often desirable to predict the drug concentration in
blood or plasma after multiple doses, based on concentration data from a sin-
gle dose. This can be done by fitting the data to a compartmental model with
some assumptions about the absorption rate of the drug. An alternative
method is based on the principle of superposition, which does not assume any
pharmacokinetic (PK) model.
WinNonlins nonparametric superposition function is used to predict drug
concentrations after multiple dosing at steady state, and is based on noncom-
partmental results describing single dose data. The predictions are based upon
an accumulation ratio computed from the terminal slope (lambda z). The fea-
ture allows predictions from simple (the same dose given in a constant inter-
WinNonlin
Users Guide
330
14
val) or complicated dosing schedules. The results can be used to help design
experiments or to predict outcomes of clinical trials when used in conjunction
with the semicompartmental modeling function.
Noncompartmental Superposition assumes that each dose of a drug acts inde-
pendently of every other dose; that the rate and extent of absorption and aver-
age systemic clearance are the same for each dosing interval; and that linear
pharmacokinetics apply, so that a change in dose during the multiple dosing
regimen can be accommodated.
Data and assumptions
In order to predict the drug concentration resulting from multiple doses, one
must have a complete characterization of the concentration-time profile after
a single dose. That is, it is necessary to know C(t
i
) at sufficient time points t
i
,
(i=1,2,,n), to characterize the drug absorption and elimination process. Two
assumptions about the data are required: independence of each dose effect,
and linearity of the underlying pharmacokinetics. The former assumes that the
effect of each dose can be separated from the effects of other doses. The latter,
linear pharmacokinetics, assumes that changes in drug concentration will vary
linearly with dose amount.
The required input data are the time, dosing, and drug concentration. The drug
concentration at any particular time during multiple dosing is then predicted
by simply adding all the concentration values in a row.
Note: User-defined terminal phases apply to all sort keys. In addition, dosing sched-
ules and doses are the same for all sort keys.
Computation method
Given the concentration data points C(t
i
) at times t
i
, (i=1,2,,n), after a single
dose D, one may obtain the concentration C(t) at any time t through interpola-
tion if t
1
< t <t
n
, or extrapolation if t > t
n
. The extrapolation assumes a log-lin-
ear elimination process; that is, the terminal phase in the plot of log(C(t))
versus t is approximately a straight line. If the absolute value of that lines
slope is
z
and the intercept is ln(), then C(t) = exp(-
z
t) for t > t
n
.
The slope
z
and the intercept are estimated by least squares from the terminal
phase; the time range included in the terminal phase is specified by the user. If
the user does not specify the terminal phase, estimates from the best linear fit
The WinNonlin Toolbox
Nonparametric superposition
331
14
(based on adjusted R-square as in noncompartmental analysis) will be used.
The half life is ln(2)/
z
.
Suppose there are m additional doses D
j
, j = 1,,m, and each dose is adminis-
tered after
j
time units from the first dose. The concentration due to dose D
j
will be C
j
(t) = (D
j
/ D)C(t-
j
), where t is time since the first dose and
C(t-
j
) = 0 for t
j
. The total predicted concentration at time t will be:
Conc(t) =
j
C
j
(t), j=1,2,,m
If the same dose is given at constant dosing intervals , and is sufficiently
large that drug concentrations reflect the post-absorptive and post-distributive
phase of the concentration-time profile, then steady state can be reached after
sufficient time intervals. Let the concentration of the first dose be C
1
(t) for
0 < t < . The concentration at time t after n
th
dose will be:
C
n
(t) = C
1
(t) + exp[-(t+)] + exp[-(t+2)]
++ exp[-(t+(n-1))]
= C
1
(t) + exp[-(t+)]{1-exp[-(n-1)]} / [1-exp(-)]
As n, the steady state (ss) is reached:
C
ss
(t) = C
1
(t) + exp[-(t+)]/[1-exp(-)]
To display the concentration curve at steady state, WinNonlin assumes steady
state is at ten times the half life.
For interpolation, WinNonlin offers two methods: linear interpolation and
log-interpolation. Linear interpolation is appropriate for log-transformed con-
centration data and is calculated by:
C(t) = C(t
i-1
) + [C(t
i
)-C(t
i-1
)]*[t- t
i-1
]/[t
i
- t
i-1
],
t
i-1
< t < t
i
Log-interpolation is appropriate for original concentration data, and is evalu-
ated by:
C(t) = exp{log(C(t
i-1
))+[log(C(t
i
))-log(C(t
i-1
))]*(t-t
i-1
)/(t
i
-t
i-1
)}, t
i-1
< t < t
i
For more information see Appendix E of Gibaldi and Perrier (1982).
WinNonlin
Users Guide
332
14
Performing nonparametric superposition
To perform nonparametric superposition:
1. Make sure that the data set to use is open and active.
2. Select Nonparametric Superposition from the Tools menu. The Nonpara-
metric Superposition dialog appears. The data set name appears in the list box
at the top of the dialog and the variables in the data set appear in the Variables
list.
3. Drag the Time variable to the Time for First Dose field.
4. Drag the Concentration variable to the Concentration for First Dose field.
5. If using sort variables, drag them to the Sort Variables field.
A separate analysis is performed for each unique combination of sort variable
values. During the processing, WinNonlin checks for duplicate time values
and prompts if sort variables have not been specified.
6. Select the number of output data points. The default is 100.
7. Select the method for computationslinear or logarithmic.
8. If the dosing is regular, enter the initial dose in the Initial Dose field.
Enter the maintenance dose.
Enter the value for Tau, the dosing interval, in time units matching
those of the time variable in the data set.
Select whether to display the chart at steady state or at a particular
dose.
The WinNonlin Toolbox
Nonparametric superposition
333
14
or
If the dosing is variable, enter all times and doses. If necessary, copy an entry
by dragging the handle of a cell down in the grid.
If the dosing repeats, click the Repeat every x time units box and
enter the number for the time units.
Enter the values for the output time range.
9. (Optional) Select the Define Terminal Phase check box and enter the start
and end times for the terminal phase.
10. Click Calculate. WinNonlin performs the calculations and generates two new
windows, a Nonparametric Superposition Workbook and a Nonparametric
Superposition Chart.
Output
Nonparametric Superposition generates two products: a workbook containing
predicted concentrations and lambda z values, and a graph of predicted con-
centration over time.
Workbook
The workbook contains two worksheets, Concentrations and Lambda z. The
Concentrations worksheet contains the times and concentrations for each
level of the sort variables. If a regular dosing schedule is selected, this output
represents the times and concentrations between two doses at steady state. If a
variable dosing schedule is selected, the output is the times and concentrations
within the supplied output range. The Lambda z worksheet contains the
lambda z value and the half-life for each sort key.
WinNonlin
Users Guide
334
14
Figure 14-1. The Concentrations worksheet of the NonParametric Superposition
workbook
Figure 14-2. The Lambda z worksheet of the Nonparametric Superposition workbook.
The WinNonlin Toolbox
Semicompartmental modeling
335
14
Chart
The chart generated by Nonparametric Superposition plots Time versus Pre-
dicted Concentration.
Figure 14-3. The Nonparametric Superposition output chart
More information on superposition can be found in Appendix E of Gibaldi
and Perrier (1982).
Units
When the X-variable and Y-variable have units specified, those units are used
and carried through in nonparametric superposition. The output workbook
displays units: Time (in X-units) and Concentration (in Y-units). The output
chart carries units in the axis labels automatically.
There is no ability to enter units or perform conversions with units. As a
result, the dosing interval should be in the same units (X-units) as the input
data.
Semicompartmental modeling
Semicompartmental modeling was proposed by Kowalski and Karim (1995)
for modeling the temporal aspects of the pharmacokinetic-pharmacodynamic
WinNonlin
Users Guide
336
14
relationship of drugs. This model was based on the effect-site link model of
Sheiner et al (1979) to estimate effect-site concentration C
e
by using a piece-
wise linear model for plasma concentration C
p
rather than specifying a PK
model for C
p
. The potential advantage of this approach is reducing the effect
of model misspecification for C
p
when the underlying PK model is unknown.
WinNonlins semicompartmental modeling estimates effect-site concentra-
tions for given times and plasma concentrations and an appropriate value of
keo. This function should be used when a counterclockwise hysteresis is
observed in the graph of effect versus plasma concentrations. The hysteresis
loop collapses with the graph of effect versus effect-site concentrations.
A scientist developing a PK/PD link model based upon simple IV bolus data
can use this function to compute effect site concentrations from observed
plasma concentrations following more complicated administration regimen
without first modeling the data. The results can then be compared to the origi-
nal data sets to determine if the model suitably describes pharmacodynamic
action after the more complicated regimen.
Data and assumptions
Drug concentration in plasma C
p
for each subject is measured at multiple time
points after the drug is administrated. To minimize the bias in estimating C
e
,
the time points need to be adequately sampled such that accurate estimation of
the AUC by noncompartmental methods can be obtained. Effect-site link
model is used and the value of the equilibration rate constant k
eo
that accounts
for the lag between the C
p
and the C
e
curves is required. A piecewise log-lin-
ear model is assumed for C
p
.
Computation method
In the effect-site link model (Sheiner et al 1979), a hypothetical effect com-
partment was proposed to model the time lag between the PK and PD
responses. The effect site concentration C
e
is related to C
p
by first-order dis-
position kinetics and can be obtained by solving the differential equation
where k
eo
is a known constant. In order to solve this equation, one needs to
know C
p
as a function of time, which is usually given by compartmental PK
models.
) (
e p eo
e
C C k
dt
dC
=
The WinNonlin Toolbox
Semicompartmental modeling
337
14
Here, use a piecewise linear model for C
p
C
p
(t) = + (t-t
j-1
) t
j-1
< t < t
j
where = ( )/( t
j
t
j-1
) and .
Using the above two equations can lead to a recursive equation for C
e
The initial condition is C
p
(0) = C
e
(0) =0.
One can also assume a log-linear piecewise PK model for C
p
C
p
(t) = exp[ - (t-t
j-1
)] t
j-1
< t < t
j
where = (ln - ln )/( t
j
- t
j-1
), and
The and are estimated by a linear method, assuming:
C
e
(0) =C
p
(0) = 0.
WinNonlin provides three methods. The linear method uses linear piecewise
PK model; the log method uses log-linear piecewise PK model; the default
log/linear method uses linear to Tmax and then log-linear after Tmax. Effect
field is not used for the calculation of C
e
but when it is provided, the E-C
p
and
E-C
e
plot will be plotted.
Performing semicompartmental modeling
To perform semicompartmental modeling:
1. Make sure that the data set to use is open and active.
2. Select Semicompartmental modeling from the Tools menu. The Semicom-
partmental Modeling dialog appears with the variables from the data set
listed.
3. Drag the appropriate variable to the Time field.
C
p
j 1
j
C
p
j
C
p
j 1
C
p
j 1
C
p
t
j 1
( ) =
) ( ] 1 )[ (
1
) ( ) (
1
1
1
1
+ + =
j j j
t t k
eo
j
p
t t k
e e
t t e
k
C e C C
j j eo
j
j j eo
j j
C
p
j 1
j
C
p
j 1
C
p
j
] [
) ( ) ( ) (
1 1
1
1
1
+ =
j j eo j j j
j
j j eo
j j
t t k t t
j eo
eo
p
t t k
e e
e e
k
k
C e C C
1
C
e
1
WinNonlin
Users Guide
338
14
4. Drag the appropriate variable to the Plasma Concentration field.
5. If effect data are in the data set, drag it to the Effect field.
6. Enter the value for Keo, the equilibration rate constant.
7. (Optional) Drag the appropriate variables to the Sort Variables list.
8. Select the method for computation.
9. Click Calculate. WinNonlin performs the computations and generates a new
workbook and a new chart window.
Output
Workbook
WinNonlin creates a new worksheet with the following data: any sort keys,
Time, Conc, Ce, and Effect (if supplied).
The WinNonlin Toolbox
Semicompartmental modeling
339
14
Figure 14-4. The Semicompartmental Modeling output workbook.
Chart
The chart window contains charts plotting Cp versus Time (figure 14-5) and
Ce versus Time (figure 14-6). If Effect is included in the data set, plots of
Effect versus Cp (figure 14-7) and Effect versus Ce (figure 14-8) are also cre-
ated. The plots are displayed on separate tabs within the chart window.
WinNonlin
Users Guide
340
14
Figure 14-5. Cp vs. Time plot
Figure 14-6. Ce vs. Time plot
The WinNonlin Toolbox
Semicompartmental modeling
341
14
Figure 14-7. E vs. Cp plot
Figure 14-8. E vs. Ce plot
Units
When the input data set has units associated with the X-variable (X-units) and
Y-variable (Y-units), those units are carried through in the calculations in
WinNonlin
Users Guide
342
14
semicompartmental modeling. The workbook output automatically displays
units in the column headers for Time (X-units), Concentration (Y-units),
plasma concentration (Cp) (Y-units), and effect site concentration (Ce) (Y-
units).
When the data set has multiple sort levels, each plot is labeled with the profile
information.
Crossover design
The two-period crossover design is common for clinical trials in which each
subject serves as his or her own control. In many situations the assumptions of
variance homogeneity and normality, relied upon in parametric analyses, may
not be justified due to small sample size, among other reasons. The nonpara-
metric methods proposed by Koch (1972) can be used to analyze such data.
WinNonlins Crossover Design tool performs statistical analysis of data aris-
ing from subjects when variance homogeneity and normality may not neces-
sarily apply. This tool performs nonparametric statistical tests on variables
such as Tmax and provides two categories of results. First, it calculates confi-
dence intervals for each treatment median. It then calculates the median dif-
ference between treatments and the corresponding confidence intervals.
Finally, it estimates the relevance of direct, residual, and period effects.
Data and assumptions
Consider a trial testing the relative effects of two treatments, Test (T) and Ref-
erence (R). Suppose that n subjects are randomly assigned to the TR
sequence, in which subjects are given treatment T first, then treatment R fol-
lowing an adequate washout period. Similarly, m subjects are assigned to the
RT sequence. Y represents the outcome of the trial (for example Cmax or
Tmax) and y
ijk
is the value observed on sequence i (i=1,2), subject j
(j = 1,2,,n, n+1,n+m) and period k (k = 1,2). Treatment is implied by
sequence i and period k, for example i=1 and k=1 is treatment T; i=1 and k=2
is treatment R. The data are listed in columns 1 through 4 of the following
table.
The WinNonlin Toolbox
Crossover design
343
14
Column 5 gives the sum (S) of columns 3 and 4; it is the within-subject sum
of Y for the two periods. Similarly D in column 6 is the within-subject differ-
ence in Y between the two periods.
s
ij
= y
ij1
+ y
ij2
;
d
ij
= y
ij1
- y
ij2
;
C in Column 7 represents the within-subject crossover difference, defined as:
c
ij
= y
ij1
- y
ij2
, if i=1
= y
ij2
- y
ij1
, if i=2
Descriptive analysis
The median response and its confidence interval are calculated for Y of each
treatment and the crossover difference between treatments, C. Let X
(1)
,
X
(2)
,, X
(N)
be the order statistic of samples X
1
, X
2
,, X
N
. The median Xm
is defined as:
Xm = [X
(N/2)
+X
(N/2+1)
]/2, if N is even
= X
[(N+1)/2]
, if N is odd
The 100p% confidence interval (CI) of Xm is defined as follows.
For N <= 20, the exact probability for a binomial distribution is used:
Table 14-1. Representation of the data
Sequence (i) Subject (j) Y
ij1
Y
ij2
S
ij
D
ij
C
ij
TR 1 y
111
y
112
s
11
d
11
c
11
..
TR n y
1n1
y
1n2
s
1n
d
1n
c
1n
RT n+1 y
2(n+1)1
y
2(n+1)2
s
2(n+1)
d
2(n+1)
c
2(n+1)
RT n+m y
2(n+m)1
y
2(n+m)2
s
2(n+m)
d
2(n+1)
c
2(n+1)
WinNonlin
Users Guide
344
14
X
l
= X
(L)
, where L = max
X
u
= X
(U)
, where U = min
The exact probability is .
For N > 20, normal approximation is used:
X
l
= X
(L)
, where L =
X
u
= X
(U)
, where U =
where int(X) returns the largest integer less than or equal to X.
Hypothesis testing
Four hypotheses are of interest:
1. no sequence effect (or drug residual effect);
2. no treatment effect given no sequence effect;
3. no period effect given no sequence effect; and
4. no treatment and no sequence effect.
Hypothesis 1, above, can be tested using the Wilcoxon statistic on the sum S.
If R(S
l
) is the rank of S
ij
in the whole sample, l = 1,.., n+m. The test statistic
is:
i:
N
i
\ .
| |
2
N
i 1 =
N
1 p ( ) 2 <
\ .
|
|
| |
1 +
i:
N
i
\ .
| |
2
N
i 1 =
N
1 p + ( ) 2 >
\ .
|
|
| |
1
N
i
\ .
| |
2
N
i L =
U
int
N
2
---- z
1 p +
2
------------
N
2
--------
\ .
|
| |
1 +
N int
N
2
---- z
1 p +
2
------------
N
2
--------
\ .
|
| |
R
l
l n 1 + =
n m +
nm n m 1 + + ( ) 12
R
ik
R
i j k
n
i
j 1 =
n
i
R
i 1
R
i 2
j
R
i j 1
M ( )
2
R
i j1
M ( ) R
i j2
M ( )
R
i j1
M ( ) R
i j 2
M ( ) R
i j2
M ( )
2
WinNonlin
Users Guide
346
14
Using the Crossover Design tool
To utilize crossover design:
1. Make sure that the data set to use is open and active.
2. Select Crossover Design from the Tools menu. The Crossover Design dialog
appears.
3. Select whether the treatment data are in separate columns or stacked in the
same column. For this illustration it is assumed that the treatment data are
stacked in the same column.
4. Drag the subject variable from the Variables list box to the Subject field.
5. Drag the sequence variable from the Variables list to the Sequence field.
6. Drag the treatment variable from the Variables list to the Treatment field.
7. Drag the response variable from the Variables list to the Response field.
8. (Optional) If using Sort variables, to identify individual data profiles, drag
them to that field.
9. Click Calculate. WinNonlin performs the calculations and generates a new
workbook as output.
Output
Crossover Design creates only one form of output, a new workbook with mul-
tiple worksheets. See figures 14-9 and 14-10.
The WinNonlin Toolbox
Crossover design
347
14
Figure 14-9. The Crossover Design output workbook.
The first sheet lists the confidence intervals (at 80%, 90%, and 95%) for the
treatment medians in the crossover data and the treatment difference median.
Figure 14-10. The Effects tab of the Crossover Design workbook.
WinNonlin
Users Guide
348
14
The second sheet is labeled Effects. It lists the test statistic and p-value associ-
ated with each of four tests.
Units
When the input data set has units associated with the X-variable (X-units) and
Y-variable (Y-units), those units are carried through in the calculations in
crossover design. The output workbooks display units in the median, lower,
and upper value parameters. Only the X- and Y-variables carry units.
Deconvolution
Deconvolution is used to evaluate in vivo drug release and delivery when data
from a known drug input are available. Depending upon the type of reference
input information available, the drug transport evaluated will either be a sim-
ple in vivo drug release (e.g., gastro-intestinal release) or it will be a compos-
ite form, typically consisting of an in vivo release followed by a drug delivery
to the general systemic circulation. See Using deconvolution on page 356
for instructions on performing deconvolution.
Perhaps the most common application of deconvolution is in the evaluation of
drug release and drug absorption from orally administered drug formulations.
In this case, the bioavailability is evaluated if the reference input is a vascular
drug input. Similarly, gastro-intestinal release is evaluated if the reference is
an oral solution (oral bolus input).
The Deconvolution feature is not limited in scope to drug delivery via the oral
route. It considers other types of delivery, including transdermal release and
delivery, drug delivery from implanted devices, etc.
Deconvolution provides automatic calculation of the drug input. It also allows
the user to direct the analysis to investigate issues of special interest through
different parameter settings and program input.
Deconvolution methodology
The methodology is based on linear system analysis with linearity defined in
the general sense of the linear superposition principle. It is well recognized
that classical linear compartmental kinetic models exhibit superposition lin-
earity due to their origin in linear differential equations. However, all kinetic
models defined in terms of linear combinations of linear mathematical opera-
The WinNonlin Toolbox
Deconvolution
349
14
tors (e.g. differentiation, integration, convolution, deconvolution, etc.) consti-
tute linear systems adhering to the superposition principle. The scope and
generality of the linear system approach thus ranges far beyond linear com-
partmental models. To fully appreciate the power and generality of the linear
system approach, it is best to depart from the typical, physically structured
modeling view of pharmacokinetics. To cut through all the complexity and
objectively deal with the present problems, it is best to consider the kinetics of
drug transport in a non-parametric manner and simply use stochastic transport
principles in the analysis.
Convolution/deconvolution - stochastic background
The convolution/deconvolution principles applied to evaluate drug release
and drug input (absorption) can be explained in terms of point A to point B
stochastic transport principles. For example, consider the entry of a single
drug molecule at point A at time 0. Let B be a sampling point (a given sam-
pling space or volume) anywhere in the body (e.g. a blood sampling) that can
be reached by the drug molecule entering at A. The possible presence of the
molecule at B at time t is a random variable due to the stochastic transport
principles involved. Imagine repeating this one molecule experiment an infi-
nite number of times and observing the fraction of times that the molecule is
at B at time t. That fraction represents the probability that a molecule is at
point B given that it entered point A at time 0. Denote this probability by the
function g(t).
Next, consider a simultaneous entry a very large number (N) of drug mole-
cules at time 0, e.g., a bolus injection. Let it be assumed that there is no signif-
icant interaction between the drug molecules, such that the probability of a
drug molecule's possible arrival at sampling site B is not significantly affected
by any other drug molecule. Then the transport to sampling site B is both ran-
dom and independent. In addition the probability of being at B at time t is the
same and equals g(t) for all of the molecules. It is this combination of inde-
pendence and equal probability that leads to the superposition property that in
its most simple form reveals itself in terms of dose-proportionality. For exam-
ple, in the present case the expected number of drug molecules to be found at
sampling site B at time t (N
B
(t)) is equal to Ng(t). It can be seen from this that
the concentration of drug at the sampling site B at the arbitrary time t is pro-
portional to the dose (N is proportional to the dose and g(t) does not depend
on the dose due to the independence in the transport).
Now let's further assume that the processes influencing transport from A to B
are constant over time. The result is that the probability of being at point B at
time t depends on the elapsed time since entry at A, but is otherwise indepen-
WinNonlin
Users Guide
350
14
dent of the entry time. Thus the probability of being at B for a molecule that
enters A at time t
A
is g(t-t
A
). This assumed property is called time-invariance.
Consider again the simultaneous entry of N molecules, but now at time t
A
instead of 0. Combining this property with those of independent and equal
probabilities, i.e., superposition, results in an expected number of molecules
at B at time t given by N
B
(t) = Ng(t-t
A
).
Suppose that the actual time at which the molecule enters point A is unknown.
It is instead a random quantity t
A
distributed according to some probability
density function h(t), i.e.,
The probability that such a molecule is at point B at time t is the average or
expected value of g(t-t
A
) where the average is taken over the possible values
of t
A
according to
Causality dictates that g(t) must be 0 for any negative times, i.e., a molecule
can't get to B before it enters A. For typical applications drug input is
restricted to non-negative times so that h(t) = 0 for t < 0. As a result
is nonzero only over the range from 0 to t and the equation
becomes
Suppose again that N molecules enter at point A but this time they enter at
random times distributed according to h(t). This is equivalent to saying that
the expected rate of entry at A is given by . As argued
before, the expected number of molecules at B at time t is the product of N
and the probability of being at B at time t, i.e.,
Converting from number of molecules to mass units:
Pr t
A
t ( ) h u ( ) u d
0
t
=
A A A
dt t h t t g t g ) ( ) ( ) (
g t t
A
( )h t
A
( )
=
t
A A A
dt t h t t g t g
0
) ( ) ( ) (
N
A
t ( ) Nh t ( ) =
= = =
t
A A A A
t
A A A B
dt t N t t g dt t h t t g N t g N t N
0 0
) ( ) ( ) ( ) ( ) ( ) (
The WinNonlin Toolbox
Deconvolution
351
14
where M
B
(t) is the mass of drug at point B at time t and f(t) is the rate of entry
in mass per unit time into point A at time t.
Let V
s
denote the volume of the sampling space (point B). Then the concen-
tration, c(t), of drug at B is
where * is used to denote the convolution operation and
The above equation is the key convolution equation that forms the basis for
the evaluation of the drug input rate, f(t). The function is denoted the
unit impulse response (a.k.a. characteristic response or disposition function).
The process of determining the input function f(t) is called deconvolution
because it is required to deconvolve the convolution integral in order to
extract the input function that is embedded in the convolution integral.
The unit impulse response ( ) function provides the exact linkage between
drug level response c(t) and the input rate function f(t). is simply equal to
the probability that a molecule entering point A at t = 0 is present in the sam-
pling space at time t divided by the volume of that sample space.
The function representation
WinNonlin models the input function as a piecewise linear precursor func-
tion f
p
(t) convolved with an exponential dispersion function f
d
(t). The
former provides substantial flexibility whereas the latter provides smoothness.
The piecewise linear component is parameterized in terms of a sum of hat-
type wavelet basis functions, h
j
(t):
=
t
A A A B
dt t f t t g t M
0
) ( ) ( ) (
=
t
t c t f du u c u t f t c
0
) ( ) ( ) ( ) ( ) (
c
t ( ) g t ( ) V
s
=
c
t ( )
c
0 ) ( ) ( =
j j
j
p
x t h x t f
WinNonlin
Users Guide
352
14
where T
j
are the wavelet support points. The hat-type wavelet representation
enables discontinuous, finite duration drug releases to be considered together
with other factors that result in discontinuous delivery, such as stomach emp-
tying, absorption window, pH changes, etc. The dispersion function provides
the smoothing of the input function that is expected from the stochastic trans-
port principles governing the transport of the drug molecules from the site of
release to subsequent entry to and mixing in the general systemic circulation.
The wavelet support points (T
j
) are constrained to coincide with the observa-
tion times, with the exception of the very first support point that is used to
define the lag-time, if any, for the input function. Furthermore, one support
point is injected halfway between the lag-time and the first observation. This
point is simply included to create enough capacity for drug input prior to the
first sampling. Having just one support point prior to the first observation
would limit this capacity. The extra support point is well suited to accommo-
date an initial burst release commonly encountered for many formulations.
The dispersion function f
d
(t) is defined as an exponential function:
where is denoted the dispersion or smoothing parameter. The dispersion
function is normalized to have a total integral ( ) equal one, which
explains the scaling with the parameter. The input function, f(t), is the con-
volution of the precursor function and the dispersion function:
The general convolution form of the input function above is consistent with
stochastic as well as deterministic transport principles. The drug level profile,
c(t), resulting from the above input function is, according to the linear disposi-
tion assumption, given by:
otherwise , 0
), /( ) (
), /( ) ( ) (
2 1
1
1 2 2
1
+ +
+
+ + +
+
<
< <
=
=
=
j j
j j
j j j
j j j j
T t T
T t T
T T t T
T T T t t h
/
) (
t
d
e
t f
=
t 0 to =
=
t
d p d p
du u f u t f t f t f t f
0
) ( ) ( ) ( ) ( ) (
The WinNonlin Toolbox
Deconvolution
353
14
where * is used to denote the convolution operation.
Convolution methodology
WinNonlin deconvolution uses the basic principle of deconvolution through
convolution (DTC) to determine the input function. The DTC method is an
iterative procedure consisting of three steps. First, the input function is
adjusted by changing its parameter values. Second, the new input function is
convolved with to produce a calculated drug level response. Third, the
agreement between the observed data and the calculated drug level data is
quantitatively evaluated according to some objective function. The three steps
are repeated until the objective function is optimized. DTC methods differ
basically in the way the input function is specified and the way the objective
function is defined. The objective function may be based solely on weighted
or unweighted residual values (observedcalculated drug levels). The purely
residual-based DTC methods ignore any behavior of the calculated drug level
response between the observations.
The more modern DTC methods, including WinNonlins approach, consider
both the residuals and other properties such as smoothness of the total fitted
curve in the definition of the objective function. The deconvolution method
implemented in WinNonlin is novel in the way the regularization (smoothing)
is implemented. Regularization methods in some other deconvolution meth-
ods are done through a penalty function approach that involves a measure-
ment of the smoothness of the predicted drug level curve (e.g. integral of
squared second derivative). The WinNonlin deconvolution method instead
introduces the regularization directly into the input function through a convo-
lution operation with the dispersion function, f
d
(t). In essence, a convolution
operation acts like a washout of details, i.e. a smoothing due to the mixing
operation inherent in the convolution operation. Consider, for example, the
convolution operation that leads to the drug level response c(t). Due to the sto-
chastic transport principles involved, the drug level at time t is made up of a
mixture of drug molecules that started their journey to the sampling site at dif-
ferent times and took different lengths of time to arrive there. Thus, the drug
level response at time t depends on a mixture of prior input. It is exactly this
mixing in the convolution operation that provides the smoothing. The convo-
lution operation acts essentially as a low pass filter with respect to the filtering
of the input information. The finer details (higher frequencies) are attenuated
relative to the more slowly varying components (low frequency components).
) ( ) ( ) ( ) ( t c t f t f t c
d p
=
c
t ( )
WinNonlin
Users Guide
354
14
Thus, the convolution of the precursor function with the dispersion function
results in an input function, f(t), that is smoother than the precursor function.
WinNonlin allows the user to control the smoothing through the use of the
smoothing parameter . Decreasing the value of the dispersion function
parameter results in a decreasing degree of smoothing of the input function.
Similarly, larger values of provide more smoothing. As approaches 0, the
dispersion function becomes equal to the so-called Dirac delta function,
resulting in no change in the precursor function.
The smoothing of the input function, f(t), provided by the dispersion function,
f
d
(t), is carried forward to the drug level response in the subsequent convolu-
tion operation with the unit impulse response function ( ). Smoothing and
fitting flexibility are inversely related. Too little smoothing (too small a
value) will result in too much fitting flexibility that results in a fitting to the
error in the data. In the most extreme case, the result is an exact fitting to the
data. Conversely, too much smoothing (too large a value) results in too little
flexibility so that the calculated response curve becomes too stiff or
stretched out to follow the underlying true drug level response.
Cross validation principles
WinNonlin's deconvolution function determines the optimal smoothing with-
out actually measuring the degree of smoothing. The degree of smoothing is
not quantified but is controlled through the dispersion function to optimize the
consistency between the data and the estimated drug level curve. Consis-
tency is defined here according to the cross validation principles. Let r
j
denote
the differences between the predicted and observed concentration at the j-th
observation time when that observation is excluded from the data set. The
optimal cross validation principle applied is defined as the condition that
leads to the minimal predicted residual sum of squares (PRESS) value, where
PRESS is defined as:
For a given value of the smoothing parameter , PRESS is a quadratic func-
tion of the wavelet scaling parameters x. Thus, with the non-negativity con-
straint x > 0, the minimization of PRESS for a given value is a quadratic
programming problem which has a unique solution that can be determined
numerically. Let PRESS () denote such a solution. The optimal smoothing is
then determined by finding the value of the smoothing parameter that mini-
c
=
=
m
j
j
r PRESS
1
2
The WinNonlin Toolbox
Deconvolution
355
14
mizes PRESS (). This is a one variable optimization problem with an embed-
ded quadratic-programming problem.
User control over execution
WinNonlin's deconvolution function permits the user to override the auto-
matic smoothing by manual setting of the smoothing parameter. The user may
also specify that no smoothing should be performed. In this case the input rate
function consists of the precursor function alone.
Besides controlling the degree of smoothing, the user may also influence the
initial behavior of the estimated input time course. In particular the user may
choose to constrain the initial input rate to 0 ( ) and/or constrain the
initial change in the input rate to 0 ( ). By default WinNonlin does
not constrain either initial condition. Leaving unconstrained permits bet-
ter characterization of formulations with rapid initial burst release, e.g.,
extended release dosage forms with an immediate release shell. This is done
by optionally introducing a bolus component (or integral boundary condi-
tion) for the precursor function so the input function becomes:
where the * is defined as before. The difference here is the superpo-
sition of the extra term that represents a particularly smooth compo-
nent of the input. The magnitude of this component is determined by the
scaling parameter , which is determined in the same way as the other wave-
let scaling parameters previously described.
The estimation procedure is not constrained with respect to the relative mag-
nitude of the two terms of the composite input function given above. Accord-
ingly, the input can collapse to the bolus component and thus
accommodate the simple first order input commonly experienced when deal-
ing with drug solutions or rapid release dosage forms. A drug suspension in
which a significant fraction of the drug may exist in solution should be well
described by the composite input function option given above. The same may
be the case for dual release formulations designed to rapidly release a portion
of the drug initially and then release the remaining drug in a prolonged fash-
ion. The prolonged release component will probably be more erratic and
would be described better by the more flexible wavelet-based component
f
p
(t)*f
d
(t) of the above dual input function.
f 0 ( ) 0 =
f 0 ( ) 0 =
f 0 ( )
) ( ) ( ) (
) ( )) ( ) ( ( ) (
t f x t f t f
t f t x t f t f
d d p
d p
+ =
+ =
f
p
t ( ) f
d
t ( )
x
f
d
t ( )
x
f
d
t ( )
WinNonlin
Users Guide
356
14
Constraining the initial rate of change to 0 ( ) introduces an initial
lag in the increase of the input rate that is more continuous in behavior than
the usual abrupt lag time. This constraint is obtained by constraining the ini-
tial value of the precursor function to 0 ( ). When such a con-
strained precursor is convolved with the dispersion function, the resulting
input function has the desired constraint.
The extent of drug input
The extent of drug input in the Deconvolution module is presented in two
ways. First, the amount of drug input is calculated as:
Second, the extent of drug input is given in terms of fraction input, where the
fraction is defined in a non-extrapolated way as the fraction of drug input at
time t relative to the amount input at the last sample time, t
end
:
The above fraction input will by definition have a value of 1 at the last obser-
vation time, t
end
. This value should not be confused with the fraction input
relative to either the dose or the total amount absorbed from a reference dos-
age form.
Using deconvolution
Deconvolution is available from the Tools menu when a data set is loaded in
the active window.
To use Deconvolution with a data set,
1. Select Deconvolution from the Tools menu. The Deconvolution dialog
appears with two tabs.
2. On the Variables tab, be sure that the appropriate data set appears in the drop-
down list box. Then drag the appropriate variables to the Time and Concen-
tration fields.
f 0 ( ) 0 =
f
p
0 ( ) 0 =
=
t
dt t f
0
) ( input Amount
=
t
t
end
dt t f dt t f
0 0
) ( / ) ( input Fraction
The WinNonlin Toolbox
Deconvolution
357
14
3. If using sort variables, drag one or more to the Sort Variable field. A separate
analysis is done for every unique combination of sort variable values.
4. (Optional) Enter the dosing units in the Dose units field. The dosing units are
utilized only when the input data set has units associated with the Time and
Concentration data.
5. Select the Settings tab.
6. The unit impulse response function is assumed to have the form:
Select the number of exponential terms (N) in the unit impulse response. This
number must be from 1 to 9. The default is 1.
=
N
j
t alpha
j
i
e A t c
1
) (
WinNonlin
Users Guide
358
14
Note: When a value greater than 1 is entered, the grid for the values of A and alpha
automatically expands so that those values can be entered.
7. Enter the values for A and alpha in the unit impulse response function. If
these values are not available but time and concentration data that describe the
unit impulse response function are available, then WinNonlin can be run using
this data with models 1, 8, or 18 (for N=1, 2, or 3) to find the parameters that
best fit the data.
8. Select the setting for Smoothing to use. The choices are explained below.
Automatic should be selected if the user wants the program to find the
optimal value for the dispersion parameter delta. This is the default.
None should be selected if the user wants to disable the smoothing that
comes from use of the dispersion function. If checked, the input function
is just the piecewise linear precursor function.
User-Specified should be selected if the user wants to specify the value of
the dispersion parameter delta to be used. Increasing delta increases the
amount of smoothing. Decreasing delta decreases the smoothing; how-
ever delta must be greater than 0.
Note: When either Automatic or User-Specified smoothing is selected, Initial Rate
is 0 is unchecked and Initial Change in Rate is 0 is grayed out. If Initial Rate is
0 is selected, then Initial Change in Rate is 0 becomes available.
When None is selected, Initial Rate is 0 is unchecked and Initial Change in
Rate is 0 is grayed out. If Initial Rate is 0 is checked, Initial Change in Rate is
0 remains unavailable.
9. Select the Initial Rate is Zero check box to constrain the estimated input rate
to be zero at the initial time (lag time).
10. Select the Initial Change in Rate is Zero check box to constrain the deriva-
tive of the estimated input rate to be zero at the initial time (lag time).
11. Accept or change the Number of output data points. The default is 101. The
maximum is 1001.
12. The default setting is Workbook output from 0 to last time point. Leave
this checked to have the output grid start with time zero and end with the last
time point in the input data set.
The WinNonlin Toolbox
Deconvolution
359
14
13. (Optionally) Select Workbook output from [ ] to [ ] to have the output grid
start and end with the times entered in the fields.
14. Click Calculate. Deconvolution generates a new chart and workbook.
Deconvolution output
Workbook
The deconvolution workbook contains one workbook with three worksheets.
The Values worksheet includes values for Time, Input Rate, Cumulative Input
and Fraction Input for each sort key. The Parameters worksheet lists the
smoothing parameter delta, absorption lag time, first output time point, and
last output time point for each profile. This allows the user to use the auto-
matic smoothing function of data sets with multiple profiles then manually
revise the settings for further estimation. The Settings worksheet includes data
about input settings (for A, alpha, the smoothing setting, and the number of
output points).
Figure 14-11. The Values worksheet of a Deconvolution workbook
WinNonlin
Users Guide
360
14
Note: If the input variables and dosing use units, they are displayed in the output
headers. If any header is missing units, no units are displayed for any column.
Chart
Deconvolution generates three charts for each sort key.
The WinNonlin Toolbox
Deconvolution
361
14
The Fitted Curve output plot depicts concentration data from the input data set
plotted against time.
The Input Rate plot depicts rate of drug input against time for each profile.
WinNonlin
Users Guide
362
14
The Cumulative Input plot displays cumulative drug input against time for
each profile.
363
Chapter 15
Linear Mixed Effects
Modeling
ANOVA, ANCOVA, and regression models
The Linear Mixed Effects function (LinMix) performs analyses using linear
mixed effects models. It is a statistical analysis system for analysis of variance
for crossover and parallel studies, including unbalanced designs. It can ana-
lyze regression models and covariance models, and can calculate both sequen-
tial tests and partial tests.
Since linear mixed effects modeling is most easily introduced using an exam-
ple, this section will start by creating a statistical model for a common experi-
mental design that utilizes several error terms, as well as classical ANOVA
modeling terms (An example below). The general theory will then be dis-
cussed more fully in The linear mixed effects model on page 366.
An example
The following example is used as a framework for discussing the functions
and computations of the Linear Mixed Effects Modeling wizard.
An investigator wants to estimate the difference between two treatments for
blood pressure, labeled A and B. Because the responses are fairly heteroge-
neous among different people, the investigator has decided that each study
subject will be their own control, which should increase the power of the
study. Therefore, each subject will be exposed to both treatments A and B.
Since the order of the treatments might affect the outcome, half the subjects
will receive A first, and the other half will receive B first.
For the analysis, note that this crossover study has two periods, 1 and 2, and
two sequence groups AB and BA. The model will be of the form:
y
ijkm
= +
i
+
j
+
q
+ S
k(j)
+
ijkm
(1)
WinNonlin
Users Guide
364
15
where:
i = period index (1 or 2)
j = sequence index (AB or BA)
k = subject within sequence group index (1 n
j
)
m = observation within subject index (1, 2)
q = treatment index (1, 2)
= intercept
i
= effect due to period
j
= effect due to sequence grouping
q
= effect due to treatment, the purpose of the study
S
k(j)
= effect due to subject
ijkm
= random variation
Typically,
ijkm
is assumed to be normally distributed with mean 0 and vari-
ance
2
> 0. The purpose of the study is to estimate
1
-
2
in all people with
similar inclusion criteria as the study subjects. Study subjects are assumed to
be randomly selected from the population at large. Therefore, it is desirable to
treat subject as a random effect. Hence, assume that subject effect is normally
distributed with mean 0 and variance Var(S
k(j)
) 0.
This mixing of the regression model and the random effects is known as a
mixed effect model. The mixed effect model allows one to model the mean of
the response as well as the variance of the response. Note that in model (1),
the mean of the response is:
and the variance is given by:
The part represented by E{y
ijkm
}is known as the fixed effects of the model,
while S
k(j)
+
ijkm
constitutes the random effects of the model, since these
terms represent random variables whose variances are to be estimated. A
model with only the residual variance is known as a fixed effect model. A
model without the fixed effects is known as a random effect model. A model
with both is a mixed effect model.
E{y
ijkm
} = +
i
+
j
+
q
(2)
Var{y
ijkm
} = Var{S
k(j)
}+
2
.
(3)
Linear Mixed Effects Modeling
An example
365
15
The data are shown in Table 15-1. The LinMix wizard is used to analyze these
data. The fixed and random effects of the model are entered on different pages
of the wizard. This is appropriate since the fixed effects model the mean of the
response, while the random effects model the variance of the response.
Table 15-1. Data for the example
Subject Sequence Period Treatment Response
1 AB 1 A 9.70
2 AB 1 A 10.24
3 AB 1 A 11.2
4 AB 1 A 7.82
5 AB 1 A 11.1
6 AB 1 A 9.31
7 BA 2 A 9.02
8 BA 2 A 7.88
9 BA 2 A 9.6
10 BA 2 A 9.63
11 BA 2 A 9.63
12 BA 2 A 9.91
7 BA 1 B 8.15
8 BA 1 B 9.23
9 BA 1 B 9.43
10 BA 1 B 10.13
11 BA 1 B 9.67
12 BA 1 B 11.34
1 AB 2 B 8.72
2 AB 2 B 11.28
3 AB 2 B 11.73
4 AB 2 B 9.77
5 AB 2 B 8.91
6 AB 2 B 8.31
WinNonlin
Users Guide
366
15
LinMix can fit linear models to Gaussian data. The mean and variance struc-
tures can be simple or complex, as the need arises. Independent variables can
be either continuous or discrete, and no distributional assumption is made
about the independent variables.
This model provides a context for The linear mixed effects model.
The linear mixed effects model
WinNonlins Linear Mixed Effects Modeling feature is based on the general
linear mixed effects model, which can be represented in matrix notation as:
y = X + Z +
where:
X is a matrix of known constants and the design matrix for ,
is a vector of unknown (fixed effect) parameters,
is a random unobserved vector (the vector of random-effects
parameters), normally distributed with mean 0 and variance G,
Z is a matrix of known constants, the design matrix for ,
and is a random vector, normally distributed with mean 0 and
variance R.
Linear Mixed Effects Modeling
The linear mixed effects model
367
15
and are uncorrelated. In the LinMix wizard, the fixed effects dialog speci-
fies the model terms for constructing X; the random effects tabs in the Vari-
ance Structure dialog specifies the model terms for constructing Z and the
structure of G; and the repeated tab specifies the structure of R.
The LinMix wizard breaks the model into the following areas:
Note: In the linear mixed effects model, if R =
2
I and Z = 0, then the LinMix
model reduces to the ANOVA model. Using the assumptions for the linear
mixed effects model, one can show that the variance of y is:
If , i.e., if the model includes one or more random effects, the G matrix
is determined by the variance structures specified for the random models. If
the model includes a repeated specification, then the R matrix is determined
by the variance structure specified for the repeated model. If the model does
not include a repeated specification, then R is the residual variancethat is,
R =
2
I.
It is instructive to see how a specific example (An example on page 363)
fits into this framework. The fixed effects model is shown in equation 2
above. Listing all the parameters in a vector, one obtains:
T
= [,
1
,
2
,
1
,
2
,
1
,
2
]
For each element of , there is a corresponding column in the X matrix. In this
model, the X matrix is composed entirely of 1s and 0s. The exact method of
constructing the X matrix is discussed in the section Construction of X matrix,
below.
For each subject, there is one S
k(j)
. The collection can be directly entered into
. The Z matrix will consist of 1s and 0s. Element (i, j) will be 1 when obser-
vation i is from subject j, and 0 otherwise. The variance of is of the form
G Var() = Var{S
k(j)
} I
n(1)+n(2)
Fixed effects Contrasts
Variance structure Estimates
Least squares means
V ZGZ
T
R + =
Z 0
WinNonlin
Users Guide
368
15
where I
b
represents a bb identity matrix. The parameter to be estimated for G
is Var{S
k(j)
}. The residual variance is
R = Var{
ijkm
} =
2
I
2[n(1)+n(2)]
The parameter to be estimated for R is
2
.
A summary of the wizard pages and the part of the model they generate is
listed below. The details will be discussed later.
Construction of the X matrix
A term is a variable or a product of variables. A user specifies a model by giv-
ing a sum of terms. For example, if A and B are variables in the data set, the
user might specify:
A + B + A*B.
LinMix takes this sum of terms and constructs the X matrix. The way this is
done depends upon the nature of the variables A and B.
The No Intercept
option
By default, the first column of X contains all ones. This column is referenced
as the intercept in the wizard. The column of ones may be left out by checking
the No Intercept box in the Fixed Effects dialog of the LinMix wizard. The
rules for translating terms to columns of the X matrix depend upon the vari-
able types, regressor/covariate or classification. This will be demonstrated
using two classification variables, Drug and Form, and two continuous vari-
ables, Age and Weight, given in Table 15-2. A term consisting of a single con-
tinuous variable causes a single column to be placed in the X matrix.
An integer value is associated with every level of a classification variable.
The association between levels and codes is determined by the numerical
order for converted numerical variables and by the character collating
sequence for converted character variables. When a single classification vari-
able is specified for a model, an indicator variable is placed in the X matrix for
each level of the variable. Table 15-3 demonstrates this for the variable Drug.
Wizard Page Specifies Tabs on page Creates
Fixed Effects Page Specifies X matrix Generates
Variance
Structure Page
Specifies Z matrix Random tabs (1 or more) Generates G = var()
Repeated tab (exactly 1) Generates R = var()
Linear Mixed Effects Modeling
The linear mixed effects model
369
15
The model specification allows for products of variables. The product of two
continuous variables is the ordinary product within each row. The product of a
classification variable with a continuous variable is obtained by taking the
product of the continuous value with each column of the set of indicator vari-
ables in each row. For example, the product of Drug and Age is displayed in
Table 15-3. Two classification variables and their indicator variables are dis-
played in Table 15-4. Their product is shown in Table 15-5.
The product operations described in the preceding paragraph can be suc-
cinctly defined using the Kronecker product
A
. For example, consider the fifth
row of Table 15-3. The product of Drug and Age is:
[0 1 0] [45] = [ 0 45 0].
Now consider the fifth row of Table 15-4. The product of Drug and Form is:
[0 1 0] [1 0 0 0] = [0 0 0 0 1 0 0 0 0 0 0 0]
The result is the fifth row of Table 15-5.
A. Let A = (a
ij
) be a mn matrix and let B = (b
ij
) be a pq matrix. Then the Kronecker product
A B = (a
ij
B)
is an mp nq matrix expressible as a partitioned matrix with a
ij
B as the (i, j)th partition, i=1,
, m and j=1,,n.
Table 15-2. Variables in sample data set
Drug Form Age Weight
name value name value
DrugA 0 capsule 0 48 120
DrugA 0 drops 1 34 124
DrugA 0 syrup 2 27 123
DrugA 0 tablet 3 23 172
DrugB 1 capsule 0 45 200
DrugB 1 drops 1 26 150
DrugB 1 syrup 2 41 120
DrugB 1 tablet 3 32 130
DrugC 2 capsule 0 38 190
DrugC 2 drops 1 17 125
WinNonlin
Users Guide
370
15
DrugC 2 syrup 2 32 175
DrugC 2 tablet 3 23 150
Table 15-2. Variables in sample data set (continued)
Drug Form Age Weight
name value name value
Table 15-3. Indicator variables and a product of a classification variable with a continuous
variable
Drug Indicator variables Age Drug* Age
Name value DrugA DrugB DrugC DrugA DrugB DrugC
DrugA 0 1 0 0 48 48 0 0
DrugA 0 1 0 0 34 34 0 0
DrugA 0 1 0 0 27 27 0 0
DrugA 0 1 0 0 23 23 0 0
DrugB 1 0 1 0 45 0 45 0
DrugB 1 0 1 0 26 0 26 0
DrugB 1 0 1 0 41 0 41 0
DrugB 1 0 1 0 32 0 32 0
DrugC 2 0 0 1 38 0 0 38
DrugC 2 0 0 1 17 0 0 17
DrugC 2 0 0 1 32 0 0 32
DrugC 2 0 0 1 23 0 0 23
Table 15-4. Two classification variables and their indicator variables
Drug Indicators Form Indicators
name value DrugA DrugB DrugC name value capsule drops syrup tablet
DrugA 0 1 0 0 capsule 0 1 0 0 0
DrugA 0 1 0 0 drops 1 0 1 0 0
DrugA 0 1 0 0 syrup 2 0 0 1 0
DrugA 0 1 0 0 tablet 3 0 0 0 1
Linear Mixed Effects Modeling
The linear mixed effects model
371
15
Linear combinations of elements of
Most of the inference done by LinMix is done with respect to linear combina-
tions of elements of . Consider, as an example, the model where the expected
value of the response of the j
th
subject on the i
th
treatment is:
DrugB 1 0 1 0 capsule 0 1 0 0 0
DrugB 1 0 1 0 drops 1 0 1 0 0
DrugB 1 0 1 0 syrup 2 0 0 1 0
DrugB 1 0 1 0 tablet 3 0 0 0 1
DrugC 2 0 0 1 capsule 0 1 0 0 0
DrugC 2 0 0 1 drops 1 0 1 0 0
DrugC 2 0 0 1 syrup 2 0 0 1 0
DrugC 2 0 0 1 tablet 3 0 0 0 1
Table 15-4. Two classification variables and their indicator variables (continued)
Drug Indicators Form Indicators
name value DrugA DrugB DrugC name value capsule drops syrup tablet
Table 15-5. Product of the two classification variables
Drug Form Indicator
DrugA capsule 1 0 0 0 0 0 0 0 0 0 0 0
DrugA drops 0 1 0 0 0 0 0 0 0 0 0 0
DrugA syrup 0 0 1 0 0 0 0 0 0 0 0 0
DrugA tablet 0 0 0 1 0 0 0 0 0 0 0 0
DrugB capsule 0 0 0 0 1 0 0 0 0 0 0 0
DrugB drops 0 0 0 0 0 1 0 0 0 0 0 0
DrugB syrup 0 0 0 0 0 0 1 0 0 0 0 0
DrugB tablet 0 0 0 0 0 0 0 1 0 0 0 0
DrugC capsule 0 0 0 0 0 0 0 0 1 0 0 0
DrugC drops 0 0 0 0 0 0 0 0 0 1 0 0
DrugC syrup 0 0 0 0 0 0 0 0 0 0 1 0
DrugC tablet 0 0 0 0 0 0 0 0 0 0 0 1
WinNonlin
Users Guide
372
15
where is a common parameter and +
i
is the expected value of the i
th
treat-
ment. Suppose there are three treatments. The X matrix has a column of ones
in the first position followed by three treatment indicator variables. The vec-
tor is:
= [
0
1
2
3
]
= [
1
2
3
]
The first form is for the general representation of a model. The second form is
specific to model (4) above.
The expression:
with the l
j
constant, is called a linear combination of the elements of . The
range of the subscript j starts with 0 if the intercept is in the model and starts
with 1 otherwise. Most common functions of the parameters, such as +
1
,
1
-
3
, and
2
, can be generated by choosing appropriate values of the l
j
. Lin-
ear combinations of are entered in LinMix through the estimate and contrast
pages of the wizard. A linear combination of is said to be estimable if it can
be expressed as a linear combination of expected responses. In the context of
model 4, a linear combination of the elements of is estimable if it can be
generated by choosing c
1
, c
2
, and c
3
.
Note that c
1
=1, c
2
=0, and c
3
=0 generates +
1
, so +
1
is estimable. A
rearrangement of expression (6) is:
The form in (7) makes some things more obvious. For example, l
j
= c
j
for
j=1,2,3. Also, any linear combination involving only s is estimable if, and
+
i
(4)
(5)
c
1
( +
1
) + c
2
( +
2
) + c
3
( +
3
). (6)
(c
1
+ c
2
+ c
3
) + c
1
1
+ c
2
2
+ c
3
3
. (7)
l
j
j
j
is the largest absolute value of the vector, and tol is the Estima-
bility Tolerance.
In general, the number of rows in the basis of the space orthogonal to the rows
of X is equal the number of linear dependencies among the columns of X. If
there is more than one z, then (8) must be satisfied for each z.
Substitution of estimable functions for non-estimable functions
It is not always easy for a user to determine if a linear combination is estima-
ble or not. LinMix tries to be helpful, and if a user attempts to estimate an
non-estimable function, LinMix will substitute a nearby function that is
estimable. Notice is given in the text output when the substitution is made,
(8)
Table 15-6. The basis of the space orthogonal to the rows of X
Elements of
1
2
3
Distinct rows of X 1 1 0 0
1 0 1 0
1 0 0 1
Basis of orthogonal space -1 1 1 1
l
T
Z
l
Z
T
Z
--------------------------
tol <
WinNonlin
Users Guide
374
15
and it is the user's responsibility to check the coefficients to see if they are rea-
sonable. This section is to describe how the substitution is made.
The most common incidence of attempting to estimate a non-estimable func-
tion of the parameters is probably trying to estimate a contrast of main effects
in a model with interaction, so this will be used as an example. Consider the
model:
where is the over-all mean;
i
is the effect of the i-th level of a factor A,
i = 1, 2; j is the effect of the j-th level of a factor B, j = 1, 2; ()
ij
is the effect
of the interaction of the i-th level of A with the j-th level of B; and the
ijk
are
independently distributed N(0,
2
). The canonical form of the QR factoriza-
tion of X is displayed in rows 0 through 8 of Table 15-7. The coefficients to
generate
1
-
2
are shown in row 9. The process is a sequence of regressions
followed by residual computations. In the column, row 9 is already 0 so no
operation is done. Within the columns, regress row 9 on row 3. (Row 4 is all
zeros and is ignored.) The regression coefficient is 1. Now calculate residuals:
(row 9) - 1 (row 3). This operation goes across the entire matrix, i.e., not just
the columns. The result is shown in row 10, and the next operation applies
to row 10. The numbers in the columns of row 10 are zero, so skip to the
columns. Within the columns, regress row 10 on row 5. (Rows 6 through 8
are all zeros and are ignored.). The regression coefficient is 0, so there is no
need to compute residuals. At this point, row 10 is a deviation of row 9 from
an estimable function. Subtract the deviation (row 10) from the original (row
9) to get the estimable function displayed in the last row. The result is the
expected value of the difference between the marginal A means. This is likely
what the user had in mind.
This section provides a general description of the process just demonstrated
on a specific model and linear combination of elements of . Partition the QR
factorization of X vertically and horizontally corresponding to the terms in X.
Put the coefficients of a linear combination in a work row. For each vertical
partition, from left to right, do the following:
1. Regress (i.e., do a least squares fit) the work row on the rows in the diag-
onal block of the QR factorization.
2. Calculate the residuals from this fit across the entire matrix. Overwrite the
work row with these residuals.
y
ijk
= +
i
+
j
+ ()
ij
+
ijk
(9)
Linear Mixed Effects Modeling
Fixed effects
375
15
3. Subtract the final values in the work row from the original coefficients to
obtain coefficients of an estimable linear combination.
Fixed effects
The specification of the fixed effects (as defined in The linear mixed effects
model on page 366) can contain both classification variables and continuous
regressors. In addition, interaction and nested terms can also be included in
the model.
Output parameterization
Suppose X is np, where n is the number of observations, and p is the number
of columns. If X has rank p, denoted rank(X), then each parameter can be
uniquely estimated. If rank(X) < p, then there are infinitely many solutions. To
solve this problem, one then must impose additional constraints on the estima-
tor of .
Suppose column j is in the span of columns 0, 1, , j-1. Then column j pro-
vides no additional information about the response y beyond that of the col-
Table 15-7. The QR factorization of X scaled to canonical form
1
2
1
2
()
11
()
12
()
21
()
22
0 1 0.5 0.5 0.5 0.5 0.25 0.25 0.25 0.25
1 1 -1 0 0 0.5 0.5 -0.5 -0.5
2 0 0 0 0 0 0 0
3 1 -1 0.5 -0.5 0.5 -0.5
4 0 0 0 0 0
5 1 -1 -1 1
6 0 0 0
7 0 0
8 0
9 0 1 -1 0 0 0 0 0 0
10 0 0 0 0 0 -0.5 -0.5 0.5 0.5
Final result 0 1 -1 0 0 0.5 0.5 -0.5 -0.5
WinNonlin
Users Guide
376
15
umns that come before. In this case, it seems sensible to not use the column in
the model fitting. When this happens, its parameter estimate is set to 0.
As an example, consider a simple one-way ANOVA model, with three levels.
The design matrix is
X
0
is the intercept column. X
1
, X
2
, and X
3
correspond to the three levels of the
treatment effect. X
0
and X
1
are clearly linearly independent, as is X
2
linearly
independent of X
0
and X
1
. But X
3
is not linearly independent of X
0
, X
1
, and
X
2
, since X
3
= X
0
- X
1
-X
2
. Hence
3
would be set to zero. The degrees of free-
dom for an effect is the number of columns remaining after this process. In
this example, treatment effect has 2 degrees of freedom, the number typically
assigned in ANOVA.
See Predicted values and residuals on page 405 for details of the computa-
tion.
Singularity tolerance
If intercept is in the model, then center the data. Perform a Gram-Schmidt
orthogonalization process. If the norm of the vector after GS divided by the
norm of the original vector is less than , then the vector is called singular.
Transformation of the response
The transformation pull-down menu provides three options: No transforma-
tion, ln transformation (log
e
), or log transformation (log
10
). Transformations
are applied to the response before model fitting. Note that all estimates using
log will be the same estimates found using ln, only scaled by ln 10, since
log(x) = ln(x)/ln(10).
X
0
X
1
X
2
X
3
1 1 0 0
1 0 1 0
1 0 0 1
1 1 0 0
1 0 1 0
1 0 0 1
Linear Mixed Effects Modeling
Fixed effects
377
15
If the standard deviation is proportional to the mean, taking the logarithm
often stabilizes the variance, resulting in better model fitting. This is implic-
itly an assumption that the error structure is multiplicative with lognormal dis-
tribution.
Crossover example continued
The fixed effects are given in equation (5). Using that model, the design
matrix X would be expanded into that presented in Table 15-8. The vector of
fixed effects corresponding to that design matrix would be
= (
0
,
1
,
2
,
3
,
4
,
5
,
6
).
Notice that X
2
= X
0
- X
1
. Hence set
2
= 0. Similarly, X
4
= X
0
- X
3
and X
6
= X
0
- X
5
, and hence set
4
= 0 and
6
= 0.
Table 15-8. Design matrix expanded for fixed effects model Sequence
+ Period + Treatment
Intercept Sequence Period Treatment
X0 AB [X1] BA [X2] 1 [X3] 2 [X4] A [X5] B [X6]
1 1 0 1 0 1 0
1 1 0 1 0 1 0
1 1 0 1 0 1 0
1 1 0 1 0 1 0
1 1 0 1 0 1 0
1 1 0 1 0 1 0
1 0 1 0 1 1 0
1 0 1 0 1 1 0
1 0 1 0 1 1 0
1 0 1 0 1 1 0
1 0 1 0 1 1 0
1 0 1 0 1 1 0
1 0 1 1 0 0 1
1 0 1 1 0 0 1
1 0 1 1 0 0 1
1 0 1 1 0 0 1
WinNonlin
Users Guide
378
15
Variance structure
The LinMix Variance Structure page specifies the Z, G, and R matrices
defined in The linear mixed effects model on page 366. The user may have
0, 1, or more random effects specified. Only 1 repeated effect may be speci-
fied. The Repeated effect specifies the R = Var(). The Random effects spec-
ify Z and the corresponding elements of G = Var().
Repeated effect
The repeated effect is used to model a correlation structure on the residuals.
Specifying the repeated effect is optional. If no repeated effect is specified,
then R =
2
N
is used, where N denotes the number of observations, and
N
is
the N N identity matrix.
All variables used on this page must be classification variables.
To specify a particular repeated effect, one must have a classification model
term that uniquely identifies each individual observation. Put the model term
in the Repeated Specification box. Note that a model term can be a variable
name, an interaction term (e.g., Time*Subject), or a nested term (e.g.,
Time(Subject)).
The variance blocking model term creates a block diagonal R matrix. Suppose
the variance blocking model term has b levels, and further suppose that the
1 0 1 1 0 0 1
1 0 1 1 0 0 1
1 1 0 0 1 0 1
1 1 0 0 1 0 1
1 1 0 0 1 0 1
1 1 0 0 1 0 1
1 1 0 0 1 0 1
1 1 0 0 1 0 1
Table 15-8. Design matrix expanded for fixed effects model Sequence
+ Period + Treatment (continued)
Intercept Sequence Period Treatment
X0 AB [X1] BA [X2] 1 [X3] 2 [X4] A [X5] B [X6]
Linear Mixed Effects Modeling
Variance structure
379
15
data are sorted according to the variance blocking variable. Then R would
have the form
R =
b
where is the variance structure specified.
The variance is specified using the Type pull-down menu. Several variance
structures are possible, including unstructured, autoregressive, heterogeneous
compound symmetry, and no-diagonal factor analytic. See the Help file for
the details of the variance structures. The autoregressive is a first-order
autoregressive model.
To model heterogeneity of variances, use the Group variable. Group will
accept any model term. The effect is to create additional parameters of the
same variance structure. If a group variable has levels g = 1, 2, , n
g
, then the
variance for observations within group g will be
g
.
An example will make this easier to understand. Suppose 5 subjects are ran-
domly assigned to each of 3 treatment groups; call the treatment groups T
1
,
T
2
, and T
3
. Suppose further that each subject is measured in periods t = 0, 1, 2,
3, and that serial correlations among the measurements are likely. Suppose
further that this correlation is affected by the treatment itself, so the correla-
tion structure will differ among T
1
, T
2
, and T
3
. Without loss of generality, one
may assume that the data are sorted by treatment group, then subject within
treatment group.
First consider the effect of the group. It produces a variance structure that
looks like
where each element of R is a 1515 block. Each R
g
has the same form.
Because the variance blocking variable is specified, the form of each R
g
is
I
5
g
.
I
5
is used because there are five subjects within each treatment group. Within
each subject, the variance structured specified is
R
R
1
0 0
0 R
2
0
0 0 R
3
=
WinNonlin
Users Guide
380
15
This structure is the autoregressive variance type. Other variance types are
also possible. Often compound symmetry will effectively mimic autoregres-
sive in cases where autoregressive models fail to converge.
The output will consist of six parameters:
2
and for each of the three treat-
ment groups.
Random effects
Unlike the (single) repeated effect, it is possible to specify up to 10 random
effects. Additional random effects can be added by clicking the Add Random
button. To delete a previously specified random effect, click the Delete Ran-
dom button. It is not possible to delete all random effects; however, if no
entries are made in the random effect, then it will be ignored.
Model terms entered into the Random Effects Model produce columns in the
Z matrix, constructed in the same way that columns are produced in the X
matrix. It is possible to put more than one model term in the Random Effects
Model, but each random page will correspond to a single variance type. The
g
2
1
g
g
2
g
3
g
1
g
g
2
g
2
g
1
g
g
3
g
2
g
1
Linear Mixed Effects Modeling
Variance structure
381
15
variance matrix appropriate for that type is sized according to the number of
columns produced in that random effect.
The random intercept check box puts an intercept column (i.e., all 1s) into the
Z matrix.
The Variance Blocking Variables has the effect of inducing independence
among the levels of the Variance Blocking Variables. Mathematically, it
expands the Z matrix by taking the Kronecker product of the Variance Block-
ing Variables with the columns produced by the intercept check box and the
Random Effects Model terms.
The Group model term is used to model heterogeneity of the variances among
the levels of the Group model term, similarly to Repeated Effects.
Multiple random effects vs. multiple effects on one random effect
Suppose one has two random effect variables, R1 and R2. Suppose further that
R1 has three levels, A, B, and C, while R2 has two levels, Y and Z. The hypo-
thetical data are shown as follows.
Specifying a random effect of R1+R2 will produce different results than spec-
ifying R1 on Random 1 and R2 on Random 2 pages. This example models the
variance using the compound symmetry variance type. To illustrate this, build
the resulting Z and G matrices.
For R1+R2 on Random 1 page, put the columns of each variable in the Z
matrix to get the following.
R1 R2
A Y
B Y
C Y
A Z
B Z
C Z
WinNonlin
Users Guide
382
15
The random effects can be placed in a vector = (
1
,
2
,
3
,
4
,
5
). R1 and R2
share the same variance matrix G where:
Now, consider the case where R1 is placed on Random 1 page, and R2 is
placed on Random 2 page. For R1, the Z matrix columns are:
R1 R2
A B C Y Z
1 0 0 1 0
0 1 0 1 0
0 0 1 1 0
1 0 0 0 1
0 1 0 0 1
0 0 1 0 1
R1
A B C
1 0 0
0 1 0
0 0 1
1 0 0
=
2
1
2
2
2
3
2
4
2
5
2
2
2
1
2
2
2
3
2
4
2
3
2
2
2
1
2
2
2
3
2
4
2
3
2
2
2
1
2
2
2
5
2
4
2
3
2
2
2
1
G
Linear Mixed Effects Modeling
Least squares means
383
15
For R2, the columns in the Z matrix and the corresponding G is:
In this case:
Least squares means
Sometimes one would like to see the mean response for each level of a classi-
fication variable or for each combination of levels for two or more classifica-
tion variables. If there are covariables with unequal means for the different
levels, or if there are unbalanced data, the subsample means are not estimates
that can be validly compared. This section describes least squares means, sta-
tistics that make proper adjustments for unequal covariable means and unbal-
anced data in the linear mixed effects model.
Consider a completely randomized design with a covariable. The model is:
R1
A B C
1 0 0
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1
R2
Y Z
1 0
1 0
1 0
0 1
0 1
0 1
=
2
1
2
2
2
3
2
2
2
1
2
2
2
3
2
2
2
1
1
G
=
2
4
2
5
2
5
2
4
2
G
1
2
G
G
G
=
0
0
WinNonlin
Users Guide
384
15
y
ij
=
i
+ x
ij
+
ij
where y
ij
is the observed response on the j
th
individual on the i
th
treatment;
i
is the intercept for the i
th
treatment; x
ij
is the value of the covariable for the j
th
individual in the i
th
treatment; is the slope with respect to x; and
ij
is a ran-
dom error with zero expected value. Suppose there are two treatments; the
average of the x
1j
is 5; and the average of the x
2j
is 15. The respective
expected values of the sample means are
1
+ 5 and
2
+ 15. These are not
comparable because of the different coefficients of . Instead, one can esti-
mate
1
+ 10 and
2
+ 10 where the overall mean of the covariable is used
in each linear combination.
Now consider a 2 2 factorial design. The model is:
y
ijk
= +
i
+
j
+
ijk
where y
ijk
is the observed response on the k
th
individual on the i
th
level of fac-
tor A and the j
th
level of factor B; is the over-all mean;
i
is the effect of the
i
th
level of factor A;
j
is the effect of the j
th
level of factor B; and
ijk
is a ran-
dom error with zero expected value. Suppose there are six observations for the
combinations where i = j and four observations for the combinations where i
j. The respective expected values of the averages of all values on level 1 of A
and the averages of all values on level 2 of A are +(0.6
1
+0.4
2
) +
1
and
+(0.4
1
+0.6
2
)+
2
. Thus, sample means cannot be used to compare levels
of A because they contain different functions of
1
and
2
. Instead, one com-
pares the linear combinations + (
1
+
2
)/2 +
1
and + (
1
+
2
)/2 +
2
.
The preceding examples constructed linear combinations of parameters, in the
presence of unbalanced data, that represent the expected values of sample
means in balanced data. This is the idea behind least squares means. Least
squares means are given in the context of a defining term, though the process
can be repeated for different defining terms for the same model. The defining
term must contain only classification variables and it must be one of the terms
in the model. Treatment is the defining term in the first example, and factor A
is the defining term in the second example. When the user requests least
squares means, LinMix automatically generates the coefficients l
j
of expres-
sion (5) and processes them almost as it would process the coefficients speci-
fied in an estimate statement. This chapter describes generation of linear
combinations of elements of that represent least squares means. A set of
coefficients are created for each of all combinations of levels of the classifica-
tion variables in the defining term. For all variables in the model, but not in
the defining term, average values of the variables are the coefficients. The
average value of a numeric variable (covariable) is the average for all cases
Linear Mixed Effects Modeling
Least squares means
385
15
used in the model fitting. For a classification variable with k levels, assume
the average of each indicator variable is 1/k. The value 1/k would be the actual
average if the data were balanced. The values of all variables in the model
have now been defined. If some terms in the model are products, the products
are formed using the same rules used for constructing rows of the X matrix as
described in the section on Fixed Effects, above. It is possible that some least
squares means will not be estimable.
For example, suppose the fixed portion of the model is:
Drug + Form + Age + Drug * Form.
To get means for each level of Drug, the defining term is Drug. Since Drug
has three levels, three sets of coefficients are created. Build the coefficients
associated the first level of Drug, DrugA. The first coefficient is 1 for the
implied intercept. The next three coefficients are 1, 0, and 0, the indicator
variables associated with DrugA. Form is not in the defining term, so average
values are used. The next four coefficients are all 0.25, the average of a four
factor indicator variable with balanced data. The next coefficient is 32.17, the
average of Age. The next twelve elements are:
[ 1 0 0 ] [0.25 0.25 0.25 0.25 ] = [0.25 0.25 0.25 0.25 0 0 0 0 0 0 0 0]
The final result is shown in the DrugA column of Table 15-9. The results for
DrugB and DrugC are also shown in Table 15-9. No new principles would be
illustrated by finding the coefficients for the Form least squares means. The
coefficients for the Drug*Form least squares means would be like representa-
tive rows of X except that Age would be replaced by average of Age.
Table 15-9. Coefficients of least squares means
l
j
Column of X
j
DrugA DrugB DrugC
Intercept
0
1 1 1
Drug DrugA
1
1 0 0
DrugB
2
0 1 0
DrugC
3
0 0 1
Form capsule
4
0.25 0.25 0.25
drops
5
0.25 0.25 0.25
syrup
6
0.25 0.25 0.25
tablet
7
0.25 0.25 0.25
WinNonlin
Users Guide
386
15
Contrasts
A contrast is a linear combination of the parameters associated with a term
where the coefficients sum to 0. Contrasts facilitate the testing of linear com-
binations of parameters. For example, consider a completely randomized
design with four treatment groups: Placebo, Low Dose, Medium Dose, and
High Dose. The user may wish to test the hypothesis that the average of the
dosed groups is the same as the average of the placebo group. One could write
this hypothesis as:
H
0
:
Placebo
- (
Low
+
Medium
+
High
)/3 = 0
or equivalently:
H
0
: 3
Placebo
- (
Low
+
Medium
+
High
) = 0.
Both of these are contrasts since the sum of the coefficients is 0. Note that
both contrasts make the same statement. This is true generally: contrasts are
invariant under changes in scaling.
Contrasts are tested using the Wald (1943) test statistic:
Age
8
32.17 32.17 32.17
Drug*Form DrugA*capsule
9
0.25 0 0
DrugA*drops
10
0.25 0 0
DrugA*syrup
11
0.25 0 0
DrugA*tablet
12
0.25 0 0
DrugB*capsule
13
0 0.25 0
DrugB*drops
14
0 0.25 0
DrugB*syrup
15
0 0.25 0
DrugB*tablet
16
0 0.25 0
DrugC*capsule
17
0 0 0.25
DrugC*drops
18
0 0 0.25
DrugC*syrup
19
0 0 0.25
DrugC*tablet
20
0 0 0.25
Table 15-9. Coefficients of least squares means (continued)
l
j
Column of X
j
DrugA DrugB DrugC
Linear Mixed Effects Modeling
Contrasts
387
15
where and are estimators of and V. L must be a matrix such that each
row is in the row space of X. This requirement is enforced in the wizard. The
Wald statistic is compared to an F distribution with rank(L) numerator degrees
of freedom and denominator degrees of freedom estimated by the program or
supplied by the user.
Joint versus single contrasts
Joint contrasts are constructed when the number of columns for contrast is
changed from the default value of 1 to a number larger than 1. Note that this
number must be no more than one less than the number of distinct levels for
the model term of interest. This tests both hypotheses jointly, i.e., in a single
test with a predetermined level of the test.
A second approach would be to put the same term in the neighboring contrast,
both of which have one column. This approach will produce two independent
tests, each of which is at the specified level.
To see the difference, suppose one wants to compare Placebo to Low Dose
and Placebo to Medium Dose. Using the first approach, enter the coefficients
as follows.
This will produce one test, testing the following hypothesis.
H
0
:
Contrast #1
Title Joint tests
Effect Treatment
Contrast Treatment
#1 Placebo -1 -1
#2 Low Dose 1 0
#3 Medium Dose 0 1
#4 High Dose 0 0
L
( )
T
L X
T
V
X ( )
1
L
T
( )
1
L
( )
1 1 0 0
1 0 1 0
0
0
=
WinNonlin
Users Guide
388
15
Now compare this with putting the second contrast in its own contrast.
This produces two tests.
H
01
: [-1 1 0 0] = [0] H
02
: [-1 0 1 0] = [0]
Note that this method inflates the overall Type I error rate to approximately
2, whereas the joint test maintains the overall Type I error rate to , at the
possible expense of some power.
Nonestimability of contrasts
If a contrast is not estimable, then an estimable function will be substituted for
the nonestimable function. See Substitution of estimable functions for non-
estimable functions on page 373 for the details.
Degrees of freedom
The degrees of freedom check box allows the user to control the denominator
degrees of freedom in the F approximation. The numerator degrees of free-
dom is always calculated as rank(L). If the check box is not checked, then the
default denominator degrees of freedom will be used which is the Satterth-
waite degrees of freedom. This can be changed to residual degrees of free-
dom.
Note: For purely fixed effects model, Satterthwaite and residual degrees of freedom
yield the same number. For details of the Satterthwaite approximation, see the
section Satterthwaites Approximation for Degrees of Freedom.
Contrast #1 Contrast #2
Title Low vs. Placebo Medium vs. Placebo
Effect Treatment Treatment
Contrast Treatment Treatment
#1 Placebo -1 Placebo -1
#2 Low Dose 1 Low Dose 0
#3 Medium Dose 0 Medium Dose 1
#4 High Dose 0 High Dose 0
Linear Mixed Effects Modeling
Estimates
389
15
To override the default degrees of freedom, check the box, and enter an appro-
priate number. The degrees of freedom must greater than 0.
Other options
To control the estimability tolerance, enter an appropriate tolerance in the
Estimability Tolerance text box (see Substitution of estimable functions for
non-estimable functions on page 373).
The Show Coefficients check box will produce extra output, including the
coefficients used to construct the tolerance. If the contrast entered is estima-
ble, then it will repeat the contrasts entered. If the contrasts are not estimable,
it will enter the estimable function used instead of the nonestimable function.
Estimates
The estimates page produces estimates output instead of contrasts. As such,
the coefficients need not sum to zero. Additionally, multiple model terms may
be included in a single estimate.
Unlike contrasts, estimates do not support joint estimates. The confidence
intervals are marginal. The confidence level must be between 0 and 100. Note
that it is entered as a percent: Entering 0.95 will yield a very narrow confi-
dence interval with coverage just less than 1%.
All other options act similarly to the corresponding option in the Contrasts.
LinMix Wizard
The general steps to create a linear mixed effects model are outlined below.
Some steps are optional, depending which calculations are included. Refer to
An example on page 363 for an in-depth discussion of linear mixed effects
modeling in the context of an example study. See the Examples Guide for fur-
ther linear mixed effects modeling and bioequivalence examples.
Note: To reuse the model last run in LinMix (during the same WinNonlin session),
click the Previous Model button. To reload a previously-saved model, click
the Load... button and specify the name of the LinMix Command file (.LML).
ANOVA command files (.ANV) can also be loaded into LinMix so long as
bioequivalence is not included.
WinNonlin
Users Guide
390
15
To set up a linear mixed effects model:
1. Open the data file to be analyzed. This can be any worksheet, including mod-
eling results.
2. Select Tools>Linear Mixed Effects Wizard from the WinNonlin menus or
click on the Linear Mixed Effects Wizard tool bar button.
3. Define the model in the Fixed Effects dialog, as described under Fixed
effects on page 391.
4. Set up any other optional calculations and options as described under:
Variance structure on page 393
Contrasts on page 397
Estimates on page 398
Least squares means on page 399
LinMix general options on page 400
5. At any point in the LinMix wizard, the user can save the model to a LinMix
Command file (.LML) for future re-use, by clicking the Save Model button.
6. Click Calculate to start the calculations and close the LinMix wizard.
LinMix limits and constraints
Cell data may not include question marks (?) or either single (') or double (")
quotation marks.
Variable names must begin with a letter. After the first character, valid charac-
ters include numbers and underscore (my_file_2). They cannot include spaces
or the following operational symbols: +, - *, /, =. They also cannot include
parentheses (), question marks (?) or semicolons (;). Finally, variable names
may not have single or double quotes in them.
Titles (in Contrasts, Estimates, or ASCII) can have single or double quotation
marksbut not both.
The following are maximum counts for LinMix variables and other objects.
Table 15-10. LinMix item limits
Item Maximum
model terms 30
Linear Mixed Effects Modeling
LinMix Wizard
391
15
Fixed effects
To define the model:
1. Drag and drop variables to categorize those needed in the LinMix model:
Dependent variables contain the values to which the model will be fit,
e.g., drug concentration.
Classification variables or factors are categorical independent variables,
e.g., formulation, treatment, and gender.
Regressor variables or covariates are continuous independent variables,
e.g., temperature or body weight.
Sort variables define subsets of data to be processed separately, that is, a
separate analysis will be done for each level of the sort variables. If the
factors in a model term 10
sort keys 16
dependent variables 128
covariate/regressor variables 255
variables in the data set 256
random and repeated statements 10
variables 256
contrast statements 100
estimate statements 100
combined length of all variance parameter names (total characters) 10,000
combined length of all level names (total characters) 10,000
levels per variable 1,000
path and file name (total characters) 256
number of records passed from WinNonlin to other programs 65,535
characters per data cell 128
column name length (characters) 128
titles (e.g., output title or chart title) 5 lines
Table 15-10. LinMix item limits (continued)
Item Maximum
WinNonlin
Users Guide
392
15
Sort variable has missing values, the analysis will be performed for the
missing level and MISSING will be printed as the current value of the
Sort variable.
A weight variable can be included if weights for each record are included
in a separate data column. The weights are used to compensate for obser-
vations having different variances. When a weight variable is specified,
each row of data is multiplied by the square root of the corresponding
weight. Weight variable values should be proportional to the reciprocals
of the variances. In the most common situation, the data are averages and
weights are sample sizes associated with the averages. See also Weight-
ing on page 325.
The Weight Variable cannot be a classification variable. It must
have been declared as a regressor/covariate before it can be used
as a weight variable. It can also be used in the model.
2. In the box labeled Model Specification, enter the fixed effects model:
a. type the model, or
b. drag variable names and click on the operators to be used in the model.
For discussion of the model, using an example to illustrate, see The linear
mixed effects model on page 366.
Note: Parentheses in the model definition represent nesting of model terms. Hence:
Seq+Subject(Seq)+Period+Form
is a valid use of parentheses and indicates that Subject is nested within Seq.
Drug + Disease + (Drug*Disease)
is not a valid use of parentheses in the model definition.
3. Accept the default setting for Fixed Effects Confidence Level or enter the
confidence interval for calculations of the fixed effects model.
4. Check the Dependent Variables Transformation check box if the dependent
variable values should be log-transformed before analysis. Select the transfor-
mation from the pull-down list for Dependent Variables Transformation.
Linear Mixed Effects Modeling
LinMix Wizard
393
15
CAUTION: If the dependent variable data in the workbook are already log transformed,
do not select a log transformation from the pull-down list, as this will trans-
form the data a second time.
5. Select the No Intercept option to eliminate the intercept in the model. Note
that this will change the parameterization of the classification variables. See
Construction of the X matrix on page 368 for discussion.
6. At any time in the LinMix wizard, it is possible to save the model to a LinMix
Command file (.LML) for future re-use, by clicking the Save Model button.
7. Click Next (to move to the Variance structure) or Calculate (if all settings are
complete).
Variance structure
The Variance Structure dialog follows the Fixed effects dialog in the LinMix
wizard. (See LinMix Wizard on page 389.) It provides a variety of covari-
ance structures. The variances of the random-effects parameters become the
covariance parameters for this model. Mixed linear models contain both fixed
effects and random effect parameters. See Variance structure on page 378
for discussion of variance in linear mixed effects models.
The choices for variance structures are shown in Table 15-11.
WinNonlin
Users Guide
394
15
Table 15-11 uses the following notation:
n = number of groups, (n = 1 if the group option is not used)
t = number of time points in the repeated context
b = dimension parameter: for some variance structures, the num-
ber of bands; for others, the number of factors
1(expression) = 1 if expression is true, 0 otherwise
Table 15-11. Variance structure types
Description Number of Parameters i
th
, j
th
element
Variance Components
and i corresponds to
k
th
effect
Unstructured
Banded Unstructured (b)
if ; otherwise, same as Unstructured.
Toeplitz
Banded Toeplitz
if ; otherwise, same as Toeplitz
Compound Symmetry
Heterogeneous
Compound Symmetry
No-Diagonal
Factor Analytic
Banded
No-Diagonal
Factor Analytic (b)
if ; otherwise,
same as No-Diagonal Factor
Analytic
Autoregressive (1)
Heterogeneous
Autoregressive (1)
n
k
2
1 i j = ( )
n t t 1 + ( ) 2
ij
n b 2 2t b 1 + ( )
b t <
ij
i j n < ( )
n t
i j 1 +
n b b t <
i j 1 +
1 i j n < ( )
n 2
1
2
2
1 i j = ( ) +
n t 1 + ( )
i
j
1 i j ( ) 1 i j = ( ) + [ ]
n t t 1 + ( ) 2
i k
j k
k 1 =
mi n i j n , , ( )
n b 2 2t b 1 + ( )
b t <
n 2
i j
n t 1 + ( )
i j
Linear Mixed Effects Modeling
LinMix Wizard
395
15
The Random tab
The Random tab provides a means to incorporate random effects in a
model.Other Random models (tabs) can be added by clicking the Add Ran-
dom button. It can be used to specify traditional variance components and/or
to specify random coefficients. The random effects can be either classification
or continuous. The Repeated tab is used to specify covariance structures for
repeated measurements on subjects.
To specify random effects:
1. In the box labeled Random Effects Model, either enter the model by typing
or by dragging the variable names and operators to be used in the model from
the appropriate boxes to the Random Effects Model box using the mouse.
The model can be built from classification variables and/or regressors and the
operators at the top of the dialog.
Note: The same variable cannot be in both the fixedeffects specification and the
random effects specification unless it is used differentlyas part of a product,
for instance. The same term (single variables, products, or nested variables)
should not appear in both.
2. (Optional) Drag the appropriate variable to the Variance Blocking Variables
(Subject) field. The variable must be a classification model term. This Sub-
ject field identifies the subjects in a data set. Complete independence is
assumed among subjects. Thus, Subject produces a block diagonal structure
with identical blocks.
3. (Optional) Drag the appropriate variable to the Group field. The variable
must be a classification model term. This variable defines an effect specifying
heterogeneity in the covariance structure. All observations having the same
level of the group effect have the same covariance parameters. Each new level
of the group effect produces a new set of covariance parameters with the same
structure as the original group.
4. Select the type of covariance structure in the Type list. The options are
explained in Table 15-11, Variance structure types, on page 394.
5. Select the Random Intercept check box to indicate that the intercept is ran-
dom. This is most commonly employed when a subject is specified in the
Variance Blocking field. The default is off-no random intercept.
WinNonlin
Users Guide
396
15
Note: Additional random effects models can be added via the Add Random button.
The Repeated tab
The Repeated tab provides the means to specify the R matrix in the mixed
model. If no Repeated statement is specified, R is assumed to be equal to .
The repeated effect must contain only classification variables.
To specify the repeated variance structure:
1. In the box labeled Repeated Specification, either enter the model by typing
or by dragging the variable names and operators in the model from the appro-
priate boxes to the Repeated Specification box using the mouse.
The model can be built from classification variable terms and the operators at
the top of the dialog. Syntax rules for the repeated specification are the same
as those for the fixedeffects model.
2. (Optional) Drag the appropriate variable to the Variance Blocking Variables
(Subject) field. This must be a classification variable. This Subject field iden-
tifies the subjects in a data set. Complete independence is assumed among
subjects; Subject produces a block diagonal structure with identical blocks.
3. (Optional) Drag the appropriate variable to the Group field. This must be a
classification variable with no regressors or operators. It defines an effect
specifying heterogeneity in the covariance structure. All observations having
2
I
Linear Mixed Effects Modeling
LinMix Wizard
397
15
the same level of the group effect have the same covariance parameters. Each
new level of the group effect produces a new set of covariance parameters
with the same structure as the original group.
4. Select the type of covariance structure in the Type list. The options are
explained in Table 15-11, Variance structure types, on page 394.
5. Click Next to proceed to the Contrasts or Calculate to run the analysis.
Contrasts
The Contrasts dialog is next in the LinMix wizard after the Variance structure.
Contrasts provide a mechanism for creating custom hypothesis tests. Con-
trasts can be computed only for classification variables. (See Fixed effects
on page 391 to select classification variables.) Further discussion of contrasts
is provided in Contrasts on page 386.
Note: Interactions can be used as contrasts only if the interaction is a model term;
the same is true for nested terms.
To specify contrasts:
1. Enter a descriptive label for the contrast in the Title cell.
2. Drag the appropriate Model term to the cell labeled Effect.
3. Enter the appropriate contrast coefficients in the empty cells associated with
Contrasts.
Note: The coefficients for single contrasts must sum to zero.
The settings for contrast #1 are disabled until a term has been dragged to the
Effect field. Once contrast #1 has been specified, the settings for the contrast
can be specified. They are specific to that contrast.
Once Contrast #1 has been specified, the grid automatically expands to allow
for Contrast #2. This grid will allow additional contrasts, up to the maximum
number of contrasts (100).
WinNonlin
Users Guide
398
15
Note: If all values of the dependent variable are missing or excluded for a given
level of the effect variable, then this level of the effect variable will not appear
in the Contrast vector.
Effect variables may be either numeric or alphabetic, but they may not be
both. If a column contains both numeric and alphabetic data, the column can-
not be used as an effect variable when building contrasts.
4. Specify the Settings for the contrast entered. These settings are specific to the
active contrast.
a. The Number of columns for contrast check box tests multiple linearly
independent combinations simultaneously. These columns are tested
jointly.
b. If the algorithm doesnt seem to be using appropriate choices for the
degrees of freedom, select the User-specified [denominator] degrees of
freedom check box and enter an integer for df greater than 1.
c. The Show Coefficients of Contrasts check box ensures that the contrast
is estimable. This shows the actual coefficients used in the output. If the
contrast is not estimable, a nearby estimable function will be used instead.
d. The Estimability tolerance indicates the closeness of the zero vector
before invoking the algorithm to make it estimable.
Each contrast is tested independently of other contrasts.
5. Click Next to proceed to the Estimates, or Calculate to run the analysis.
Estimates
The LinMix Estimates dialog is similar to the Contrasts dialogexcept that
multiple effects can be used in each estimate statement. Interaction terms and
nested terms can be used if they appear in the model. If the fixedeffects
model includes an intercept (the default), then the term Intercept is included
with the model terms. If the Intercept term is used as an effect for the estimate,
it works like a regressor; only one number will be entered in the grid.
Note: The marginal confidence interval is generated for each estimate.
See also Estimates on page 389 and The linear mixed effects model on
page 366.
Linear Mixed Effects Modeling
LinMix Wizard
399
15
To enter estimates:
1. Enter a descriptive label for the estimate in the cell labeled Title.
2. Drag the appropriate Model term to the cell labeled Effect. The grid expands
to display every unique level of that term.
3. Enter the appropriate coefficients in the empty cells associated with Effects.
Note: Coefficients for estimates are not bound by the same limits as are those for
Contrasts.
4. (Optional) To create compound estimates, drag another model term below the
existing estimate. The grid expands to include the new term and its levels.
5. Enter the appropriate coefficients in the cells associated with the new term.
6. Repeat as necessary for other terms within any one estimate.
7. Repeat as necessary for other estimates. The grid automatically expands up to
the maximum number of estimates.
8. Specify the Settings for the Estimate:
a. Set the Confidence Level for confidence interval calculations.
b. If the algorithm doesnt seem to be using appropriate choices for the
degrees of freedom, select the User-specified [denominator] degrees of
freedom check box and enter an integer for df greater than 1.
c. Checking Show Coefficients of Estimates displays in the output the
actual coefficients used and, if the estimate is not estimable, applies a
nearby, estimable function.
d. The Estimability tolerance indicates the closeness of the zero vector
before invoking the algorithm to make it estimable.
9. Click Next to proceed to the Least squares means, or Calculate to run the
LinMix model.
Least squares means
Least squares means are generalized least-squares means of the fixed effects.
They are estimates of what the mean values would have been had the data
been balanced. That is, these are the means predicted by the ANOVA model.
WinNonlin
Users Guide
400
15
If a data set is balanced, the least squares means will be identical to the raw
(observed) means. See also Least squares means on page 383.
Least Squares Means can be computed for any classification model term. See
Fixed effects on page 375 to set classification variables.
To specify Least Squares Means:
1. The Least Squares Means dialog follows the Estimates dialog in the LinMix
wizard. (See LinMix Wizard on page 389.)
2. The linear mixed effects model terms are provided in the Model Classifiable
Terms field. Drag each model term for which the least square means are to be
calculated up to the Least Squares Means box.
3. (Optional) Select the Settings for the Least Squares Means. The settings
selected are applied to all terms.
a. Set the Confidence Level for confidence interval calculations.
b. If the algorithm doesnt seem to be using appropriate choices for the
degrees of freedom, select the User-specified [denominator] degrees of
freedom check box and enter an integer for df greater than 1.
c. Checking Show Coefficients of LSMs ensures that the contrast is esti-
mable. If the hypothesis is estimable, no change is made. If the test is not
estimable, this option will apply a nearby, estimable function.
d. The Estimability tolerance indicates the closeness of the zero vector
before invoking the algorithm to make it estimable.
e. The Compute Pairwise differences of LSMs check box provides addi-
tional output with the differences of confidence intervals and LSMs. This
function tests .
4. Click Next to proceed to the LinMix general options or Calculate to run the
LinMix analysis.
LinMix general options
To specify LinMix general options:
1. Click on the ASCII output check box to select ASCII text output in addition to
the grid output.
1
2
=
Linear Mixed Effects Modeling
LinMix output
401
15
2. Enter a title for the ASCII output (optional). The title can include up to 5
lines. When entering a multi-line title, press ENTER to move to the next line.
3. (Optional) Select the Degrees of freedom calculation form: Residual is the
same as in a purely fixed effects model. Satterthwaite computes the df base
on approximation to distribution of variance.
4. (Optional) Enter the number of Maximum iterations. This is the number of
iterations in the Newton fitting algorithm.
5. (Optional) If the model has random effects, select the Initial Variance
Parameters button to edit a grid of the parameters. If these are not specified,
the application uses the method of moments estimates. Click OK.
6. (Optional) Set the Singularity Tolerance level. The columns in X and Z are
eliminated if their norm this number.
7. (Optional) Specify the Convergence Criterion. For more details on the com-
putations, see Convergence criterion on page 410.
8. (Optional) Select Intermediate Calculations to include the design matrix,
reduced data matrix, asymptotic covariance matrix of variance parameters,
Hessian, and final variance matrix in the ASCII output.
9. To save the model to a LinMix command file (.LML) for later re-use, use the
Save Model button.
10. Click Calculate to run the LinMix analysis, or Back to return to the Least
squares means and other previous settings.
For more detail on ASCII and data grid output, See LinMix output on
page 401.
LinMix output
When LinMix calculations have completed (see LinMix Wizard on
page 389 and Computational details on page 407), the output is displayed in
one or both of the following windows.
Linear mixed effects text
This is the optional ASCII output selected in the LinMix general options. It
contains a complete summary of the analysis.
2
WinNonlin
Users Guide
402
15
Figure 15-1. LinMix text (ASCII) output
Linear mixed effects workbook
The Linear Mixed Effects Workbook contains summary tables of the output.
Depending which model options have been set up, workbook may contain the
items listed in Table 15-12.
Table 15-12. Linear mixed effects worksheets
Item Contents
Diagnostics Model-fitting information
Sequential Tests Tests of fixed effects, performed sequentially
Partial Tests Tests of fixed effects, but each term is tested last
Final Fixed
Parameters
Estimates, standard error, t-statistic, p-value, and confidence intervals
Final Variance
Parameters
Estimates and units of the final variance parameters
Parameter Key Information about the variance structure
Contrasts Hypothesis, df, F-statistic, and p-value
Estimates Estimate, standard error, t-statistic, pvalue, and confidence interval
Linear Mixed Effects Modeling
LinMix output
403
15
Details for specific output follow.
Tests of hypotheses
The tests of hypotheses are the mixed model analog to the analysis of variance
in the fixed model case. The tests are performed by finding appropriate L
matrices and testing the hypotheses H0: L = 0 for each model term.
Sequential tests
The sequential tests test each model term sequentially. First it is tested
whether the first model term should enter the model. Then it is tested whether
the second model term should enter the model, given that the first term is in
the model. Then it is tested whether the third model term should enter the
model, given that the first two terms are in the model. This continues until all
the model terms are exhausted.
This is computed using a QR factorization of the XY matrix. The QR factoriza-
tion is segmented to match the number of columns that each model term con-
tributes to the X matrix.
Partial tests
Partial tests test each model term given every other model term. Unlike
sequential tests, partial tests are invariant under the order in which model
terms are listed on the Fixed Effects page of the wizard. It does this by factor-
ing out of each model term the contribution attributable to the remaining
model terms.
Least Squares
Means
Least squares means, standard error, df, t-statistic, p-value, and confi-
dence interval
Residuals Dependent variable(s), units, observed and predicted values, standard
error and residuals
User Settings Information about model settings
Initial Variance
Parameters
Initial values for variance parameters
Iteration History Data on the variable estimation in each iteration
Table 15-12. Linear mixed effects worksheets (continued)
Item Contents
WinNonlin
Users Guide
404
15
This is computed by modifying the basis created by the QR factorization to
yield a basis that more closely resembles that found in balanced data.
Discussion
For fixed effects models, certain properties can be stated for the two types of
ANOVA. For the sequential ANOVA, the sums of squares are statistically
independent. Also, the sum of the individual sums of squares is equal to the
model sum of squares; i.e., the ANOVA represents a partitioning of the model
sum of squares. However, some terms in ANOVA may be contaminated with
undesired effects. The partial ANOVA is designed to eliminate the contamina-
tion problem, but the sums of squares are correlated and do not add up to the
model sums of squares. The mixed effects tests have similar properties.
Akaikes Information Criterion (AIC)
The Linear Mixed Effects module uses the smaller-is-better form of Akaikes
Information Criterion:
AIC = 2L
R
+ 2s
where L
R
is the restricted log-likelihood function evaluated at final fixed
parameter estimates and the final variance parameter estimates , and s
is the rank of the fixed effects design matrix X plus the number of parameters
in (i.e., s = rank(X) + dim()).
Schwarzs Bayesian Criterion (SBC)
The Linear Mixed Effects module uses the smaller-is-better form of
Schwarzs Bayesian Criterion:
where L
R
is the restricted log-likelihood function evaluated at the final esti-
mates and ,
N is the number of observations used,
r is the rank of the fixed effects design matrix X, and
s is the rank of the fixed effects design matrix X plus the number of
parameters in
(i.e., s = rank(X) + dim() ).
SBC 2L
R
s N r ( ) log + =
Var y
( ) X X
T
V
X ( )
1
X
T
=
i
y
WinNonlin
Users Guide
406
15
When there are multiple solutions, a convention is followed such that if any
column of T
00
is a linear combination of preceding columns, then the corre-
sponding element of is set to zero.
Coefficients
If the Display Coefficients check box is checked on any of the page of the
LinMix wizard, the coefficients of the parameters used to construct the linear
combination will be displayed. If the linear combination is estimable, then the
coefficients will be the same as those entered. If the linear combination is not
estimable, then the estimable replacement will be displayed. This gives the
user the opportunity to inspect what combination is actually used to see if it
represents the intentions.
Iteration history
This worksheet displays the results of the fitting algorithm. If the initial esti-
mates are the restricted maximum likelihood estimates, then zero iterations
will be displayed.
Parameter key
If the model included random or repeated effects, the Parameter column of
this grid contains the variance parameter names assigned by LinMix. If the
Group option is not used in the model or if there is only one random or
repeated model, then indices are not used in the parameter names.
Otherwise, two indices are appended to the variance parameter names in order
to clarify which random or repeated model, or group, the variance parameter
addresses. The first index indicates the random model or repeated model to
which the parameter applies. An index of 1 indicates the model on the Ran-
dom 1 tab in the user interface, etc. The highest index indicates the repeated
model if there was one. The second index is the group index indicating that
the parameters with the same group index are for the same group level.
Source Random if the parameter is from a random model
Repeated if the parameter is from a repeated specification
Assumed if the variance parameter is the residual
Type Variance type specified by the user, or Identity, if the residual variance
Bands Number of bands or factors if appropriate for the variance type
e
= residual variance
n
e
= residual degrees of freedom, and
N = number of observations used.
For some balanced problems, y
e
is treated as a multivariate residual,
, in order to increase the speed of the program and then the
log-likelihood can be computed by the equivalent form:
where V is the dispersion matrix for the multivariate normal distribution.
For more information on REML, see Corbeil and Searle (1976).
Newtons Algorithm for maximization of restricted likelihood
As a general review, Newtons algorithm is an iterative algorithm used for
finding the minimum of an objective function. The algorithm needs a starting
point, and then at each iteration, it finds the next point using:
i+1
=
i
H
1
(
i
) g(
i
),
y
e1
y
e2
y
en
[ ]
L y
e
; ( ) ( ) log
n
2
--- V
1
( ) log
1
2
--- y
ei
T
V
1
y
ei
i 1 =
n
=
Linear Mixed Effects Modeling
Computational details
409
15
where H
1
is the inverse of the Hessian of the objective function, and g is the
gradient of the objective function. The algorithm stops when a convergence
criterion is met, or when it is unable to continue.
In the Linear Mixed Effects module, a modification of Newtons algorithm is
used to minimize the negative restricted log-likelihood function with respect
to the variance parameters , hence yielding the variance parameters that
maximize the restricted likelihood. Since a constant term does not affect the
minimization, the objective function used in the algorithm is the negative of
the restricted log-likelihood without the constant term:
objective function = log(L(; y
r
)) log(L(; y
e
))
Newtons algorithm is modified by adding a diagonal matrix to the Hessian
when determining the direction vector for Newtons algorithm so that the
diagonal matrix plus the Hessian matrix is positive definite, ensuring a direc-
tion of descent:
i+1
=
i
( H
i
+ D
i
)
1
g
i
The appropriate D
i
matrix is found by a modified Cholesky factorization as
described in Gill, Murray, and Wright. Another modification to Newtons
algorithm is that, once the direction vector
d = ( H
i
+ D
i
)
1
g
i
has been determined, a line search is done as described in Fletcher (1980) to
find an approximate minimum along the direction vector.
Note from the discussion on REML estimation that the restricted log-likeli-
hood is a function of the variance matrix V
r
and the residual variance, which
are in turn functions of the parameters . The gradient and Hessian of the
objective function with respect to are therefore functions of first and second
derivatives of the variances with respect to . Since the variances can be
determined through the types specified for G and R (e.g., Variance Compo-
nents, Unstructured, etc.), the first and second derivatives of the variance can
be evaluated in closed-form, and hence the gradient and Hessian are evaluated
in closed-form in the optimization algorithm.
Starting values
Newtons algorithm requires initial starting values for the variance parameter
. If the user has some knowledge of these values, the user can supply these
WinNonlin
Users Guide
410
15
values in the Linear Mixed Effects interface. On the General Options page,
click Initial Variance Parameters button. More often, the user will want the
Linear Mixed Effects module to determine initial values. For variance struc-
tures that are linear in (Variance Components, Unstructured, Compound
Symmetry, and Toeplitz), the initial values are determined by the method of
moments. If the variance structure is nonlinear, then the program will calcu-
late a sample variance by solving for random effects and taking sums of
squares and cross-products of the random effects. The sample variance will
then be equated with the parametric variance, and the system of equations will
be solved to obtain initial parameter estimates. If either of these methods fail,
the program will use starting values that should yield a reasonable variance
matrix such as 1.0 for variance components and standard deviations, and 0.01
for correlations.
Sometimes the method of moments will yield estimates of that are REML
estimates. In this case the program will not need to iterate.
Convergence criterion
The convergence criterion used in the Linear Mixed Effects module is that the
algorithm has converged if:
g
T
() H
1
() g() < ,
where is the convergence criterion specified on the General Options page of
the wizard. The default value is 110
10
.
The possible convergence outcomes from Newtons algorithm are:
Newton's algorithm converged with a final Hessian that is positive defi-
nite. This indicates successful convergence at a local minimum and hope-
fully at a global minimum.
Newton's algorithm converged with modified Hessian. This indicates that
the output is suspect, and the model may be over-specified. The algorithm
has converged but is not at a local minimum. It may be in a trough, at a
saddle point, or on a flat surface.
Initial variance matrix is not positive definite. This indicates an invalid
starting point for the algorithm.
Intermediate variance matrix is not positive definite. The algorithm is
unable to continue.
Failed to converge in allocated number of iterations.
Linear Mixed Effects Modeling
Computational details
411
15
Satterthwaites approximation for degrees of freedom
The linear model used in linear mixed effects modeling is:
where X is a matrix of fixed known constants, b is an unknown vector of con-
stants, and V is the variance matrix that depends on other unknown parame-
ters. Wald (1943) developed a methodology for testing hypotheses in a rather
general class of models. To test the hypothesis H
0
: Lb = 0 in (10), the Wald
statistic is:
where and are estimators of and V. L must be a matrix such that each
row is in the row space of X. The Wald statistic is asymptotically distributed
under the null hypothesis as a chi-squared random variable with q = rank(L)
degrees of freedom.
In common variance component models with balanced data, the Wald statistic
has an exact F-distribution. Using the chi-squared approximation results in a
testing procedure that is too liberal. LinMix uses a method due to Allen
(2001) for finding an F distribution to approximate the distribution of the
Wald statistic.
Giesbrecht and Burns (1985) suggested a procedure to determine denominator
degrees of freedom when there is one numerator degree of freedom. Their
methodology applies to variance component models with unbalanced data.
Allen derived an extension of their technique to the general mixed model.
A one degree of freedom (df) test is synonymous with L having one row in
(11). When L has a single row, the Wald statistic can be re-expressed as:
Consider the right hand side of (12). The distribution of the numerator is
approximated by chi-squared random variable with 1 df. The objective is to
Y ~ N(Xb, V) (10)
(11)
(12)
L
( )
T
L X
T
V
1
X ( )
1
L
T
[ ]
1
L
( )
( )
2
L X
T
V
1
X ( )
1
L
T
--------------------------------------
L
( )
2
L X
T
V
1
X ( )
1
L
T
--------------------------------------
L X
T
V
1
X ( )
1
L
T
L X
T
V
1
X ( )
1
L
-------------------------------------- =
WinNonlin
Users Guide
412
15
find a such that the denominator is approximately distributed as a chi-
squared variable with df. If:
is true, then:
The approach is to use (13) to solve for .
Find an orthogonal matrix R and a diagonal matrix such that:
The Wald statistic (11) can be re-expressed as:
where r
u
is the u-th column of R, and
u
is the u-th diagonal of . Each term
in (14) is similar in form to (12). Assuming that the u-th term is distributed
F(1,
u
), the expected value of W is:
Assuming W is distributed F(q, ), its expected value is q/(-2). Equating
expected values and solving for , one obtains:
= 2 E{W} / (E{W} q)
(13)
(14)
L X
T
V
1
X ( )
1
L
T
L X
T
V
1
X ( )
1
L
--------------------------------------
2
---------
Var
L X
T
V
1
X ( )
1
L
T
L X
T
V
1
X ( )
1
L
--------------------------------------
2
--- =
L X
T
V
1
X ( )
1
L
T
RR
T
=
W R
T
L
( )
T
1
R
T
L
( )
r
u
L
( )
2
u
-------------------
u 1 =
q
= =
E W ( )
u
u
2
--------------
u 1
q
=
Linear Mixed Effects Modeling
Comparing LinMix to ANOVA and SASs PROC MIXED
413
15
Comparing LinMix to ANOVA and SASs PROC MIXED
This section outlines differences between LinMix and the WinNonlin
ANOVA module (deprecated), and between LinMix and PROC MIXED from
SAS
.
Feature LinMix ANOVA PROC MIXED
Degrees of
freedom
Uses Satterthwaite approximation for
all degrees of freedom, by default. User
can also select Residual.
Uses only
Residual.
PROC MIXED chooses different defaults
depending on the model, random, and
repeated statements. In order for LinMix
and SAS to be consistent, the ddfm=sat-
terth option in SAS should be set.
Multiple
factors on
the same
random
command
In LinMix, effects associated with the
columns of the matrix specified in a sin-
gle random statement are assumed to
be correlated according to the variance
specified. The rule in LinMix is simple
regardless of the variance structure: If
the random effects are correlated, put
them on the same random tab. If the
random effects are independent, put
them on separate random tabs.
N/A SAS behaves similarly, except that it does
not follow this rule in the case of Variance
Components, so LinMix and SAS will differ
for models with multiple terms on a random
statement using the VC structure.
REML REML (Restricted Maximum Likeli-
hood) estimation, as defined in Corbeil
and Searle (1976), does maximum like-
lihood estimation on the residual vector.
This is how it is done in LinMix.
N/A By default, SAS modifies the REML
approach by profiling out the residual vari-
ance. In order for LinMix and SAS to be
consistent, the noprofile option should be
set in SAS on the proc mixed statement. In
particular, LinMixs log(likelihood) may not
be equal to twice SASs 2 Res Log Like if
the noprofile option is not set.
Akaike and
Schwarzs
criteria
LinMix uses the smaller-is-better form
of AIC and SBC in order to match Win-
Nonlin and WinNonMix.
N/A SAS uses the bigger-is-better form. In addi-
tion, AIC and SBC are functions of the likeli-
hood, and the likelihood calculation method
in LinMix also differs from SAS.
Saturated
variance
structure
In models where the random statement
saturates the variance part of the
model, the residual is not estimable.
LinMix sets the residual variance to
zero. The user-specified variance
structure takes priority over that sup-
plied by LinMix.
N/A SAS sets the residual to some other num-
ber. The SAS residual needs to be added to
the other SAS variance parameter esti-
mates in order to match the LinMix output.
WinNonlin
Users Guide
414
15
Conver-
gence cri-
teria
The convergence criterion in LinMix is
g
T
H
1
g < tolerance with H positive def-
inite, where g is the gradient and H is
the Hessian of the negative log-like-
hood. This would be equivalent to SAS
if the convh and absolute options
were set in SAS.
N/A The default convergence criterion options in
SAS are convh and relative.
Modified
likelihood
LinMix always tries to keep the final
Hessian (and hence the variance
matrix) positive definite. LinMix will
determine when the variance is over-
specified, and set some of the parame-
ters to zero.
N/A SAS will let the final Hessian be not positive
definite, and hence will get different final
parameter estimates. This situation often
occurs when the variance is over-specified
(i.e., there are too many parameters in the
model).
Keeping
VC positive
For VC structure, LinMix will keep the
final variance matrix positive definite,
but it will not force the individual vari-
ances to be positive.
N/A If SAS estimates a negative variance com-
ponent, it outputs 0.
Partial
tests of
model
effects
The partial tests in LinMix are not
equivalent to the Type III method in
SAS though they coincide in most situ-
ations. See Partial tests on page 403.
As SASs
PROC
GLM Type
III
The Type III results can change depending
on how one specifies the model. For
details, consult the SAS manual or contact
support@pharsight.com.
Not estima-
ble param-
eters on
output
If a variable is not estimable, LinMix
prints Not estimable in the output, and
also gives the user the option to write
out 0 instead.
Prints Not
estimable
SAS writes the value of 0.
ARH, CSH
variance
structures
LinMix uses the standard deviations for
the parameters, and prints the standard
deviations in the output.
N/A SAS prints the variances in the output for
final parameters, though the model is
expressed in terms of standard deviations.
Repeated
without any
time vari-
able
LinMix requires an explicit repeated
model. To run some SAS examples, a
time variable would need to be added
to the data.
N/A SAS allows the repeated model specifica-
tion to be unspecified. In this case, SAS
creates an implicit time variable, and
assumes the data are appropriately sorted.
Group as
classifica-
tion vari-
able
LinMix requires variables used for the
subject and group options to be
declared as classification variables.
N/A SAS allows regressors, but requires the
data to be sorted and considers each
change in the value of the regressor to indi-
cate a new subject or group. This is also
how classification variables are treated.
Feature LinMix ANOVA PROC MIXED
Linear Mixed Effects Modeling
Comparing LinMix to ANOVA and SASs PROC MIXED
415
15
Singularity
tolerance
Define d
ii
as the i-th diagonal element
of the QR factorization of X, and D
ii
the
sum of squares of the i-th column of the
QR factorization. The i-th column of X
is deemed linearly dependent on the
proceeding columns if d
ii
2
< (singularity
tolerance)D
ii
. If intercept is present,
the first row of D
ii
is omitted.
Define d
ii
as the diagonal element of the
X
T
X matrix during the sweeping process. If
the absolute diagonal element |d
ii
| < (singu-
larity tolerance)D
ii
, where D
ii
is the original
diagonal of X
T
X, then the parameter asso-
ciated with the column is set to 0, and the
parameter estimates are flagged as biased.
Feature LinMix ANOVA PROC MIXED
WinNonlin
Users Guide
416
15
417
Chapter 16
Bioequivalence
Calculating average, individual, and population
bioequivalence
WinNonlin includes a Bioequivalence Wizard that calculates average or popu-
lation/individual bioequivalence. Defined as relative bioavailability, bioequiv-
alence involves comparison between test and reference drug products, where
the test and reference products can vary, depending upon the comparison to be
performed. Although bioavailability and bioequivalence are closely related,
bioequivalence comparisons rely on a criterion, a predetermined bioequiva-
lence limit, and calculation of a confidence interval for that criterion.
Introduction to bioequivalence
Basic terms
Bioequivalence is said to exist when a test formulation has a bioavailability
that is similar to that of the reference. There are three types of bioequivalence:
Average, Individual, and Population.
The July 1992 guidance on Statistical Procedures for Bioequivalence Studies
Using a Standard Two-Treatment Crossover Design recommended that a stan-
dard in vivo bioequivalence study design be based on the administration of
either single or multiple doses of the test and reference products to healthy
subjects on separate occasions, with random assignment to the two possible
sequences of drug product administration. Further, the 1992 guidance recom-
mended that statistical analysis for pharmacokinetic parameters, such as area
under the curve (AUC) and peak concentration (Cmax) be based on a test pro-
cedure termed the two one-sided tests procedure to determine whether the
average values for pharmacokinetic parameters were comparable for test and
reference formulations. This approach is termed average bioequivalence and
involves the calculation of a 90% confidence interval for the ratio of the aver-
WinNonlin
Users Guide
418
16
ages of the test and reference products. To establish bioequivalence, the calcu-
lated confidence interval should fall within a bioequivalence limit, usually 80-
125% for the ratio of the product averages. In addition to specifying this gen-
eral approach, the 1992 guidance also provided specific recommendations for
(1) logarithmic transformations of pharmacokinetic data, (2) methods to eval-
uate sequence effects, and (3) methods to evaluate outlier data.
The 2001 FDA Guidance Statistical Approaches to Establishing Bioequiva-
lence recommends that average bioequivalence be supplemented by two new
approaches, population and individual bioequivalence. Population and indi-
vidual bioequivalence include comparisons of both the averages and variances
of the study measure. Population bioequivalence assesses the total variability
of the measure in the population. Individual bioequivalence assesses within-
subject variability for the test and reference products as well as the subject-
by-formulation interaction.
Bioequivalence
Bioequivalence between two formulations of a drug product, sometimes
referred to as relative bioavailability, indicates that the two formulations are
therapeutically equivalent and will provide the same therapeutic effect. The
objective of a bioequivalence study is to determine whether bioequivalence
exists between a test formulation and reference formulation and to hence
identify whether the two formulations are pharmaceutical alternatives that can
be used interchangeably to achieve the same effect.
Bioequivalence studies are important because establishing bioequivalence
with an already approved drug product is a cost-efficient way of obtaining
drug approval. For example, to get approval to market a generic drug product,
the Food and Drug Administration (FDA) usually does not require a new drug
application submission if the generic drug company can provide evidence of
bioequivalence between the generic drug product and the innovator product.
Bioequivalence studies are also useful for testing new formulations of a drug
product, new routes of administration of a drug product, and for a drug prod-
uct that has changed after approval.
Three different types of bioequivalence have been established by the FDA.
These are average bioequivalence, population bioequivalence, and individual
bioequivalence. All types of bioequivalence comparisons are based on the cal-
culation of a criterion (or point estimate), on the calculation of a confidence
interval for the criterion, and on a predetermined acceptability limit for the
confidence interval.
Bioequivalence
Introduction to bioequivalence
419
16
A procedure for establishing average bioequivalence was recommended by
the FDA in the 1992 guidance on Statistical Procedures for Bioequivalence
Studies Using a Standard Two-Treatment Crossover Design. The FDA rec-
ommended administration of either single or multiple doses of the test and
reference formulations to subjects, with random assignment to the possible
sequences of drug administration. The guidance then recommended that a sta-
tistical analysis of pharmacokinetic parameters such as AUC and Cmax be
done on a log-transformed scale to determine the difference in the average
values of these parameters between the test and reference data, and to deter-
mine the confidence interval for the difference. To establish bioequivalence,
the confidence interval, usually calculated at the 90% confidence level,
should fall within a predetermined acceptability limit, usually within 20% of
the reference average. The FDA also recommended an equivalent approach
using two, one-sided t-tests. Both the confidence interval approach and the
two one-sided t-tests are described further below.
The January 2001 guidance Statistical Approaches to Establishing Bioequiv-
alence recommends that average bioequivalence be supplemented by two
new approaches, population and individual bioequivalence. These added
approaches are needed because average bioequivalence uses only a compari-
son of averages, and not the variances, of the bioequivalence measures. In
contrast, population and individual bioequivalence approaches include com-
parisons of both the averages and variances of the study measure. The popula-
tion bioequivalence approach assesses the total variability of the study
measure in the population. The individual bioequivalence approach assesses
within-subject variability for the test and reference products as well as the
subject-by-formulation interaction.
The concepts of population and individual bioequivalence are related to two
types of drug interchangeabilityprescribability and switchability. Drug pre-
scribability refers to when a physician prescribes a drug product to a patient
for the first time, and must choose from a number of bioequivalent drug prod-
ucts. Drug prescribability is usually assessed by population bioequivalence.
Drug switchability refers to when a physician switches a patient from one
drug product to a bioequivalent product, such as when switching from an
innovator drug product to a generic substitute within the same patient. Drug
switchability is usually assessed by individual bioequivalence.
WinNonlin
Users Guide
420
16
The model
Linear model
As in the Linear Mixed Effects Modeling wizard, the Bioequivalence Wizard
is based upon a mixed effects model. See The linear mixed effects model on
page 366. For more details on the models required for different kinds of
bioequivalence, see Average, Population, and Individual Approaches to
Establishing Bioequivalence. FDA Guidance for Industry. August 1999.
Variance structures
The variance structures available in the Bioequivalence Wizard are the same
as those available in the Linear Mixed Effects Modeling wizard. See Vari-
ance structure on page 393.
Average bioequivalence
Study designs
The most common study designs used in bioequivalence studies are replicated
crossover, nonreplicated crossover, and parallel. In a parallel design, each
subject receives only one formulation in random fashion, whereas in a cross-
over design each subject receives more than one formulation at different time
periods. Crossover designs are further broken down into designs that are repli-
cated and nonreplicated, where nonreplicated designs are those in which the
subjects receive only one dose of the test formulation and only one dose of the
reference formulation, whereas replicated designs involve multiple doses. The
FDA recommends that a bioequivalence study should use a crossover design
unless a parallel or other design can be demonstrated to be more appropriate
for valid scientific reasons. Replicated crossover designs need be used for
individual bioequivalence studies, and can be used for average or population
bioequivalence analysis.
In the Bioequivalence Wizard, if the reference formulation and all of the test
formulations have at least one subject with more than one dose of that formu-
lation, then this is considered a replicated design. As an example, for the two
formulations T and R, a 23 crossover design as described in the table below
is a replicated crossover design.
Bioequivalence
Average bioequivalence
421
16
An example of a nonreplicated crossover design is the standard 2x2 crossover
design described in the 1992 FDA guidance and in the table below.
Recommended models for average bioequivalence
The recommended model to be used in average bioequivalence studies
depends on the type of study design that was used parallel, nonreplicated
crossover, or replicated crossover.
Replicated crossover designs
For replicated crossover designs, the default model used in the Bioequiva-
lence Wizard is the example model given for replicated designs in Appendix
E of the FDA guidance:
Fixed effects model is:
DependentVariable = Intercept + Sequence + Formulation + Period
Random effects model is:
Treatment
Variance Blocking Variable set to Subject
Type set to Banded No-Diagonal Factor Analytic with 2 factors
Repeated specification is:
Period
Variance Blocking Variables set to Subject
Period 1 Period 2 Period 3
Sequence 1 T R T
Sequence 2 R T R
Period 1 Period 2
Sequence 1 T R
Sequence 2 R T
WinNonlin
Users Guide
422
16
Group set to Treatment
Type set to Variance Components
Rather than using the implicit repeated model as in Appendix E, the time vari-
able is made explicit as Period.
Nonreplicated crossover designs
For nonreplicated crossover designs, the default model used in the Bioequiva-
lence Wizard is as follows.
Fixed effects model is:
DependentVariable = Intercept + Sequence + Formulation + Period
Random effects model is the nested term:
Subject(Sequence)
There is no repeated specification, so the default error model ~ N(0,
2
I)
will be used. This is equivalent to the classical analysis method, but using
maximum likelihood instead of method of moments to estimate inter-subject
variance. Using Subject as a random effect this way, the correct standard
errors will be computed for sequence means and tests of sequence effects.
Using a fixed effect model, one must construct pseudo-F tests by hand to
accomplish the same task.
Parallel designs
For parallel designs, the default model used in the Bioequivalence Wizard is
as follows.
Fixed effects model is:
Formulation
There is no random model and no repeated specification, so the residual error
term is included in the model.
Note: In each case, the user may supplement or modify the model to suit the analysis
needs of the data set in consideration.
Bioequivalence
Average bioequivalence
423
16
Least squares means
In determining the bioequivalence of a test formulation and a reference for-
mulation, the first step is the computation of the least squares means and stan-
dard errors of the test and reference formulations and the standard error of the
difference of the test and reference least squares means. These quantities are
computed by the same process that is used for the Linear Mixed Effects mod-
ule. See Least squares means on page 383.
To simplify the notation for this section, let:
RefLSM = reference least squares mean (computed by LinMix),
TestLSM = test least squares mean (computed by LinMix),
fractionToDetect = (user-specified percent of reference to detect) / 100,
DiffSE = standard error of the difference in least squares means (com-
puted by LinMix),
RatioSE = standard error of the ratio of the least squares means.
The geometric least squares means are computed if the user specified that the
data was to be transformed or was already transformed. For ln-transform or
data already ln-transformed,
For log10-transform or data already log10-transformed,
The difference is the test least squares mean minus the reference least squares
mean,
Calculation of the ratio depends on the transformation of the data. For data
that is not transformed,
RefGeoLSM = exp(RefLSM)
TestGeoLSM = exp(TestLSM)
RefGeoLSM = 10
RefLSM
TestGeoLSM = 10
TestLSM
Difference = TestLSM RefLSM
WinNonlin
Users Guide
424
16
For ln-transform or data already ln-transformed, the ratio is obtained on arith-
metic scale by exponentiating,
Similarly for log10-transform or data already log10-transformed, the ratio is
Classical and Westlake confidence intervals
Output from the Bioequivalence module includes the classical confidence
intervals and Westlake confidence intervals for confidence levels equal to 80,
90, 95, and for the confidence level that the user gave on the bioequivalence
tab if that value is different than 80, 90, or 95. To compute the classical confi-
dence intervals, first the following values are computed using the students-t
distribution, where alpha = (100 confidenceLevel) / 100
These values are then transformed if necessary to be on the arithmetic scale,
and translated to percentages. For ln-transform or data already ln-transformed,
For log10-transform or data already log10-transformed,
Ratio(%Ref) = 100 TestLSM / RefLSM
Ratio(%Ref) = 100 exp(Difference)
Ratio(%Ref) = 100 10
Difference
lower = Difference t
(1-alpha/2),df
DiffSE
upper = Difference + t
(1-alpha/2),df
DiffSE
CI_Lower = 100 exp(lower)
CI_Upper = 100 exp(upper)
CI_Lower = 100 10
lower
CI_Upper = 100 10
upper
Bioequivalence
Average bioequivalence
425
16
For no transform,
where the approximation RatioSE = DiffSE / RefLSM is used. Similarly,
The procedure for computing the Westlake confidence intervals is given in
many statistical references. See, for example, Chow and Liu (2000), page 86.
Computing these intervals is an iterative procedure for which the Nelder-
Mead simplex algorithm is used. It is possible that there will not be conver-
gence, in which case the Bioequivalence module will print Not Estimable.
The bioequivalence conclusion that appears in the text output depends on the
user-specified values for the confidence level and for the percent of reference
to detect; these options are entered on the bioequivalence options tab of the
Bioequivalence wizard. To conclude whether bioequivalence has been
achieved, the CI_Lower and CI_Upper for the user-specified value of the con-
fidence level are compared to the following lower and upper bounds. Note
that the upper bound for log10 or ln-transforms or for data already trans-
formed is adjusted so that the bounds are symmetric on a logarithmic scale.
If the interval (CI_Lower, CI_Upper) is contained within LowerBound and
UpperBound, then average bioequivalence has been shown. If the interval
(CI_Lower, CI_Upper) is completely outside the interval (LowerBound,
UpperBound), then average bioinequivalence has been shown. Otherwise, the
CI_Lower = 100(1+lower/RefLSM)
= 100(1+(TestLSMRefLSM)/RefLSMt
(1-alpha/2),df
*DiffSE/RefLSM)
= 100(TestLSM/RefLSMt
(1alpha/2),df
RatioSE)
CI_Upper = 100 (1 + upper / RefLSM)
LowerBound = 100 (percent of reference to detect)
UpperBound (ln-transforms) = 100 exp( ln(1 fractionToDetect) )
= 100 (1 / (1 fractionToDetect))
UpperBound (log10-transforms) = 100 10 ^ ( log10(1.0 fractionToDe-
tect))
= 100 (1 / (1 fractionToDetect))
UpperBound (no transform) = 100 + (percent of reference to detect)
WinNonlin
Users Guide
426
16
bioequivalence module has failed to show bioequivalence or bioinequiva-
lence.
Two one-sided T-tests
For ln-transform or data already ln-transformed, the first t-test is a left-tail test
of the hypotheses:
The test statistic for performing this test is:
The p-value is determined using the t-distribution for this t-value and the
degrees of freedom. If the p-value is <0.05, then the user can reject H
0
at the
5% level, i.e. have less than a 5% chance of rejecting H
0
when it was actually
true.
For log10-transform or data already log10-transformed, the first test is done
similarly using log10 instead of ln.
For data with no transformation, the first test is (where Ratio here refers to
Ratio(%Ref) / 100 ):
The test statistic for performing this test is:
where the approximation RatioSE = DiffSE / RefLSM is used.
The second t-test is a right-tail test which is a symmetric test to the first. How-
ever for log
10
or ln-transforms, the test will be symmetric on a logarithmic
H
0
: Difference < ln(1 fractionToDetect) (bioinequivalence for left
test)
H
1
: Difference ln(1 fractionToDetect) (bioequivalence for left test)
t
1
= ( (TestLSM RefLSM) ln(1 fractionToDetect) ) / DiffSE
H
0
: Ratio < 1 fractionToDetect
H
1
: Ratio 1 fractionToDetect
t
1
= [ (TestLSM / RefLSM) (1 fractionToDetect) ] / RatioSE
Bioequivalence
Average bioequivalence
427
16
scale. For example, if the percent of reference to detect is 20%, then the left-
tail test is Pr(<80%), but for ln-transformed data, the right-tail test is
Prob(>125%), since ln(0.8) = ln(1.25).
For ln-transform or data already ln-transformed, the second test is a right-tail
test of the hypotheses:
The test statistic for performing this test is:
For log10-transform or data already log10-transformed, the second test is
done similarly using log
10
instead of ln.
For data with no transformation, the second test is:
The test statistic for performing this test is:
where the approximation RatioSE = DiffSE / RefLSM is used.
The output for the two one-sided t-tests includes the p-value for the first test
described above, the p-value for the second test above, the maximum of these
p-values, and total of these p-values. The two one-sided t-tests procedure is
operationally equivalent to the classical confidence interval approach. That is,
if the classical (1-2alpha) 100% confidence interval for difference or ratio
is within LowerBound and UpperBound, then both the H
0
s given above for
the two tests are also rejected at the alpha level by the two one-sided t-tests
procedure.
H
0
: Difference > ln(1 fractionToDetect) (bioinequivalence for right
test)
H
1
: Difference ln(1 fractionToDetect) (bioequivalence for right
test)
t
2
= ( (TestLSM RefLSM) + ln(1 fractionToDetect) ) / DiffSE
H
0
: Ratio > 1 + fractionToDetect
H
1
: Ratio 1 + fractionToDetect
t
2
= ( (TestLSM / RefLSM) (1 + fractionToDetect) ) / RatioSE
WinNonlin
Users Guide
428
16
Anderson-Hauck test
See Anderson and Hauck (1983), or page 99 of Chow and Liu (2000). Briefly,
the Anderson-Hauck test is based on the hypotheses:
H
01
:
T
-
R
<
L
vs. H
A1
:
T
-
R
>
L
H
02
:
T
-
R
>
U
vs. H
A2
:
T
-
R
<
U
where
L
and
U
are the lower and upper Anderson-Hauck limits; these limits
are entered on the bioequivalence options tab. Rejection of both null hypothe-
ses implies bioequivalence. The Anderson-Hauck test statistic is t
AH
given by
where Diff SE is the standard error of the difference in means. Under the null
hypothesis, this test statistic has a noncentral t-distribution.
Power
Next in the output is the Power. This is the post-hoc probability of detecting a
difference greater than or equal to a specified percentage of the reference least
squares mean. In general,
In the bioequivalence calculations, the hypotheses being tested are:
For the no-transform case, the power is the probability of rejecting H
0
given
that:
Power = 1 (probability of a type II error)
= probability of rejecting H
0
when H
1
is true.
H
0
: RefLSM = TestLSM
H
1
: RefLSM TestLSM
|TestLSM RefLSM | fractionToDetect RefLSM
t
AH
Y
T
Y
R
L
U
+ ( ) 2
Diff SE
------------------------------------------------------- =
Bioequivalence
Average bioequivalence
429
16
For ln-transform, and data already ln-transformed, this changes to:
and similarly for log10-transform and data already log10-transformed.
For the sake of illustration, assume fractionToDetect = 0.2, RefLSM>0, and
no transform was done on the data. Also note that the maximum probability of
rejecting H
0
occurs in the case of equality, |TestLSM RefLSM| =
0.2RefLSM. So:
Let:
Then:
Note that t
stat
is T-distributed. Let p
1
be the p-value associated with t
1
(the
area in the tail), and let p
2
be the p-value associated with t
2
(the area in the
tail; note that p
2
may be negligible). Then:
|TestLSM RefLSM | ln (1 fractionToDetect),
Power = Pr (rejecting H
0
at the alpha level given |Difference| = 0.2RefLSM
= Pr (|Difference/DiffSE | > t
(1-alpha/2), df
given |Difference| = 0.2RefLSM
= Pr (Difference/DiffSE > t
(1-alpha/2),df
given |Difference| = 0.2RefLSM
+ Pr (Difference/DiffSE < t (
1-alpha/2),df
given |Difference| = 0.2RefLSM
t
1
= t
(1-alpha/2),df
0.2RefLSM / DiffSE
t
2
= t
(1-alpha/2),df
0.2RefLSM / DiffSE
t
stat
= (Difference 0.2RefLSM / DiffSE
Power = Pr(t
stat
> t
1
given |Difference| = 0.2RefLSM)
+ Pr(t
stat
< t
2
given |Difference| = 0.2RefLSM)
Power = 1 (p
1
p
2
)
WinNonlin
Users Guide
430
16
Individual and population bioequivalence
Introduction
Individual and population bioequivalence are used to assess switchability and
prescribability. Because individual bioequivalence relies on estimates of
within-subject, within-formulation variation, replicated crossover designs are
required. This algorithm was developed by Francis Hsuan. Designs that can
be appropriately analyzed include, but are not limited to,
The algorithm works for both balanced and unbalanced data.
Note: Each sequence must contain the same number of periods. For each period,
each subject must have one measurement.
Bioequivalence criterion
The FDAproposed population bioequivalence (PBE) criteria are
if
Sequence Period Design
2 4 TRTR/RTRT
4 4 TRTR/RTRT/TRRT/RTTR
4 2 TT/RR/TR/RT
4 3 TRT/RTR/TRR/RTT
2 5 TRRTT/RTTRR
3 3 TRR/RTR/RRT
2 3 RTR/TRT
6 3 TRR/RTT/TRT/RTR/TTR/RRT
2 4 TRRR/RTTT
6 4 TTRR/RRTT/TRRT/RTTR/TRRR/RTTT
E Y
jT
Y
j' R
( )
2
E Y
jR
Y
j' R
( )
2
1
2
---
E Y
jR
Y
j' R
( )
2
-------------------------------------------------------------------------
P
<
R
P
>
Bioequivalence
Individual and population bioequivalence
431
16
if
where
P
defaults to 0.2 and
P
= (ln(1 - PercentReference) +
P
) /
P
2
. The
default value for PercentReference is 0.20. In the wizard,
P
is called the
Total SD standard.
R
2
is computed by the program and is the total variance of
the reference formulation, i.e., the sum of within- and between-subject vari-
ance. The criteria take the linearized form
The FDAproposed individual bioequivalence (IBE) criteria are
f
where
I
defaults to 0.2 and
I
= (ln(1 PercentReference) +
I
) /
I
2
. The
default value for Percent Reference is 0.20, and the default value for
I
is 0.05.
In the wizard,
P1
E
T
R
( )
2
T
2
1
P
+ ( )
R
2
+ 0 < =
R
P
>
P2
E
T
R
( )
2
T
2
R
2
P
P
2
+ 0 < =
R
P
E Y
jT
Y
j R
( )
2
E Y
jR
Y
j' R
( )
2
1
2
---
E Y
jR
Y
j' R
( )
2
------------------------------------------------------------------------
I
<
WR
I
>
E Y
jT
Y
j R
( )
2
E Y
jR
Y
j' R
( )
2
1
2
-- -
I
2
------------------------------------------------------------------------
I
<
WR
I
I1
E
T
R
( )
2
D
*
WT
2
1
I
+ ( )
WR
2
+ + 0 < =
WR
I
>
I2
E
T
R
( )
2
D
*
WT
2
WR
2
I
I
2
+ + 0 < =
WinNonlin
Users Guide
432
16
where will be defined below.
For reference scaling, use
P1
or
I1
. For constant scaling, use
P2
or
I2
. For
mixed scaling, use one of the following.
If the upper confidence bound on the appropriate is less than 0, then the
product is bioequivalent in the chosen sense. The coverage of the confidence
interval is set on the Bioequivalence Options page. The method of calculating
that upper confidence bound follows.
Details of computations
Let Y
ijkt
be the response of subject j in sequence i at time t with treatment k,
and be a vector of responses for subject j in sequence i. The components
of Y are arranged in the ascending order of time. Let and be the
design vector for treatment T and R respectively in sequence i, n
i
> 1, be the
number of subjects in sequence i.
Assume the mean responses of , follow a linear model
where
T
,
R
are the population mean responses of Y with treatments T and R
respectively, and X
i
are design/model matrices.
Let p
iT
:= sum( ) and p
iR
:= sum( ) be the number of occasions T and R
respectively be assigned to the subjects in sequence i,
,
if
Population If
R
>
P
use
P1
If
R
P
use
P2
Individual If
WR
>
I
use
I1
If
WR
I
use
I2
(1a)
WR
I
D
*
Y
i j
'
Z
i T
Z
i R
Y
i j
i
Z
iT
T
Z
i R
R
+ =
Z
i T
Z
i R
u
i T
: p
i T
1
Z
i T
=
Bioequivalence
Individual and population bioequivalence
433
16
,
,
and .
Assume that the covariances follow the model
where the parameters
are defined as follows:
and are var and var
respectively,
is the intra-subject correlation coefficient corr ,
is the intra-subject correlation coefficient corr,
,
is the intra-subject coefficient corr ,
, , and are the intra-
subject covariances,
is the intra-subject variance , and
is the intra-subject variance .
For PBE and IBE investigations, it is useful to define several additional
parameters:
(1b)
u
i R
: p
i R
1
Z
iR
=
u
i I
: u
i T
u
i R
( ) =
d
i
: s
T
1
u
i T
s
R
1
u
iR
=
Y
i jkt
Y
ij k' t'
( , )
i
WT
2
diag Z
iT
( )
WR
2
diag Z
iR
( )
TT
Z
i T
Z'
i T
RR
Z
iR
Z'
i R
TR
Z
iT
Z'
iR
Z
i R
Z'
iT
+ { }
+ +
+ +
=
WT
2
WR
2
TT
RR
TR
, , , { , } =
T
2
TT
WT
2
+ =
R
2
RR
WR
2
+ = Y
i j Tt
( )
Y
i j Rt
( )
TT
TT
T
2
= Y
T
Y
T'
( , )
1
TT
0 > >
RR
RR
R
2
=
Y
R
Y
R'
( , ) 1
RR
0 > >
TR
TR
T
R
( ) = Y
T
Y
R
( , )
1
TR
1 > >
TT
TT
T
2
=
RR
RR
R
2
=
TR
TR
R
=
WT
2
T
2
TT
= Y
T
Y
T'
( ) 2
WR
2
R
2
RR
= Y
R
Y
R'
( ) 2
WinNonlin
Users Guide
434
16
Except for (2a), all the quantities above are non-negative when they exist. The
quantity is similar, but not identical, to the subject-by-formulation variance
component proposed in the mixed model discussed in FDA draft guidance
Section III. It satisfies the equation
In general, this may be negative, while FDAs is always non-nega-
tive. The FDA mixed model is a special case of the multivariate model above,
and the quantity is identical to whenever the former is nonnegative.
This method for PBE/IBE is based on the multivariate model. It yields identi-
cal results to those described in the FDA draft guidance Appendices F & H
when the design is TRTR/RTRT. This method is applicable to a variety of
higher-order two-treatment crossover designs including TR/RT/TT/RR (the
Balaam Design), TRT/RTR, or TxRR/xRTT/RTxx/TRxx/xTRR/RxTT (Table 5.7
of Jones and Kenward, page 205).
Given the ith sequence, let
, ,
(2a)
(2b)
(2c)
(2d)
D
*
TT
RR
2
TR
+ =
i T
*2
T
2
1 p
iT
1
( )
WT
2
( ) =
i R
*2
R
2
1 p
i R
1
( )
WR
2
( ) =
i I
*2
D
*
p
i T
1
WT
2
p
iR
1
WR
2
+ + ( ) =
var Y
i jT
Y
i j R
( )
D
*
WT
2
WR
2
+ + =
D
*
D
2
D
*
D
2
d'
i
Y
i
i
=
S
i T
u'
i T
V
i
u
i T
= S
i R
u'
iR
V
i
u
i R
= S
i I
u'
i I
V
i
u
i I
=
S
iWT
1 p
iT
1
( )
1
tr diag u
i T
( )V
i
{ } u'
i T
V
i
u
iT
( ) =
S
iWR
1 p
iR
1
( )
1
tr diag u
iR
( )V
i
{ } u'
i R
V
i
u
iR
( ) =
Bioequivalence
Individual and population bioequivalence
435
16
where is the sample mean of the ith sequence, and V
i
is the within-
sequence sample covariance matrix.
It can be shown that
Furthermore, it can be shown that {S
iT
, S
iR
} (for PBE) are statistically inde-
pendent from {} and {S
iWT
, S
iWR
}, and that the four statistics , S
iI
, S
iWT
,
S
iWR
(for IBE) are statistically independent.
Let
i
s be sets of normalized weights, chosen to yield the method of
moments estimates of the s. Then define the estimators of the components
of the linearized criterion by
(4a)
(4b)
(4c)
(4d)
(4e)
(4f)
,
,
,
,
,
Y
i
N
T
R
n
i
1
d'
i
d
i
i
( , )
S
i T
iT
*2
n
i
1 ( )
1
2
n
i
1
S
i R
i R
*2
n
i
1 ( )
1
2
n
i
1
S
i I
i I
*2
n
i
1 ( )
1
2
n
i
1
S
i WT
WT
2
p
iT
1 ( )
1
n
i
1 ( )
1
2
p
iT
1 ( ) n
i
1 ( )
S
i WR
WR
2
p
i R
1 ( )
1
n
i
1 ( )
1
2
p
iT
1 ( ) n
i
1 ( )
E
0
2
=
E
P1
iT
S
i T
i
=
E
P2
1
i T
p
i T
1
i
\ .
|
| |
iWT
S
iWT
i
=
E
P3
i R
S
i R
i
=
E
P4
1
i R
p
i R
1
i
\ .
|
| |
iWR
S
i WR
i
=
WinNonlin
Users Guide
436
16
Using the above notation, one may define unbiased moment estimators for the
PBE criteria:
and for the IBE criteria:
The FDA Guidance specifies a procedure to construct a 95% upper bound for
based on the TRTR/RTRT design using Howes approximation I and a mod-
ification proposed by Hyslop, Hsuan and Holder (2000). This can be gener-
alized to compute the following sets of n
q
, H and U statistics:
,
,
,
,
E
I1
i I
S
iI
i
=
E
I2
1
i I
p
i T
1
i
\ .
|
| |
i WT
S
i WT
i
=
E
I3a
1
I
i I
p
i R
1
i
+ +
\ .
|
| |
i WR
S
i WR
i
=
E
I3b
1
i I
p
i R
1
i
+
\ .
|
| |
i WR
S
i WR
i
P1
2
E
P1
E
P2
1
P
+ ( )E
P3
1
P
+ ( )E
P4
+ + =
P2
2
E
P1
E
P2
E
P3
E
P4
P
P
2
+ + =
I1
2
E
I1
E
I2
E
I3a
+ + =
I2
2
E
I1
E
I2
E
I3b
I
I
2
+ + =
H
0
t
.95, n
0
var
( ) ( )
1 2
+
\ .
| |
2
=
Bioequivalence
Bioequivalence Wizard
437
16
where the degrees of freedom n
q
are computed using Satterthwaites approxi-
mation. Then, the 95% upper bound for each is
,
where for q = P3, P4, and = U
q
for all other q. If H
q
< 0, that indicates bioequivalence; H
q
> 0 fails to show bioequivalence.
Bioequivalence Wizard
To set up and run a bioequivalence analysis:
1. Open the data set to be analyzed.
2. Start the Bioequivalence Wizard by choosing Tools>Bioequivalence Wizard
or by clicking on the Bioequivalence Wizard tool bar button.
for q = P1, P2, I1 and I2.
for q = P3, P4, I3a and I3b.
for all q
H
q
n
q
E
q
.05, n
q
2
=
H
q
n
q
E
q
.95,
2
n
q
=
U
q
H
q
E
q
( )
2
=
H
U
q
*
\ .
| |
1 2
+ =
U
q
*
1
P
+ ( )
2
U
q
= U
q
*
WinNonlin
Users Guide
438
16
3. The Bioequivalence Wizard provides two options for using prior model set-
tings (optional), as follows. To create a new analysis, proceed to step 4 below.
To load a previously-saved bioequivalence model, click the Load button.
To reload the most recently run model, click the Previous Model button.
Click Calculate to run the model.
4. Type of Bioequivalence: Select individual/population or average bioequiva-
lence using the radio buttons at the upper right. For a discussion of the analy-
sis types, see Average bioequivalence on page 420 and Individual and
population bioequivalence on page 430.
5. For average bioequivalence, select the study type at the top left.
Based on the analysis and study types, WinNonlin will try to match the vari-
able names from the active data set with the Subject, Sequence, Period, and
Formulation fields.
6. If WinNonlin has not already selected the appropriate variables, select the
variables that identify the Subject, Sequence, Period, and Formulation.
7. Select the reference formulation, against which to test for bioequivalence,
from the pull down list labeled Reference Value.
Note: For Average bioequivalence with a parallel study type, only Formulation and
its reference value need to be specified.
8. Click Next to proceed with the analysis:
Using average bioequivalence on page 438
Using population/individual bioequivalence on page 444
Using average bioequivalence
See the Examples Guide for an example using average bioequivalence.
Average bioequivalence analysis settings fall under the following headings:
Fixed effects for average bioequivalence on page 439
Variance structure on page 440
Bioequivalence options on page 443
Bioequivalence
Bioequivalence Wizard
439
16
Bioequivalence general options on page 443
Fixed effects for average bioequivalence
The dependent variable(s), regressor(s)/covariate(s), and sort variable(s) must
be specified. For Average bioequivalence other classification variables can be
added by dragging them from the Variable Collection to the Classification
Variable field. The Bioequivalence Wizard Fixed Effects dialog works very
much like the LinMix Fixed Effects dialog. See Fixed effects on page 391.
To define the fixed effects model:
1. Drag and drop variables to categorize those needed in the LinMix model:
Dependent variables contain the values to which the model will be fit,
e.g., drug concentration.
Classification variables or factors are categorical independent variables,
e.g., formulation, treatment, and gender.
Regressor variables or covariates are continuous independent variables,
e.g., temperature or body weight.
Sort variables define subsets of data to be processed separately, that is, a
separate analysis will be done for each level of the sort variables. If the
Sort variable has missing values, the analysis will be performed for the
missing level and MISSING will be printed as the current value of the
Sort variable.
A weight variable can be included if weights for each record are included
in a separate data column. The weights are used to compensate for obser-
vations having different variances. When a weight variable is specified,
each row of data is multiplied by the square root of the corresponding
weight. Weight variable values should be proportional to the reciprocals
of the variances. In the most common situation, the data are averages and
weights are sample sizes associated with the averages. See also Weight-
ing on page 325.
The Weight Variable cannot be a classification variable. It must
have been declared as a regressor/covariate before it can be used
as a weight variable. It can also be used in the model.
WinNonlin
Users Guide
440
16
For Average bioequivalence the Model Specification field automatically dis-
plays an appropriate fixed effects model for study type. Edit the model as
needed For discussion of the model, see The model on page 420.
Note: To reuse a model in a command file (*.LML), click the Load Model button. To
reuse the most recently run model, click the Previous Model button.
2. Accept the default setting [95] or enter the Fixed Effects Confidence Level.
This is the confidence level for the parameter estimates. The confidence level
for the bioequivalence test is specified later.
3. (Optional) Select a log transformation from the pull down list for Dependent
Variables Transformation. Select Ln(x) or Log(x) to transform the values
before analysis. If the input data are already transformed, select Already Ln-
transformed or Already Log10-transformed.
4. Click Calculate to run the model with default settings, or Next to proceed to
the Variance structure.
Variance structure
The Bioequivalence Wizard Variance Structure dialog operates exactly as it
does in the LinMix wizard. See also Variance structure on page 393.
Bioequivalence
Bioequivalence Wizard
441
16
The Random tab
1. The classification variables and regressors are displayed in the fields at the
top of the dialog. Drag and drop them (or type them) to edit the random
effects model(s) as needed.
2. (Optional) Drag the appropriate variable to the Variance Blocking Variables
(Subject) field. The variable here must be a classification model term. This
field identifies the subjects in a data set. Complete independence is assumed
among subjects. Thus, Subject produces a block diagonal structure with iden-
tical blocks.
3. (Optional) Drag the appropriate variable to the Group field. This variable
must be a classification model term. It defines an effect specifying heteroge-
neity in the covariance structure. All observations having the same level of the
group effect have the same covariance parameters. Each new level of the
group effect produces a new set of covariance parameters with the same struc-
ture as the original group.
4. If a random effects model is specified, select the type of covariance structure
in the Type list. See Variance structure on page 393 for details on each type.
5. Check Random Intercept to indicate that the intercept is random. This is
most commonly employed when a subject is specified in the Variance Block-
ing field. The default is offno random intercept.
WinNonlin
Users Guide
442
16
Note: Multiple variance models can be specified by clicking the Add Random but-
ton.
The Repeated tab
Select the Repeated tab to specify the R matrix in the mixed model. If no
Repeated statement is specified, R is assumed to be equal to . The
repeated effect must contain only classification variables. See The Repeated
tab on page 396.
To specify the repeated variance settings:
1. In the box labeled Repeated Specification, either enter the model by typing it
or by dragging the variable names and clicking on the operators to be used in
the model. For Average bioequivalence a default model is preset.
The model can be built from the classification variables and the operators at
the top of the dialog. Syntax rules for the repeated specification are the same
as those for the fixedeffects model terms.
2. (Optional) Drag the appropriate variable to the Variance Blocking Variables
(Subject) field. The variable here must be a classification model term. This
Subject field identifies the subjects in a data set. Complete independence is
assumed across subjects. Thus, Subject produces a block diagonal structure
with identical blocks.
3. (Optional) Drag the appropriate variable to the Group field. The variable here
must be a classification variable with no regressors or operators. This variable
defines an effect specifying heterogeneity in the covariance structure. All
observations having the same level of the group effect have the same covari-
ance parameters. Each new level of the group effect produces a new set of
covariance parameters with the same structure as the original group.
4. If a Repeated Specification has been included, select the type of covariance
structure from the Type list. Variance structure on page 393 for types.
Note: The default Repeated model depends upon whether the crossover study is rep-
licated or not. The default model follows the FDA guidance.
5. Click Calculate to run the analysis, or Next to proceed to the Bioequivalence
options.
2
I
Bioequivalence
Bioequivalence Wizard
443
16
Bioequivalence options
This dialog of the Bioequivalence Wizard sets the range for the bioequiva-
lence.
To set the bioequivalence options:
1. Set the following options (default settings for Average bioequivalence):
Confidence Level (90%)
Percent of Reference to Detect (20%)
Anderson-Hauck Lower Limit (0.8)
Anderson-Hauck Upper Limit (1.25 for log-transformed; 1.2 for not
transformed)
2. Click Calculate to run the analysis, or Next to proceed to the Bioequivalence
general options.
Bioequivalence general options
This dialog of the Bioequivalence Wizard sets the following operations:
ASCII output can be selected as an additional output form.
A title can be assigned as a header for the ASCII output. Press
Ctrl+Enter to move to the next line, up to a maximum of five lines.
The kind of degrees of freedom can be stipulated.
The maximum number of iterations can be set.
How output that is not estimable is to be represented may be set.
The advanced user options include:
Initial estimates for the Variance Parameters
Change defaults for Singularity Tolerance, Convergence Criterion,
and Intermediate Calculations.
When all the appropriate settings have been made, click the Calculate button
to run the model. The average bioequivalence calculations begin and the out-
put appears in a new workbook (and, depending upon the settings, an ASCII
text window as well).
WinNonlin
Users Guide
444
16
Using population/individual bioequivalence
Following is an overview of the basic steps in using the Bioequivalence Wiz-
ard for population/individual bioequivalence (see also Individual and popu-
lation bioequivalence on page 430). Depending upon the calculations
selected, some steps may be optional.
See the Examples Guide for an example using population/individual
bioequivalence.
To specify population/individual bioequivalence information:
1. Launch the Bioequivalence Wizard and set up the variables for the analysis as
described under Bioequivalence Wizard on page 437.
Note: Population/Individual bioequivalence can only use replicated crossover study
data. Each sequence must contain the same number of periods. For each
period each subject must have one measurement.
2. Click Calculate to run the model with the default settings, or Next to proceed
to the Fixed effects for population/individual bioequivalence.
Note: Use the Load Model button to load a previously-saved model. Use the Previ-
ous Model... button to reload the last-run model.
Fixed effects for population/individual bioequivalence
The Fixed effects model is prebuilt following FDA guidelines. The Bioequiv-
alence Wizard Fixed Effects dialog for population/individual bioequivalence
works very much like the LinMix Fixed Effects dialog. See Fixed effects on
page 391.
To complete the model:
1. Drag the appropriate term(s), e.g., concentration, from the Variable Collection
to the Dependent Variables field.
Appropriate terms for the kind of study are specified automatically as classifi-
cation variables. For Population bioequivalence the classification variables,
regressors, and fixed effects model are disabled because they are preset to
FDA guidelines.
Bioequivalence
Bioequivalence command files
445
16
2. (Optional) Select a log transformation from the pull down list for Dependent
Variables Transformation. Select Ln(x) or Log(x) to transform the values
before analysis. If the input data are already transformed, select Already Ln-
transformed or Already Log10-transformed.
3. Click Calculate to run the model, or Next to proceed to the Bioequivalence
options for population/individual bioequivalence.
Bioequivalence options for population/individual bioequivalence
To set the bioequivalence options:
1. The options (and their default settings for Population/Individual bioequiva-
lence) include:
Confidence Level (95%)
Percent of Reference to Detect (20%)
Population Limits
Total SD Standard (0.2)
Epsilon (0.02)
Individual Limits
Within Subject SD Standard (0.2)
Epsilon (0.05)
2. To start calculating Population/Individual bioequivalence, click Calculate.
Bioequivalence command files
Any data set and bioequivalence model can be saved as a bioequivalence
command file. This command file has a file type of .LML.
To save a bioequivalence command file:
1. With a data set open and the bioequivalence model specified in the Bioequiv-
alence Wizard, click the Save Model button. The Save Command File dialog
appears.
2. Enter the file name for the command file. Notice that the file type is already
specified as *.LML.
WinNonlin
Users Guide
446
16
3. Click Save. The command file has been saved.
To load a bioequivalence command file:
1. Select File>Open from the menus or click the Open tool bar button.
2. In the Open File dialog select LinMix Command Files (*.lml) in the Files of
type field.
3. Select the appropriate file.
Bioequivalence output
The Bioequivalence Wizard generates a new bioequivalence workbook. Popu-
lation/individual bioequivalence always generates text output as well. Aver-
age bioequivalence can produce text output as an option.
Average bioequivalence
The average bioequivalence output workbook contains the information in
Table 16-1.
Table 16-1. Average bioequivalence output worksheets
Worksheet Contents
Average Bioequivalence Output from the bioequivalence analysis
Ratio Tests Ratios of reference to test mean computed for each subject
Diagnostics Number of observations, number of observations used, residual
sums of squares, residual degrees of freedom, residual variance,
restricted log likelihood, AIC, SBC, and the Hessian eigenvalues
Sequential Tests Sort Variable(s), Dependent Variable(s), Units, Hypothesis,
Hypothesis degrees of freedom, Denominator degrees of free-
dom, F statistic, and p-value
Partial Tests Sort Variable(s), Dependent Variable(s), Units, Hypothesis,
Hypothesis degrees of freedom, Denominator degrees of free-
dom, F statistic, and p-value
Final Fixed Parameters Sort variables, dependent variable(s), units, effect level, parame-
ter estimate, t-statistic, p-value, confidence intervals, etc.
Bioequivalence
Bioequivalence output
447
16
To determine average bioequivalence of a test formulation and a reference
formulation the first step is the computation of the least squares means of the
test formulation and the reference formulation and their standard errors, and
computation of the standard error of the difference of the test and reference
least squares means and degrees of freedom for the difference. These quanti-
ties are computed by the same program that is used for the Linear Mixed
Effects module, LinMix. Therefore the output for average bioequivalence
includes all the output that was obtained by running LinMix. This output is
described in LinMix output on page 401. The output also contains the Aver-
age Bioequivalence Statistics; these are described in detail in Introduction to
bioequivalence on page 417. For crossover designs, the output also contains
the ratios table, described under Ratio tables on page 449.
Population/Individual bioequivalence
Final Variance Parame-
ters
Final estimates of the variance parameters
Parameter Key Variance parameter names assigned by WinNonlin
Least Squares Means Sort Variable(s), Dependent Variable(s), Units, and the least
squares means for the test formulation
LSM Differences Difference in least squares means
Residuals Sort Variable(s), Dependent Variable(s), Units, and information
on residual effects vs. predicted and observed effects
User Settings User-specified settings
Initial Variance Parame-
ters
Parameter and estimates for variance parameters
Iteration History Iteration, Obj_function, and column for each variance parameter
Table 16-2. Population/individual output worksheets
Worksheet Contents
Population/Individual
Bioequivalence
Output from the bioequivalence analysis
Ratio Tests Ratios of reference to test mean
User Settings User-specified settings
Table 16-1. Average bioequivalence output worksheets (continued)
Worksheet Contents
WinNonlin
Users Guide
448
16
Depending upon what settings have been specified in the wizard, the output
may not have all of these worksheets.
Errors and warnings in the computations are recorded in the ASCII output as
well as in the application log or data history.
The population/individual bioequivalence statistics are described further in
Introduction to bioequivalence on page 417. They include:
Difference (Delta) = difference in sample means between the test and refer-
ence formulations.
Ratio(%Ref) = ratio of the test to reference means expressed as a percent. This
is compared with the percent of reference to detect that was specified by the
user, to determine if bioequivalence has been shown. For example, if the user
specified a percent of reference to detect of 20%, and also specified a ln-trans-
form, then Ratio(%Ref) needs to be in the interval (80%, 125%) to show
bioequivalence for the ratio test.
Note: The FDA guidance suggests that both the ratio test and the tests listed below
need to be passed to indicate bioequivalence.
SigmaR - value that is compared with sigmaP, the Total SD Standard, to deter-
mine whether mixed scaling for population bioequivalence will use the con-
stant-scaling values or the reference-scaling values.
SigmaWR - value that is compared with sigmaI, the Within Subject SD Stan-
dard, to determine whether mixed scaling for individual bioequivalence will
use the constant-scaling values or the reference-scaling values.
Each of the following is given along with its upper confidence bound and a
conclusion about bioequivalence. Bioequivalence has been shown if the upper
confidence bound is less than 0.
Table 16-3. Population/Individual Bioequivalence Calculations
Statistic Indication
Const_Pop_eta Test statistic for population bioequivalence with constant scaling
Ref_Pop_eta Test statistic for population bioequivalence with reference scaling
Mixed_Pop_eta Test statistic for population bioequivalence with mixed scaling
Const_Indiv_eta Test statistic for individual bioequivalence with constant scaling
Bioequivalence
Bioequivalence output
449
16
For crossover designs, the output also contains the ratio tables, below.
Ratio tables
For any bioequivalence study done on a crossover design, the output also
includes for each test formulation a table of differences and ratios of the orig-
inal data computed individually for each subject. This is in response to the
FDA guidance Measures for each individual should be displayed in parallel
for the formulations tested. In particular, for each BE measure the ratio of the
individual geometric mean of the T product to the individual geometric mean
of the R product should be tabulated side by side for each subject.
Let test be the value of the dependent variable measured after administration
of the test formulation for one subject. Let ref be the corresponding value for
the reference formulation, for the case in which only one dependent variable
measurement is made. If multiple test or reference values exist for the same
subject, then let test be the mean of the values of the dependent variable mea-
sured after administration of the test formulation, and similarly for ref, except
for the cases of ln-transform and log10-transform where the geometric
mean should be used:
ln-transform:
log10-transform:
where X
i
are the measurements after administration of the test formulation,
and similarly for ref.
For each subject, for the cases of no transform, ln-transform, or log10-trans-
form, the ratios table contains:
Difference = test ref.
Ratio(%Ref) = 100 test / ref.
For data that was specified to be already ln-transformed, these values are
back-transformed to be in terms of the original data:
Ref_Indiv_eta Test statistic for individual bioequivalence with reference scaling
Mixed_Indiv_eta Test statistic for individual bioequivalence with mixed scaling
Table 16-3. Population/Individual Bioequivalence Calculations
Statistic Indication
test X
i
( ) ln N
i
\ .
|
| |
exp =
test 10
N
1
log
10
X
i
i
=
WinNonlin
Users Guide
450
16
Difference = exp(test) exp(ref).
Ratio(%Ref) = 100exp(test ref) = 100exp(test)/exp(ref)
Similarly, for data that was specified to be already log10-transformed:
Difference = 10
test
10
ref
Ratio(%Ref) = 10010
test ref
= 10010
test
/10
ref
Note: For data that was already transformed, if the mean of the values is used for
test or ref, and the antilog of test or ref is taken in the equations above, then
this is equal to the geometric mean.
Missing data
For population and individual bioequivalence, the program assumes complete
data and does not allow missing observations.
If a subject has a missing observation, then that subject is not included in the
analysis. If the data have a lot of missing observations, then one should con-
sider imputing estimated values to produce complete records per subject. This
program does not impute missing values.
451
Chapter 17
Simulation
Generating response values based on a model, a
set of time (X variable) values, and doses
WinNonlin simulations can use library models or user defined models to cal-
culate response values. This capability is especially useful, for example, in
simulating steady state responses from single dose data, comparing drug con-
centrations for different dosing regimens or for different values of model
parameters (such as absorption or elimination rates). Simulations are also use-
ful when writing custom models. Running a simulation of a model can
quickly uncover errors in the model specification.
Simulating responses
Simulation of output values requires a set of time or other X-variable values, a
model, parameter values for that model, and dosing constants (for some mod-
els). Simulations can use any compiled or ASCII model, including a user
model. The model, data variables, and dosing are set up as for model fitting,
as detailed under Compartmental Modeling on page 247, except that no Y
variable is specified, and the Simulate check box, in the Data Variables dialog,
must be checked. An example is provided below, to illustrate.
See the Examples Guide for an example using simulation to evaluate compet-
ing sampling schedules, and an example of simulation using a user-defined
ASCII model.
Simulation of a compiled library model
This example uses a compiled WinNonlin library model to illustrate the use of
simulation to generate multiple-dose concentrations based on parameters from
fitting single-dose data. Note that a compiled or ASCII model could be used.
WinNonlin
Users Guide
452
17
Creating the input data
Simulation requires a data set with X values defining the time points over
which to simulate Y variable values. This example uses a data set with times
ranging from 0 to 36 hours, in increments of 0.18 hours.
To create the time value data:
1. Select File>New from the WinNonlin menus.
2. In the resulting dialog box, select the Work-
book radio button and click OK. A new work-
book appears with two worksheets: the first, for
data, the second, an automatic record of the
data history.
3. Enter time values in the first column. To enter all of the times quickly; enter 0
in the first row, and =A1+.18 in cell A2. Next, highlight cell A2 and position
the cursor over the lower right hand corner of the cell until the cursor changes
into a small black cross. Hold the left mouse button down, and drag down to
Row 201 before releasing the mouse button. The formula will be copied to all
of these cells, incrementing the time value by 0.18 in each row.
4. Use Data>Column Properties in the menus, or double-click on the column
header, to name Column A: Time.
Simulation
Simulation of a compiled library model
453
17
Setting up the model
The kinetics will be modeled by a two-compartment open model with first-
order input, Model 11 from WinNonlin's compiled pharmacokinetic library.
When simulating, the process of selecting the model (a compiled model or an
ASCII model) is exactly the same as it would be when modeling.
To select the PK model:
1. Choose Tools>PK/PD/NCA Analysis Wizard from the menus or click the
PK/PD/NCA Analysis Wizard tool bar button.
2. Select Pharmacokinetic in the Model Types dialog, and confirm that the
Compiled check box is selected.
WinNonlin
Users Guide
454
17
3. Click Next.
4. Select Model 11.
5. Click Next.
6. Click Finish to load the model.
Data variables
The Simulate Data check box in the Data Variables dialog selects simulation
rather than model fitting. The time variable must be identified.
To set model variables:
1. Choose Model>Data Variables from the menus.
2. Drag Time to the X Variable box.
3. Check the Simulate Data check box.
Simulation
Simulation of a compiled library model
455
17
4. Click OK.
Model parameters
The simulation requires parameter values for the model. The will be treated as
constants in order to calculate output values.
To enter parameter values:
1. Select Model>Model Parameters from the menus.
2. Enter the parameter values into the grid as shown below.
V_F: 10 K01: 5
WinNonlin
Users Guide
456
17
3. Click OK.
Dosing regimen
This example will dose 150 mg every 24 hours.
To enter the dosing information:
1. Choose Model>Dosing Regimen from the menus.
2. Enter the values shown in the table below.
3. Enter mg in the Current Units field.
K10: 0.2 K12: 1.5
K21: 1
Dosing Constant Value
Number of doses 2
Dose #1 150
Time of dose #1 0
Dose #2 150
Time of dose #2 24
Simulation
Simulation of a compiled library model
457
17
4. Click OK.
Model options
To specify model options:
1. Click the Model Options tool bar button or choose Model>Model Options
from the menus.
2. Select the PK Settings tab, and uncheck the Transpose Final Parameter
Table check box.
WinNonlin
Users Guide
458
17
3. Click OK.
Running the simulation
To start the simulation:
1. Click the Start Modeling button or choose Model>Start Modeling from the
menus. The simulated data appear in new output windows. The simulated
response data appear in the Summary Table worksheet of the PK Workbook,
and in the PK Chart output.
Figure 17-1. The PK workbook, Summary Table
The Variation Inflation Factor (VIF) is useful in determining optimal sam-
pling schedules for parameter estimation. Lower VIF values indicate better
estimates. See the Examples Guide for an example using WinNonlin simula-
tions for study design.
Figure 17-2. The PK chart output
Simulation
Comparing dosing schemes
459
17
Comparing dosing schemes
Simulations provide an easy and powerful means for modifying a scenario to
see the impact on drug concentrations or effects. For example, modify the pre-
vious simulation, keeping the total daily dose of 150, but this time administer-
ing 75 mg every 12 hours.
After the previous simulation (Simulation of a compiled library model on
page 451) is run, WinNonlin remembers the values input for the Data Vari-
ables, Model Parameters, and Dosing Regimen. Only the Dosing Regimen
needs to be edited.
Dosing regimen
For this new simulation, use doses of 75 mg at hour 0, hour 12, and hour 24.
To enter dosing information:
1. Select Model>Dosing Regimen from the menus.
2. Enter the new doses.
3. Click OK.
4. Choose Model>Start Modeling to re-run the simulation. The plot of the sim-
ulated data for the is shown here:
WinNonlin
Users Guide
460
17
Figure 17-3. The output plot from the revised simulation
461
Chapter 18
Using the Pharsight
Knowledgebase Server
Data access in a secure environment
The Pharsight Knowledgebase Server (PKS) is a database system for the stor-
age of pharmacokinetic and pharmacodynamic data. The PKS provides a
secure data management system with complete auditing capabilities. The
combination of the PKS and WinNonlin Enterprise provides an effective
means to share source data, models, and results among the members of a drug
development team. The combination also supports compliance with the U.S.
Food and Drug Administrationss 21 CFR Part 11 regulation.
This chapter covers the use of WinNonlin as a PKS client: loading PKS data
to WinNonlin and saving data from WinNonlin as PKS studies and scenarios.
The PKS can also be accessed by way of a web interface, which provides
means for additional operations, and an XML API. These functions and oper-
ations are covered in the Pharsight Knowledgebase Servers documentation.
See also Scripting the Pharsight Knowledgebase Server on page 512 and
Automating Pharsight Knowledgebase Server functions on page 545.
The PKS information structure
WinNonlin is an object (text, chart, model, data) based application. Those
objects fit into specific niches in the PKS data structure. PKS saves observa-
tions and related data as a PKS Study. Analysis settings and output are added
to the study as Scenarios. Non-WinNonlin documents, such as reports and
graphics that are related to the study, can be loaded into the PKS and associ-
ated with a scenario using the Other documents feature.
Study
The basic unit of information in the PKS is a study. A study starts with a col-
lection of raw data that must include longitudinal observations, observation
WinNonlin
Users Guide
462
18
times and subject identifiers, and may include dosing and subject demograph-
ics. As analyses are performed on these data, the analyses, including model
settings and results, can be added as Scenario(s) within the study.
A PKS study requires specific fields. First, a study must include at least one
column containing subject identifiers. A collection of fields taken together
can be used for subject identification (e.g., first name, last name).
A study may include (but is not required to have) multiple columns of subject
datatime-invariant, subject-specific information such as body weight or
gender, i.e., baseline covariates.
A study may include time-dependent observation and dosing data. Observa-
tion data may include records of concentration, measurements of blood pres-
sure, heart rate, etc. As the PKS manuals explain, each data collection point
can have multiple observations. In this case, a sampling variable is used to
differentiate the samples.
If the observation data include multiple, concurrent measurements for any
subject (e.g., multiple assays performed on a given sample or multiple sam-
ples during a given visit), the data set must include a variable that differenti-
ates the measurements (e.g., values 1, 2, 3 for the 1
st
, 2
nd
and 3
rd
samples).
Time fields
Because a study generally includes time-dependent observation data, a study
must include relative nominal time, indicating the times at which observations
(and doses, if included) were scheduled in the protocol. This is in contrast to
relative actual time, representing the times that observations or doses really
happened. (Relative time is time elapsed since the start of the study, period or
phase.) If the data uses infusion dosing, the relative nominal end time must be
identified as well. If only the Relative Nominal Time is defined in the data set,
a duplicate column will be created for the actual times.
Note: To create a study that does include longitudinal observation data, include a
dummy time column, with values for each row (as placeholders), in the study.
Study metadata
When a study is created, information about the study can be entered in the
Study Definition dialog (see below). This dialog includes information about
the study: Study Name, Portfolio, Project, Indication, Study Type, Study
Using the Pharsight Knowledgebase Server
PKS sessions
463
18
Design, Compound, etc. This metadata provides ways to search and filter the
data within the database. The metadata are saved with the study. See Creat-
ing a study or scenario on page 467 and Loading a study or scenario on
page 475.
Scenario
When WinNonlin analysis is performed on a PKS study, the combination of
data, model, and (optional) results data can then be saved in the PKS as a sce-
nario of the original study. A scenario can include a structural model, initial
parameters, and/or statistical tests to be applied to a particular data set for fit-
ting or analysis, as well as any derived output from those tests or analysis.
Scenarios are roughly comparable to the WinNonlin concept of a workspace
in that it is possible to save, in one place and under one name, related work
the data source, a model with model parameters, dosing, other model settings,
and the analytical output. Scenarios are naturally associated with (i.e., are
children of) a particular data set (study), although it is possible to create fur-
ther scenarios from the study (more children) or from an existing scenario
(grandchildren, etc.). See also Creating scenarios on page 477.
Other documents
The PKS can store documents that are not related to WinNonlin, such as study
reports, or a graphic created by saving a WinNonlin chart to a JPEG file.
These documents are associated with a specific study scenario. See Adding
non-WinNonlin documents to a scenario on page 479 for instructions.
PKS sessions
The Enterprise edition of WinNonlin has a concept of a PKS session. A PKS
session begins whenever WinNonlin retrieves and uses data from the PKS.
While the link between WinNonlin and the PKS is not constant, WinNonlin
knows the data came from the PKS and tracks all changes to the source data
so that if data are saved to PKS (whether to an existing study or scenario or to
a new one), the changes can be completely tracked and documented.
Accessing the PKS from WinNonlin
Access to the Pharsight Knowledgebase Server occurs via the PKS menu in
WinNonlin Enterprise. The menu items include:
WinNonlin
Users Guide
464
18
Note: A system administrator should set up and configure the PKS connection. See
the documentation set for the PKS for information.
Dosing
Dosing information can be, but need not be, saved as part of a PKS study.
Dose data can be added as part of study creation, using a separate worksheet
containing the dose data; appended after study creation; or entered as part of a
modeling scenario, using the WinNonlin Dosing dialog. If multiple scenarios
are included in a study, each may use different dose data. See Dosing infor-
mation on page 483 for details.
Table 18-1. PKS menu
Menu item Used when Function
Load Always Creates a PKS session and loads study/sce-
nario data
Save A PKS session is open
(study is loaded)
Saves changes to the study and creates a
new version of the current scenario, if any
Save As A PKS study and scenario
are loaded
Saves changes and creates a new scenario
under the specified name
Create
Study
No PKS session is open
and a workbook is loaded
in WinNonlin
Opens the mapping wizard, to set up a new
PKS study based on the current workbook
Append/
Update
Study
No PKS session is open
and a workbook is loaded
in WinNonlin
Opens the mapping wizard, so that new data
columns can be added to a PKS study
Dosing A PKS session is open
(study is loaded)
Sets dosing worksheet columns to be used
in the current model or analysis (scenario)
Other
documents
A PKS session is open
(study is loaded)
Saves a non-WinNonlin document or file to
the PKS, with the current scenario
Information A PKS session is open Displays the PKS study identifier and sce-
nario identifier, if one is loaded
Using the Pharsight Knowledgebase Server
Connecting to the PKS
465
18
Dosing workbook
It is possible to include dosing data when creating a study in the PKS. The
dosing information must appear in a different worksheet from that containing
the study observation data. That worksheet is selected as the dose source dur-
ing study creation, and its variables are assigned as part of mapping the study
variables (see Creating a study or scenario on page 467). It must contain, at
minimum, subject identifiers, dose amounts, and relative nominal dose times.
The columns representing subject identifiers and nominal time must be named
exactly as the corresponding columns are in the workbook containing the
observation data. The PKS will use those columns to match observation data
to dose data for given subject(s).
Dosing dialog
When a PKS study or scenario with no dosing data is loaded in WinNonlin,
and a model is selected, then dosing data can be entered via the WinNonlin
dosing dialog. This dosing information is transferred to the study Dosing
worksheet, inside the study data workbook, after the scenario is saved to the
PKS with model, model parameters and dosing information. Once the Dosing
information appears on the Dosing worksheet, the dosing information also
appears in the Dosing tab of the Model Properties dialog in WinNonlin, but it
is disabled (and colored blue). Thereafter, any changes to the dosing then
must be done on the Dosing worksheet rather than through the WinNonlin
dosing tab. The WinNonlin dosing dialog can still be used for simulations and
for user models.
Connecting to the PKS
Configuration
The PKS configuration must be set up before WinNonlin can contact the PKS.
The configuration settings are accessed from the PKS Logon dialog. This
information needs to be entered once only; WinNonlin will save it.
To configure the PKS connection:
1. Select any available item in the PKS menu to open the PKS Logon dialog. For
example, choose PKS>Load...
WinNonlin
Users Guide
466
18
2. Click the Configure button.
3. Enter a name describing the PKS database under PKS Alias. This will be used
to select a specific PKS database instance when logging in, as more than one
PKS database may be available on the local network. For example, many sites
have one production database and one example database, used to run exam-
ples from Pharsight Examples Guide.
4. Enter the PKS server machine name under Server. Similarly, enter the port
number under Port, and root directory for the PKS database under Root.
Note: The system administrator who set up the PKS database should provide the
values for the server, port and root.
5. Click OK.
Logging in
User name and password
Each time data are loaded to or from the PKS, the user must log in and pro-
vide a password. The log in user name and password are provided by the PKS
system administrator, who must set up an account for each individual user
before that user can access the PKS (see the PKS System Administrators
Guide for details).
Using the Pharsight Knowledgebase Server
Creating a study or scenario
467
18
Creating a study or scenario
Studies are the fundamental unit for the PKS. See Study on page 461.
Note: If a model is loaded, dose data are loaded directly from the model, and neednt
be specified by hand.
To create a study:
1. Load the desired observation data into a WinNonlin workbook window. If
dosing and/or demographics worksheets are to be loaded, open those work-
books as well. Note that dosing must be in a separate workbook, but demo-
graphic data can be loaded from the same workbook as the observations.
2. Choose PKS>Create Study from the WinNonlin menus.
If logging in for the first time, set up the PKS configuration. See Configura-
tion on page 465.
3. Enter the user name and password supplied by the system administrator. Note
that these are not necessarily the same user name and password used to log
onto the Windows operating system.
4. Select the desired PKS database under PKS Alias.
5. Click OK.
WinNonlin will contact the PKS and open the Study Definition dialog.
WinNonlin
Users Guide
468
18
6. Enter the following information.
Name: Study names must be unique in the PKS database. Since the con-
nection to the database is not persistent, the interface can only check a
study name that exists at the time any individual logs on to the PKS.
Start and End Time: enter the study start and end dates in one of the fol-
lowing formats:
Month day, year, for example: May 5, 2002
mm/dd/yyyy, for example: 05/05/2002
Description: any important information about the study.
Portfolio, Project, etc.: These attributes (study metadata) take values from
controlled lists created by the database administrator. They are useful in
searches of the database for studies on a given compound, indication, etc.
See your database administrator for local rules for setting study metadata.
7. Click OK.
The Study Creation Wizard appears.
Using the Pharsight Knowledgebase Server
Creating a study or scenario
469
18
8. Select the worksheet for the observation data under Observation Worksheet.
9. Select worksheets for dosing and demographics (optional). The dosing data
must be in a separate worksheet from the observation data. It must contain the
same subject identifiers, time fields, and indicators of period, phase,
sequence, etc. (data collection point identifiers), as the observations data set.
Note: The Save button saves all study creation settings, including file paths/names
and variable mappings, as an XML file with a *.PKS file extension. The Load
button reloads the settings from that file.
10. Click Next.
11. Drag the variable(s) that identify subjects to the PK Fields box. The identifier
can include one (e.g., subject ID) or more (e.g., first, last name) columns.
12. Use the Attributes button to set units for the subject ID variable(s), if needed.
WinNonlin
Users Guide
470
18
Note: If dosing and/or demographics worksheets are used, only columns that appear
in all worksheets, named identically, will appear in the Subject identifiers list.
13. Click Next to proceed to the Map Subject Data step.
14. Drag columns that contain subject demographics (baseline covariates) to the
PKS Fields box. These must have time-invariant, subject-specific values.
Note: Improper variable mappings can negatively impact the speed of operations in
the PKS. In particular, mapping subject-specific data as observations slows
performance, as observations include one record for every data collection
point in the study, rather than one record per subject. See Performance Tips
in the PKS System Administrators Guide. See also Optimizing PKS/WNL
performance on page 480.
15. To enter a different name for a column, to be used in the PKS study, select that
column under PKS Fields and click the Rename button. The name may
include up to 50 characters, and must follow WinNonlin column name limits.
16. If units already exist for a given column in the WinNonlin worksheet, those
units are loaded to the PKS.To view them, or to assign units to a column:
a. Select the variable under PKS Fields and click the Attributes button.
b. To load units for each record from a column in the data set, drag that col-
umn to the Unit field.
c. To set one unit for an entire column, check Static and enter or select the
unit under Unit. Time units must come from a fixed, controlled list. Other
Using the Pharsight Knowledgebase Server
Creating a study or scenario
471
18
units can be any string, although if the unit is not defined in the PKS, unit
conversions will not be available for it.
d. Click the Hide button to exit the Attributes dialog.
17. Click Next.
18. In the Map Time Data section, drag the variable containing scheduled times to
the Relative Nominal Time field.
19. Set other time variables (optional). Note that infusion dosing requires Relative
Actual End Time. See Time fields on page 462 for a discussion of the PKS
time variables. All time variables must exist in both the observations work-
sheet and the dosing worksheet, if included. The time fields must have identi-
cal names.
20. Set the time units: either choose a column containing the units for each record
under Time Unit, or check Static and enter the unit under Time Unit. See your
system administrator for a list of allowed units.
21. Click Next to proceed to the observation data mapping.
WinNonlin
Users Guide
472
18
22. Drag each column containing sample data to the PKS Fields box.
23. If the data include multiple, concurrent measurements for any given subject,
drag the variable that differentiates the measurements to the Sample Number
box. See Study on page 461 for further detail.
24. Select a variable under PKS Fields and click the Attributes button to edit the
information about that observation.
a. The following attributes can be associated with observation data. Each
can take one value for an entire column, or a unique value for each cell
(from a column in the data set).
Unit: units of measurement.
Status: indicates whether the data are (or a datum is) below a limit of
quantification (BQL), or missing for a specific reason, e.g., dropout
or non-adherence. Valid observation values are finite.
Using the Pharsight Knowledgebase Server
Creating a study or scenario
473
18
Analytical Methods: assay or technique used to obtain the sample
data.
Sample Description: further information about the sample.
LLOQ: lower limit of quantification for the assay. A number value.
ULOQ: upper limit of quantification for the assay. A number value.
b. If units already exist for a given column in the WinNonlin worksheet,
those units are loaded to the PKS.
c. To load unit (or another attributes) values, for each record from a column
in the data set, drag that column to the appropriate field.
d. To set one attribute value for an entire column, check Static and enter or
select the value in the appropriate list. Status values are defined in the
PKS using the web administrators tool.
e. Click the Hide button to exit the Attributes dialog.
25. Click Next to proceed.
26. If a dosing worksheet is used, the Map Dosing Data screen appears. Drag the
columns containing dose amounts to the PKS Fields box.
27. Select a dose variable under PKS Fields and click the Attributes button to set
units and other dose attributes, as needed. Check Static if one attribute value
applies to the whole column.
WinNonlin
Users Guide
474
18
Note: Additional information on data types, required fields, and attribute values can
be found in the PKS documentation set.
28. Click Next to continue to the Data Collection Point (DCP) screen.
29. Drag variables representing the study period (required for crossover designs
only), phase (optional) and treatment (e.g., placebo versus 10 mg BID) to
those boxes.
30. Use the DCP Description (Data Collection Point description) field for vari-
ables that distinguish different measurements stored a single observation col-
umn, for example, an indicator variable noting whether a given record
contains a measurement of plasma concentration or pain score.
Using the Pharsight Knowledgebase Server
Loading a study or scenario
475
18
31. Use the Preview button to review the variable mappings, and the Back button
to make any adjustments.
32. Click Finish when the variable mappings are complete.
33. The Study Creation dialog appears, providing an opportunity to document the
reason for creating the named study. The study name cannot be changed in
this dialog. If the study does not need to be reloaded from the PKS back to
WinNonlin for modeling or other further work, uncheck the Reload Study
check box.
34. When all necessary data has been entered, click Next to save the PKS study.
35. Once all data are successfully loaded to the PKS, a confirmation of the study
creation will display. Click OK.
Loading a study or scenario
To load a PKS study into WinNonlin:
1. Launch WinNonlin, if needed. Do not leave any windows open in WinNonlin;
the PKS will close them before loading any study.
2. Choose PKS>Load... from the WinNonlin menus.
If logging in for the first time, set up the PKS configuration. See Configura-
tion on page 465.
WinNonlin
Users Guide
476
18
3. Enter the user name and password supplied by the system administrator under
User Name and Password. Note that these are not necessarily the same user
name and password used to log onto the Windows operating system.
4. Select the desired PKS database under PKS Alias.
5. Click OK.
WinNonlin will contact the PKS and load a tree view of available studies and
scenarios. The list is determined by the user access rights assigned by the sys-
tem administrator.
Note: A red scenario icon indicates that at least one derived output object is out of
sync with its source. A green scenario icon means that the study data have
changed since the scenario last loaded the study data.
6. Un-check the Read Only check box if any alterations or additions are to be
made to the study or scenario (as opposed to creating a new scenario).
7. Use the Search button to search by study attributes. See Scenario search
below.
8. Use the Preferences button to organize the study tree by study name, indica-
tion, compound, and/or portfolio. In addition, the preferences select whether
Using the Pharsight Knowledgebase Server
Creating scenarios
477
18
all scenarios will be displayed (All), or only the most-recent (Latest), that
is, the final leaf on each scenario branch in the study tree.
9. Select the study or scenario to load, and click OK. Other options in this dialog
are discussed below.
To display only the tree view pane in the dialog, select the Hide Description
check box. The right pane is then hidden.
The Read Only option at the bottom right corner allows users with write-
access to load unlocked studies in a read-only mode. This improves perfor-
mance significantly. Read Only is the default selection, since study data
updates are not the principal function of WinNonlin. Users can create scenar-
ios and perform analyses with read-only studies.
Scenario search
The Search button available while Loading a study or scenario allows a search
of available studies by study name, scenario name, and/or value of study
metadata, including portfolio, compound, and indication.
Creating scenarios
Scenarios can be derived from an existing study or another scenario.
To create a new scenario based on a specific model or analysis:
1. Load the study on which the analysis will be based into WinNonlin.
2. Load the model or analysis, including any related settings. This can include
dosing for models, if the study does not already contain dose data.
WinNonlin
Users Guide
478
18
3. If analysis results will be saved in the scenario, run the model or analysis.
4. Once the analysis is complete, choose PKS>Save from the menus.
5. Enter a scenario name and reason for the study (scenario) update. Both are
required.
6. Enter a scenario description (optional).
7. Click OK to create the new scenario. It will be saved with the original study.
To create a new scenario without loading a model or analysis:
1. Choose PKS>Load from the WinNonlin menus, and log in to the system.
2. Select (but do not load) a study or scenario in the Load dialog.
3. Click the New button. The Scenario Field Selection dialog appears.
4. Select the fields from the data set to use in the new scenario. Those already in
the Selected Fields list are required and cannot be removed.
5. Click OK.
Using the Pharsight Knowledgebase Server
Adding non-WinNonlin documents to a scenario
479
18
Adding non-WinNonlin documents to a scenario
Non-WinNonlin documents can be saved to the PKS as part of a scenario.
Other documents may include data sets from other analysis programs, such as
SAS, Microsoft Word reports created with the PKS Reporter, or graphics cre-
ated from WinNonlin charts, among others. Any file on the computer can be
attached to a scenario. PKS can display JPG files in the Web Administrator
interface. The PKS Client for Word and the PKS Client for Excel can view
XL and Word documents. Other documents can be attached, but may not be
viewable until extracted from the PKS, saved to disk, and viewed in an appro-
priate software program.
To load or save a non-WinNonlin document:
1. Load the scenario. See Loading a study or scenario on page 475.
2. Choose PKS>Other Documents from the WinNonlin menus to open the
Document Manager.
3. Use the Add button to save a file to the PKS, attached to the current scenario.
4. Select a document in the list and click the Extract button to save it to a hard
drive or network location.
5. Select a document and click the Delete button to remove it from the scenario.
6. Click OK when finished.
7. To commit modifications of the document manager list to the scenario in the
PKS, choose PKS>Save in the menus.
WinNonlin
Users Guide
480
18
Optimizing PKS/WNL performance
A number of issues impact the performance of operations between WinNonlin
and the PKS.
Read-only access
When loading data, WinNonlin and the PKS must do a significant amount of
work to track any changes to the study data. If the study data are loaded as
read-onlyallowing the user to analyze them in WinNonlin but not change
data values in the source datathe loading can be done much more quickly.
Note: The read-only check box on the PKS Load dialog applies to the study data and
not the scenario. All scenarios are, by their very nature, read-only. Only new
versions of scenarios can be created. Users must have system level rights and
right to the original study in order to create a new scenario.
Appropriate field mappings
Study data fields must be mapped to an appropriate data type when initially
loaded from the WinNonlin client into the PKS. The basic data types are (1)
Subject identifier, (2) Subject data, (3) Time (actual, nominal, and combina-
tions), or (4) Observation. Some data types (such as subject identifiers and
subject data) are constant across time, while others (observation data) vary.
When studies are loaded, the observation data are checked for any changes.
Thus, the more that data are mapped as observation data, the more they must
be checked when loaded and the slower the loading is.
Subject identifiers (up to five fields) uniquely identify a subject. While they
can be changed (corrected), they are not normally modified in the course of a
study and its analysis. Changes are captured in an audit.
Subject data (unlimited number of fields) are data related to a subject that
does not change over time. This data may also be called baseline covariates or
demographics.
Time data identify the nominal and actual time points for the observed data.
Nominal times are the dose and observation times designated in the study pro-
tocol. Actual time differs from nominal time when subject adherence to the
protocol schedule is imperfect.
Observation data (unlimited) include sample or dose data that change over
time for a given subject.
Using the Pharsight Knowledgebase Server
Optimizing PKS/WNL performance
481
18
In creating a study or scenario and loading/reloading, WinNonlin and the PKS
track any changes to the data. Make sure data that varies over time are
mapped as observation data while demographic data are mapped as subject
data. If baseline covariates are mapped as observations rather than subject
data, the loading/reloading process becomes much slower because those data
cells must be checked for changes.
Note: Mapping fields in the creation of a study is particularly important. Selecting
the correct data types can ensure performance is optimized. It is not possible
to change the data types in a study once it has been created.
Creation of a base scenario for a study
Loading a scenario is faster than loading a study. Therefore, to save time on
subsequent operations, create a base scenario that contains all the columns
that will be used for a set of scenarios on a study. All subsequent scenarios
should be derived from this base scenario. This allows WinNonlin to load the
study data in a more condensed format if read-only study data access is
selected.
Example:
1. Load the study from the PKS into WinNonlin. See Loading a study or
scenario on page 475.
2. Once the study is loaded, create a text object describing the base scenario
(File>New then Text).
3. Name the Text object by right clicking on it, and selecting Object
Name. Highlight the Text object in the list box and press F2. Give the
object a name (i.e., Scenario Description). Click OK.
4. Save the base scenario via PKS>Save.
5. An Update Reason dialog is displayed. Enter a scenario name for the base
scenario (i.e., Base Scenario). Enter a reason (i.e., Base Sce-
nario). Click Save.
6. The logon dialog appears. Enter the password and click OK.
7. File>Close All (it may take some time to close all since a bit of memory
is being freed up).
WinNonlin
Users Guide
482
18
8. Now all work can be done by loading the base scenario with read-only
access to the study; this will be much faster than loading the source study.
Modeling and other analysis can be done and saved as new scenarios
using PKS>Save As.
Note: Make sure that all dosing data are loaded into the study. Dosing data are con-
sidered part of the study and cannot be added after studies are loaded in read-
only mode.
Change tracking and audit information
If any changes are made to source data loaded from a PKS study or scenario,
and the new data are saved back to the PKS, the PKS will display an Audit
Information dialog and an Update Reason dialog so that all changes to data
can be documented completely. A change reason must be entered for every
changed value.
See your system administrator to inquire about standard change reason mes-
sages in your organization. Once a reason for the change has been provided,
the PKS also requires a reason for updating the scenario.
The reason for the change is required. This data are captured and preserved
with the scenario data. It is available via the PKS web clients audit trail.
Using the Pharsight Knowledgebase Server
Dosing information
483
18
The Update Reason dialog also has Objects and Format buttons. Clicking the
Objects button opens the PKS Save All dialog, to set which objects loaded in
WinNonlin are to be saved.
Clicking on the Format button opens the PKS Save Native Format dialog,
which allows provides a means to save the worksheets as binary data or
ASCII data that can be read by other applications.
Dosing information
Dose data are added to PKS studies either through a separate dose worksheet
at study creation, or as part of a modeling scenario (via the WinNonlin Dosing
Regimen dialog, after loading the model). See Dosing on page 464 for dis-
cussion.
WinNonlin
Users Guide
484
18
When a study or scenario is loaded from the PKS into WinNonlin, the work-
book loaded has three worksheets: one of observation data (Observations),
one containing dosing data (Dosing), and one that records the data history
(History).
Only data loaded via the PKS will appear in the Dosing worksheet. If the
study has no dosing data, once a model has been selected in WinNonlin the
dosing data can be added via the WinNonlin dosing dialog. This dosing infor-
mation will appear in the Dosing worksheet after the scenario is saved to the
PKS with (model, model parameters and) dosing information. At that time,
the dosing data are associated with the study.
Once the Dosing information appears on the Dosing worksheet, the WinNon-
lin dosing dialog is disabled (and shaded blue), and changes to the dosing
must be made on the Dosing worksheet rather than through the Dosing dialog.
The WinNonlin dosing dialog must still be used to specify the dosing data for
simulations, and for user models. Dosing entered for a simulation, and subse-
quently saved to a scenario, resides with the scenario information, and does
not become the study dosing data.
Changing the dose regimen
When the dosing data exists on the Dosing worksheet, it is possible to indicate
which fields from the study or scenario to apply to the current scenario. Thus
different dosing schedules can be set up within a study or scenario simply by
including different data columns [Dose_A, Dose_B, etc.] for each regimen.
To choose a different dose regimen:
1. Load a study or scenario containing multiple dose regimens, each using a sep-
arate set of dosing data columns (i.e., for time and amount).
1. Select PKS>Dosing. The Dosing Field Selection dialog appears.
2. Drag the dosing fields for the regimen to be used in the current analysis to the
Dosing Columns box. Variables listed in the Non-Dosing Columns box will
not be used in the current scenario.
3. Click OK.
Using the Pharsight Knowledgebase Server
Appending or updating a study
485
18
Appending or updating a study
After a study is created in the PKS, additional data can be added to the study,
or existing data can be updated, from a workbook.
Note: Append/Update is a convenient way to add dosing information to the study or
scenario. This method can also be used to add subject data to the study.
To append/update a study:
1. Close any PKS study or scenario that is open in WinNonlin.
2. Open the data to be added in a WinNonlin workbook window.
3. Choose PKS>Append/Update Study... from the menus.
4. Log in. (See Logging in on page 466 for details.)
5. In the Pharsight Knowledgebase Server Load dialog, select the study to which
to append data, or in which to update data.
6. Click OK. The Study Creation Wizard appears, to map the variables in the
data set to the selected study.
7. Drag variables from the workbook and drop them on or under the correspond-
ing study variables. The column(s) containing the subject identifiers must be
identified. If there are new data variables, such as extra subject data or other
observations, add them beneath the existing study variables.
8. Click OK.
Note: The PKS documentation set covers a number of other operations that affect
studies and scenarios in the PKS. For example, it is possible to specify or con-
vert units in the PKS without loading the data in WinNonlin. It is also possible
to load data into WinNonlin then specify units or convert unitsthen save
them back to the PKS. Whenever there are significant differences between the
actions in WinNonlin and those in PKS, the documentation systems point
them out.
WinNonlin
Users Guide
486
18
WinNonlin and PKS differences
WinNonlin and the Pharsight Knowledgebase Server have been tightly inte-
grated. And yet, because they are also designed to work with other tools as
well, there are some differences which are important to note.
Units
Units are handled in both WinNonlin and PKS. Indeed, for some fields in
the PKS units are required. While they are useful in WinNonlin, they are
never required.
New units can be added and defined in the PKS. New units cannot be
added in WinNonlin. (A unit that WinNonlin does not recognize can be
entered; in this case WinNonlin marks it with surrounding braces {}, but
WinNonlin also wont attempt to utilize the units in calculations.)
Unit conversions can be done in both WinNonlin and the PKS. Conver-
sion factors for units must be entered in the PKS, whereas units are under-
stood naturally by WinNonlin. PKS comes with all of WinNonlin units
available.
Units are combined into categories in the PKS: mass, time, and volume.
There is not a directly analogous concept in WinNonlin except in the
Units Builder.
Units can be handled at the cellular level in the PKS. That is, each row of
a particular column can have different units (and the units would be stored
in an adjacent column). WinNonlin cannot handle units at the cellular
level. Units in WinNonlin are associated with an entire column. Thus
there are situations when valid data from a PKS data set cannot load cor-
rectly in WinNonlin until the differences in units has been resolved. The
PKS provides the means to convert the units in a column (which may
have mixed units) to one unit. This format then is valid in WinNonlin.
Data sets with time-dependent data in WinNonlin have no specific
requirements. To use them with the PKS, however, all time-dependent
data (Relative Actual Time, Relative Nominal Time, etc.) must have the
same time unit.
Using the Pharsight Knowledgebase Server
WinNonlin and PKS differences
487
18
Studies and scenarios
The fundamental unit for the PKS is the study. Scenarios are used to store
and rerun PK and NCA analyses, including models, model parameters,
dosing, etc. Scenarios are roughly analogous to workspaces in WinNonlin
(in that they could include a data set, a model, and some derived data
charts, worksheets, a model, tables, etc.).
Saving scenarios to PKS is analogous to saving a workspace in WinNon-
lin, except that workspaces require all child windows to have filenames
prior to being saved. PKS requires the child windows to have object
names.
Time and subject data must be present to save and import data from Win-
Nonlin to the PKS. If data does not have this, a dummy column can be
created so that the data set shows it.
The PKS can handle multiple drugs within one study. WinNonlin can han-
dle only one drug at a time in a scenario.
WinNonlin
Users Guide
488
18
489
Chapter 19
Scripting
Automating analyses through WinNonlins object-
oriented scripting language
The WinNonlin scripting language is an object-based programming language
that allows users to automate tasks and analyses. Using the scripting lan-
guage, users can devise script files, which are in essence computer programs,
to customize WinNonlin to their needs and run a number of WinNonlin opera-
tions in batch mode.
This section includes:
Terminology on page 489: object-based programming terminology
Writing and editing a script on page 490
Executing a script on page 492
Scripting object properties and methods on page 493: a quick reference
guide to the scripting properties and methods for each WinNonlin object
and engine
Script file components on page 498
Processing multiple profiles in script files on page 501
Scripting the Pharsight Knowledgebase Server on page 512
Examples of individual scripting operations on page 520
See Scripting Commands on page 645 for details on each scripting method
and property. See the Examples Guide for complete example scripts.
Terminology
Object-oriented programming terms used in WinNonlin scripting follow.
WinNonlin
Users Guide
490
19
Writing and editing a script
This section discusses the steps in writing and editing a script. Script files are
ASCII text files. They have the default extension of .PSC.
Note: Scripts written with earlier versions of WinNonlin have the extension .WSC.
They can be opened in this version of WinNonlin, but cannot be saved back to
this file type. New script files use the .PSC file type.
Older script files will run but may require minor modifications to file types.
For example, output must be saved to an appropriate file typea .PWO for a
workbook rather than a .WDO.
Table 19-1. Scripting terminology
Objects
Object-oriented programming languages deal with objects. In WinNonlin, each type of child
window that appears in the main WinNonlin parent window is an object. There are five types
of objects in WinNonlin: Data objects, Text objects, Model objects, Graph objects, and Win-
Nonlin itself.
Engines
Engines, like modules, execute tasks in WinNonlin. The ten WinNonlin engines are: PK,
DESC, LINMIX,BIOEQ, ANOVA
a
, PLOT, TABLE, TRANSFORM, MERGE,TOOL-
BOX.
Method
A method is a set of computer code that performs functionality on a specific object or engine.
In short, it invokes an action. For example, the Method LOAD causes an associated data file
(an Object) to be loaded. The Method RUN causes an associated PK Model (Engine) to run
the model.
Property
Every object has properties that define how the object should appear and interact. Properties
also set values for objects or engines. In short, properties are attributes or characteristics of
an object.
For example, a property of an output data object could contain a file name to identify that
object. Another property could be the file type to be used when loading the object. A third
property would define whether or not the named data file contains data headers (column
names) as the first row.
Script File
A WinNonlin script file is an ASCII file that contains WinNonlin scripting code. Within a script,
there could be many Objects of each type and several Engines. Only one Engine may be in
use at any one time.
a. ANOVA is available for backward compatibility with older versions of WinNonlin. LinMix
or Bioequivalence Wizards provide newer and more powerful options than ANOVA.
Scripting
Writing and editing a script
491
19
To write a script:
1. From the File menu, select New (Alt+F, N). The New dialog appears.
2. Select the radio button for Text.
3. Click OK. A text window appears.
4. Type the content of the script.
5. When the script is complete, select Save As from the File menu (Alt+F, A).
The File Save dialog box appears.
6. Select the appropriate drive and directory.
7. Select Script Files (*.PSC) from the pull-down menu in the Save as
type box.
8. In the File name box, type the desired file name, using the file extension .PSC.
9. Click Save.
Comments may be added to the Script file by adding lines to the script that
begin with REMA, or REMARK.
Case does not matter for any of the Properties or Methods.
To edit a script:
1. Select Open from the File menu (Alt+F, O).
or
Click the Open button on the tool bar. The File Open dialog appears.
2. Select the appropriate drive and directory if necessary.
3. Select Script Files (*.PSC) in the List Files of Type box. All script
files in the selected directory will be listed.
4. Double click on the name of the script file to be edited. The script file will
appear in a text window.
5. In the text window, click the text line where changes are needed, then type in
the changes.
6. When done, click Save.
WinNonlin
Users Guide
492
19
Executing a script
Once a script is created, the following steps are used to run it. Script files may
be executed either from within WinNonlin or from a Windows command line.
When running a script from within WinNonlin, no WinNonlin windows may
be open. When executing from the Windows command line, WinNonlin must
be closed.
Within WinNonlin
To execute a script while in WinNonlin:
1. Close all WinNonlin windows, including the text window containing the
script.
2. From the File menu, select Run Script (Alt+F, R). The Run Script dialog
appears.
Figure 19-1. The Run Script dialog.
3. Select the appropriate drive and directory.
4. Double click on the script file name.
or
Click on the script file name and click Open. The script file executes and the
output appears in a WinNonlin output window.
Scripting
Scripting object properties and methods
493
19
From the command line
To execute a script from the command line in Windows NT or Windows 98/2000:
1. Exit WinNonlin if it is already running.
2. Click the Windows Start button.
3. Select Run. A Windows dialog box will appear.
4. In the Open box, type WINNONLN, or WINNONLN.EXE along with the appro-
priate path, followed by the script file name, again including the full file path.
For example:
C:\WINNONLN\WINNONLN C:\WINNONLN\EXAMPLES\EXMPL_1.PSC
5. Click OK.
Note: When a script file cannot be successfully executed because of an error or
errors in the file, a log file is created. A text window will appear showing the
contents of that log file. If no errors occur during a script file execution, a log
file will not be created. The Pharsight application log will contain appropriate
entries for actions taken during the script file execution (exclusions, etc.).
From file manager or explorer
To execute scripts from Windows File Manager or from Explorer:
Script files can be run simply by double clicking on their names in Windows
Explorer (Windows 98/2000 or Windows NT).
To do so, the file extension .PSC must be associated with WINNONLN.EXE.
Scripting object properties and methods
This section lists all properties and methods that are applicable to each Win-
Nonlin object and engine. Refer to this Quick Reference Guide to see which
properties and methods are used for each operation. Detail on each command
is provided under Scripting Commands on page 645. See also Examples of
individual scripting operations on page 520.
WinNonlin
Users Guide
494
19
Objects
There are five WinNonlin objects. A quick reference table of applicable prop-
erties and methods is given below for each Object.
Table 19-2. WinNonlin object properties and methods
Arrange Load Save
Cascade MsgBox TileHorizontal
CloseAll PrintAll TileVertical
DeleteFiles PrintData Unload
ExportAll PrintGraph WorkingDir
FileMask PrintModel WindowState
Halt PrintText
Table 19-3. Data object properties and methods
Append FileType RenameCol
AppendFilename Find Replace
AppendFileType Font Save
AppendSheet FontSize SearchArea
AutoFileOptions Headers Sort
CaseSensitive Include SortVar( )
Column Load SortVars
ConseqDelim Missing StartCol
Copy MultiGrid StartRow
Cut Operation Tab
Delimiter Paste Tolerance
EndCol Print Unload
EndRow Remove Unit
Exclude RemoveCol WindowState
Filename RemoveRow With
Scripting
Scripting object properties and methods
495
19
Engines
There are ten WinNonlin engines. A quick reference of the applicable proper-
ties and methods is given below for each Engine.
Table 19-4. Text object properties and methods
Filename Print WindowState
FileType Save
Load Unload
Table 19-5. Model object properties and methods
DoseUnit LinkFile Print
Filename Load Save
FileType ParmFile Unload
LamzFile PartFile WindowState
Table 19-6. Graph object properties and methods
Filename MultiGraph Unload
FileType Print WindowState
FootnoteFont PrintMulti XLabelsFont
FootnoteFontSize PrintMultiAcross XLabelsFontSize
LegendFont PrintMultiDown XTitleFont
LegendFontSize Save XTitleFontSize
Load SaveAll XUnits
LoadTemplate SaveAllPrefix YLabelsFont
MoveFirst SaveTemplate YLabelsFontSize
MoveLast SortLevel YTitleFont
MoveNext TitleFont YTitleFontSize
MovePrevious TitleFontSize YUnits
Uniform
WinNonlin
Users Guide
496
19
Table 19-7. PK engine properties and methods
OutData OutText RunWordExport
OutGraph Run WordExportFilename
Table 19-8. Descriptive statistics engine properties and methods
Confidence OutData SortVars
InData Percentiles SummaryVar( )
Interval Run SummaryVars
SortVar( ) Weight
Table 19-9. ANOVA engine properties and methods
a
a. The former ANOVA functions are now handled by the Linear Mixed Ef-
fects Modeling engine. Scripts using the ANOVA engine will continue to
work, but it is best that new scripts use the LinMix engine.
Filename OutData Run
FileType OutText
Table 19-10. Plot engine properties and methods
AutoSort OutGraph UpErr( )
DnErr( ) Run XTitle
ErrType SameErrCol( ) XUnits
GroupVar( , ) ShowUnits XVar( )
GroupVars( ) SortVar( , ) YTitle
InData( ) SortVars( ) YUnits
Legend( ) Title YVar
NumData
Scripting
Scripting object properties and methods
497
19
Table 19-11. Table engine properties and methods
AggregateVar IDVars OutData
CrossVar( ) InData( ) PageFooter
CrossVars JoinCrossVar( , ) PageHeader
DefinitionFile JoinCrossVars RegVar( )
Filename JoinGroupVar( , ) RegVars
GroupVar( ) JoinGroupVars Run
GroupVarBreak( ) JoinIDVar( , ) Stats
GroupVars JoinIDVars TableNum
IDVar( ) NumData
Table 19-12. Transform engine properties and methods
DestArea Function SourceCol
DestCol InData
Extra Run
Table 19-13. Merge engine properties and methods
CarryData InData( ) Run
IncludeVar( , )
NumData
a
a. Must be equal to 2.
SortVar( , )
IncludeVars( ) OutData SortVars
Table 19-14. LinMix and Bioequivalence engine properties and methods
Filename OutData Run
FileType OutText
WinNonlin
Users Guide
498
19
Script file components
While some operations are specified in Script files completely through the use
of the scripting language commands described in this chapter, other, more
Table 19-15. Toolbox engine properties and methods
a
a. The set of properties available to the Toolbox engine depends on the value
assigned to the Function property. Function can be assigned one of four
values (above) to select the analysis tool. Valid properties are listed for
each Function property assignment.
Toolbox.function assignments Applicable properties and methods
Toolbox.Function=Crossover InData
OutData
Run
Response
SortVar( )
SortVars
ShowUnits
Subject
TreatmentA
TreatmentB
Stacked
Toolbox.Function=Semicompartmental ConcCol
Ecol
InData
Keo
OutData
OutGraph
Run
SortVar( )
SortVars
TimeCol
Toolbox.Function=Superposition ConcCol
DoseUnit
InData
InitialDose
MaintenanceDose
Npoints
OutData
OutGraph
Run
SortVar( )
SortVars
Tau
TerminalLower
TerminalPhase
TerminalUpper
TimeCol
TimeRepeat
Toolbox.Function=Deconvolution AlphaTerms()
Aterms()
Bolus
ConcCol
DoseUnit
Delta
InputLag
Npoints
NumTerms
Run
Smoothing
SortVar( )
SortVars
TimeCol
Scripting
Script file components
499
19
complex, operations are specified via files that are prepared in advance. This
section describes how each engine is implemented in the scripting language.
Table 19-16. Script file operations and methods of implementation
Engine Method of implementation
Charts
Charts are specified in scripts via scripting language commands.
Tables
Tables may be specified in Script files in two different ways: through the use of scripting lan-
guage commands, or using a table definition file (.TDF).
Scripting language commands can specify:
The Input data set(s)
Table template number
Variable mappings
Summary Statistics (all or none)
Page Break options
Using only the Scripting Language commands some flexibility is lost. Summary statistics can
be included, but it is not possible to select a subset. Also, default formatting is used; the font,
alignment, page numbers, etc., cannot be set unless a table definition file is used.
A table definition file contains all of the information needed to create the table except the
input data set(s) to be used. A script can call any existing table definition file to set up the
table structure and formatting. For more information on table definition files, see Chart tem-
plates on page 182
Compartmental
Models
Compartmental models are specified in scripts via Command files (.CMD) or Pharsight
Model Objects (.PMO). To use Command files with different levels of input for model parame-
ters, etc., for each sort level, see Special file formats on page 502.
Note that although a workbook will be loaded and used for the modeling as a result of either
the Command file or Pharsight Model Object, that data file will not be available for any other
processing. To use that data set for any other purpose within the script, it will be necessary to
load it separately.
Noncompartmen
tal Analysis
a
Noncompartmental models are specified in scripts via Command files (.CMD) or Pharsight
Model Objects (.PMO). To use Command files with different levels of input for Lambda z
ranges, etc., for each sort level, see Special file formats on page 502
Note that although a workbook will be loaded and used for the modeling as a result of either
the Command file or Pharsight Model Object, that data file will not be available for any other
processing because it will not have an alias assigned to it. To use that data set for any other
purpose within the script, it will be necessary to load it separately.
ANOVA
Analysis of Variance, Analysis of Covariance, and Linear Regression models are all specified
in Scripts via ANOVA command files (.ANV).
Note that although a data grid will be loaded and used for the modeling as a result of loading
the ANOVA command file (.ANV), that data file is not available for any other processing
because it does not have an alias assigned to it. To use that data set for any other purpose
within the script, it will be necessary to load it separately.
WinNonlin
Users Guide
500
19
Note on saving files
CAUTION: When saving files with the Scripting Language, WinNonlin does not check to
see if that file name already exists. It is possible to overwrite existing files in
this way.
LinMIx
Linear mixed effects modeling, including analysis of variance, analysis of covariance, and lin-
ear regression can all be specified in scripts using a linear mixed effects command file (.LML).
Bioequivalence
Bioequivalence analysis, including average, population, and individual bioequivalence mod-
els, can be specified in scripts using a bioequivalence command file (.LML).
Descriptive
statistics
Descriptive Statistics are specified in Scripts via scripting language commands which
address the descriptive statistics engine. The user specifies which columns are summary
variables and a new output data grid is generated.
Transformations
Data transformations are specified in Scripts via scripting language commands which access
properties and methods of the transform engine.
Merging data
sets
The merging of data sets are specified in Scripts via scripting language commands which
use the merge engine properties and methods. Any combination of data from two data sets
can be merged and saved as one data set.
Scripting PKS
Access to data in the Pharsight Knowledgebase Server (PKS) is possible using scripting in
WinNonlin. Scripting the PKS is done by adding an additional FileType property to the Win-
Nonlin Data Object. The Load and Save operations on this Data Object then rely on a PKS
file pointed to by the Data Object. The PKS file is the same format as the files generated by
the Study Definition and Study Mappings dialogs used in the creation of a study in the PKS.
The file format is XML and is defined by an embedded DTD.
a. When writing scripts that will use the NCA Data output, it is important to be aware of the
form in which this output will appear. The NCA Data output can appear with the variables
(columns) Parameter and Estimate (in addition to the sort and carry-along variables), or, with
a separate variable for each of the Final Parameters in the transposed output.
The Final Parameters worksheet will be transposed if NCATRANS is included in the NCA
specification or if the user has set up transposed output as the WinNonlin default. Both
transposed and non-transposed worksheets are always produced; this option simply deter-
mines which format will appear in the worksheet entitled Final Parameters. See Transpose
final parameter table on page 262.
Table 19-16. Script file operations and methods of implementation (continued)
Engine Method of implementation
Scripting
Processing multiple profiles in script files
501
19
Processing multiple profiles in script files
Two options are available to process compartmental models and noncompart-
mental analyses in the Scripting Language:
Loading a Pharsight model object (.PMO)
Loading a Command file (.CMD)
When using a Pharsight model object, different values may be used for dos-
ing, parameter values, partial areas or lambda_z range for each sort level auto-
matically. Command files, however, store only one set of values to be used for
all sort levels.
It is possible, however, to load a command file, then load ASCII files which
contain this information uniquely for each sort level. These ASCII files can be
created and saved within WinNonlin or a text editor.
The information contained in the files specified by these properties is
expected to be in a very specific format. The next section discusses the ASCII
file formats that are expected when using the following methods with Model
Objects.
.LAMZFILE for specifying lambda_z range information
.DOSEFILE for specifying dosing information
.PARMFILE for specifying parameter values
.LINKFILE for specifying PK/PD models that require two sets of
parameter values
.PARTFILE for specifying partial area information
The following example script files shows how a command file could be
loaded, and the methods used.
Set MYMODEL = Model
MYMODEL.Filetype="ASCII
MYMODEL.File Name=C:\WINNONLN\EXAMPLES\PRO-
FILES.CMD
MYMODEL.Load
MYMODEL.Dosefile=C:\WINNONLN\EXAM-
PLES\DOSEINFO.DAT
WinNonlin
Users Guide
502
19
MYMODEL.PartFile=C:\WINNONLN\EXAM-
PLES\PARTINFO.DAT
Pk.OutData=MYOUTDATA
REMA Text and graphics output objects may also be
named at this time
Pk.Run
Special file formats
This section discusses the required ASCII file formats when using the follow-
ing methods with Model Objects.
.LAMZFILE for lambda_z range information (start and end times for computa-
tion of lambda z in noncompartmental analysis)
.DOSEFILE for dosing information
.PARMFILE for initial parameter values and bounds (optional)
.LINKFILE for PK/PD models that require two sets of parameter values
.PARTFILE for partial area information (start and end times for computation of
partial areas under the curve)
The general structure for all of the ASCII files is given, followed by annotated
examples for each type of file. These files may be created and saved from
within WinNonlin, or using a text editor.
General structure
Order in file Contents Comments
1st CheckSum or
Identifier
Must be included on the first line of file.
2nd nType nType is between 1 to 5 as follows:
1 lamdbaz range information
2 dosing information
3 model parameter values
4 link parameter values
5 partial areas
Scripting
Processing multiple profiles in script files
503
19
Note: When ntype = 1 or 5, nRow = nProfiles (no. of profiles). When ntype = 2 or 3
or 4, nRow = NCON (no. of constants) or NPAR (no. of parameters).
Lambda z range information (nType=1)
Data Grid with Lambda z Range Information for three profiles. Model used:
NCA Model 200.
ASCII File with Lambda_z Range information of the above three profiles.
3rd nProfiles nProfiles is a value < 32767 that indicates how many pro-
files or subsets of values are included.
4th nRows, nCols nRows & nCols are integers that indicate how many rows
and columns of data are in the file.
5th-
(nColns+4)t
h record
n, Char For each column, these values indicate the number of dec-
imal places and data type (A or N) of the data, respec-
tively.
Remaining
records
Data values of
each profile
Data values of column 1, 2, 3, etc. Set(s) of values for each
nRow.
Order in file Contents Comments
Subject Start time End time Exclusions
1 3 18 4 5
2 3 18 3
3 3 18
Table 19-17. Lambda z file structure
Record Contents Comments
1
st
CheckSum or
Identifier
Required
2
nd
1 nType = 1, as 1 represents lambda_z range information.
3
rd
3 nProfiles = 3, as the number of profiles (Subjects) used is 3.
WinNonlin
Users Guide
504
19
Note: Values that are in the excluded part of the data grid but are not valid exclu-
sions have a value of 0. This does place the restriction that Time=0 may not be
an excluded data point.
Dosing information (nType = 2)
Data Grid with Dosing Information for three profiles. Model used: NCA
Model 200.
4
th
3, 4 When nType is 1, the number of rows equals nProfiles (the number
of profiles), so nRows = 3. When nType is 1, the number of col-
umns equals 2 + the maximum number of exclusions, so nCols =
4.
5
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as the
data type is numeric for the 1st column.
6
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as the
data type is numeric for the 2nd column.
7
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as the
data type is numeric for the 3rd column.
8
th
3 Numeric data in the 1st column (Start Time), 1st profile.
9
th
18 Numeric data in the 2nd column (EndTime), 1st profile.
10
th
4 Numeric data in the 3rd column (Exclusions), 1st profile.
11
th
5 Numeric data in the 4th column (Exclusions), 1st profile.
12
th
3 Numeric data in the 1st column (Start Time), 2nd profile.
13
th
18 Numeric data in the 2nd column (EndTime), 2nd profile.
14
th
3 Numeric data in the 3rd column (Exclusions), 2nd profile.
15
th
0 Invalid exclusions in the 4th column, 2nd profile. (See Note below).
16
th
3 Numeric data in the 1st column (Start Time), 3rd profile.
17
th
18 Numeric data in the 2nd column (EndTime), 3rd profile.
18
th
-1e150 Invalid exclusions in the 3rd column, 3rd profile. (See Note below).
19
th
0 Invalid exclusions in the 4th column, 3rd profile. (See Note below).
Table 19-17. Lambda z file structure (continued)
Record Contents Comments
Scripting
Processing multiple profiles in script files
505
19
ASCII File with dosing information of the above three profiles.
Subject Constant Value
1 Dose 100
1 Time of Last Dose 0
2 Dose 100
2 Time of Last Dose 0
3 Dose 100
3 Time of Last Dose 0
Table 19-18. Dosing file structure
Record Contents Comments
1
st
CheckSum or
Identifier
Was not used before WinNonlin version 3.2. Can be used to save
dosing units. See note below
a
.
2
nd
2 nType = 2, as 2 represents dosing information.
3
rd
3 nProfiles = 3, as the number of profiles (Subjects) used is 3.
4
th
3, 1 When nType is 2, the number of rows equals NCON (the number
of constants), so nRows = 3. When nType is 2, the number of col-
umns equals 1, so nCols = 1. (See Note below on nRows).
5
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the column.
6
th
100 Numeric data in the 1st column (Value), 1st profile.
7
th
0 Null data in the 2nd column, 1st profile.
8
th
0 Null data in the 3rd column, 1st profile.
9
th
100 Numeric data in the 1st column (Value), 2nd profile.
10
th
0 Null data in the 2nd column, 2nd profile.
11
th
0 Null data in the 3rd column, 2nd profile.
12
th
100 Numeric data in the 1st column (Value), 3rd profile.
13
th
0 Null data in the 2nd column, 3rd profile.
14
th
0 Null data in the 3rd column, 3rd profile.
WinNonlin
Users Guide
506
19
Note: When using the Model.DoseFile method with NCA models, nRows is equal
to NCON+1 in order to accommodate the Time of Last Dose values. When
steady state is being calculated, nRows is equal to NCON+2 to accommodate
the Tau values. If steady state is not being calculated, these values should be
set to 0.
Model parameter values (nType = 3)
Data grid with parameter values on two profiles. Model used: PK Model 3
ASCII File with parameter values of the above two profiles.
a. It is possible to save dosing units and dose normalization information to
ASCII *.DAT files. To do so, the format for the first line becomes V32,
sdoseunit, sdosenormalization. The commas must be includ-
ed, even without the units [hence it could be V32,, ].
Subject Parameter Initial value Lower Upper
1 Volume_F 0.2 0 0
1 K01 20 0 0
1 K10 2 0 0
2 Volume_F 0.15 0 0
2 K01 33 0 0
2 K10 1.5 0 0
Table 19-19. Model parameter file structure
Record Contents Comments
1
st
CheckSum
or Identifier
Unused
2
nd
3 nType = 3, as 3 represents parameter values.
3
rd
2 nProfiles = 2, as the number of profiles (Subjects) used is 2.
4
th
3, 3 When nType is 3, the number of rows equals NPAR (the number of
parameters), so nRows = 3. When nType is 3, the number of col-
umns equals 3, so nCols = 3. (See Note below on nCol).
Scripting
Processing multiple profiles in script files
507
19
5
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 1st column (Initial Value).
6
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 2nd column (Lower Limit).
7
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 3rd column (Upper Limit).
8
th
0.2 Numeric data of the Volume/F parameter in the 1st column (Initial
Value), 1st profile.
9
th
0 Null data of the Volume/F parameter in the 2nd column (Lower
Limit), 1st profile.
10
th
0 Null data of the Volume/F parameter in the 3rd column (Upper
Limit), 1st profile.
11
th
20 Numeric data of the K01 parameter in the 1st column, 1st profile.
12
th
0 Null data of the K01 parameter in the 2nd column, 1st profile.
13
th
0 Null data of the K01 parameter in the 3rd column, 1st profile.
14
th
2 Numeric data of the K10 parameter in the 1st column, 1st profile.
15
th
0 Null data of the K10 parameter in the 2nd column, 1st profile.
16
th
0 Null data of the K10 parameter in the 3rd column, 1st profile.
17
th
.15 Numeric data of the Volume/F parameter in the 1st column (Initial
Value), 2nd profile.
18
th
0 Null data of the Volume/F parameter in the 2nd column (Lower
Limit), 2nd profile.
19
th
0 Null data of the Volume/F parameter in the 3rd column (Upper
Limit), 2nd profile.
20
th
33 Numeric data of the K01 parameter in the 1st column (Initial
Value), 2nd profile.
21
st
0 Null data of the K01 parameter in the 2nd column (Lower Limit),
2nd profile.
22
nd
0 Null data of the K01 parameter in the 3rd column (Upper Limit),
2nd profile.
23
rd
1.5 Numeric data of the K10 parameter in the 1st column (Initial
Value), 2nd profile.
Table 19-19. Model parameter file structure (continued)
Record Contents Comments
WinNonlin
Users Guide
508
19
Note: The three columns: nCol1 = Initial Value, nCol2 = Lower Limit, nCol3 =
Upper Limit, are not always used, but must still be part of the file.
Link parameter values (nType = 4)
Since a PK/PD model actually requires two sets of parameter values, the
Linkfile is included.
Data grids with link parameter values on two profiles. Models used: PK
Model 3/PD Model 105
The following data grid is applied to the PK Model:
ASCII File with parameter values of the above two profiles.
24
th
0 Null data of the K10 parameter in the 2nd column (Lower Limit),
2nd profile.
25
th
0 Null data of the K10 parameter in the 3rd column (Upper Limit),
2nd profile.
Table 19-19. Model parameter file structure (continued)
Record Contents Comments
Subject Parameter Initial Value Lower Upper
1 Volume_F 0.2 0 0
1 K01 20 0 0
1 K10 2 0 0
2 Volume_F 0.15 0 0
2 K01 33 0 0
2 K10 1.5 0 0
Table 19-20. Link PK parameter values
Record Contents Comments
1
st
CheckSum or
Identifier
Was not used before WinNonlin version 3.2. Can be used to
save PK concentration units. See note below
a
.
2
nd
4 nType = 4, as 4 represents Link parameter values.
Scripting
Processing multiple profiles in script files
509
19
The remainder of the file structure is the same as the file shown in Example 3.
The following data grid is applied to the PD Model:
ASCII File with parameter values of the above two profiles.
3
rd
2 nProfiles = 2, as the number of profiles (Subjects) used is 2.
4
th
3, 3 When nType is 4, the number of rows equals NPAR (the number
of parameters), so nRows = 3. When nType is 4, the number of
columns equals 3, so nCols = 3. (See Note below on nCol).
5
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 1st column (Initial Value).
6
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 2nd column (Lower Limit).
7
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 3rd column (Upper Limit).
8
th
0.2 Numeric data of the Volume/F parameter in the 1st column (Ini-
tial Value), 1st profile.
9
th
0 Null data of the Volume/F parameter in the 2nd column (Lower
Limit), 1st profile.
10
th
0 Null data of the Volume/F parameter in the 3rd column (Upper
Limit), 1st profile.
a. It is possible to save PK concentration units for the PK tab of PK/PD mod-
els to ASCII .DAT files. To do so, the format for the first line becomes
V32,PKconcentrationunit. The comma must be included, even
without the units (hence it could be V32,).
Subject Parameter Initial value Lower Upper
1 Emax 5 0 0
1 Ece50 6 0 0
1 Gamma 7 0 0
2 Emax 1 0 0
2 Ece50 2 0 0
2 Gamma 3 0 0
Table 19-20. Link PK parameter values (continued)
Record Contents Comments
WinNonlin
Users Guide
510
19
Table 19-21. PD parameter values
Record Contents Comments
1
st
CheckSum
or Identifier
Unused
2
nd
4 nType = 4, as 4 represents Link parameter values.
3
rd
2 nProfiles = 2, as the number of profiles (Subjects) used is 2.
4
th
3, 3 When nType is 4, the number of rows equals NPAR (the number of
parameters), so nRows = 3. When nType is 4, the number of col-
umns equals 3, so nCols = 3. (See Note below on nCol.)
5
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 1st column (Initial Value).
6
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 2nd column (Lower Limit).
7
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 3rd column (Upper Limit).
8
th
5 Numeric data, Emax parameter in the 1st column (Initial Value),
1st profile.
9
th
0 Null data, Emax parameter in the 2nd column (Lower Limit), 1st
profile.
10
th
0 Null data, Emax parameter in the 3rd column (Upper Limit), 1st
profile.
11
th
6 Numeric data, Ece50 parameter in the 1st column, 1st profile.
12
th
0 Null data, Ece50 parameter in the 2nd column, 1st profile.
13
th
0 Null data, Ece50 parameter in the 3rd column, 1st profile.
14
th
7 Numeric data, Gamma parameter in the 1st column, 1st profile.
15
th
0 Null data, Gamma parameter in the 2nd column, 1st profile.
16
th
0 Null data, Gamma parameter in the 3rd column, 1st profile.
17
th
1 Numeric data, Emax parameter in the 1st column (Initial Value),
2nd profile.
18
th
0 Null data, Emax parameter in the 2nd column (Lower Limit), 2nd
profile.
19
th
0 Null data, Emax parameter in the 3rd column(Upper Limit), 2nd
profile.
Scripting
Processing multiple profiles in script files
511
19
Note: The three columns: nCol1 = Initial Value, nCol2 = Lower Limit, nCol3 =
Upper Limit, are not always used, but must still be part of the file.
Partial areas (nType = 5)
Data grid with partial area information for three profiles. Model used: NCA
Model 200
ASCII File with partial areas information of the above three profiles.
20
th
2 Numeric data, Ece50 parameter in the 1st column, 2nd profile.
21
st
0 Null data, Ece50 parameter in the 2nd column, 2nd profile.
22
nd
0 Null data, Ece50 parameter in the 3rd column, 2nd profile.
23
rd
3 Numeric data, Gamma parameter in the 1st column, 2nd profile.
24
th
0 Null data, Gamma parameter in the 2nd column, 2nd profile.
25
th
0 Null data, Gamma parameter in the 3rd column, 2nd profile.
Table 19-21. PD parameter values (continued)
Record Contents Comments
Subject Min Time Max Time AUC1 Lower AUC1 Upper
1 .25 48 5 6
2 .25 48 8 12
3 .25 48 2 3
Table 19-22. Partial areas file format
Record Contents Comments
1
st
CheckSum or
Identifier
Unused
2
nd
5 nType = 5, as 5 represents Partial Areas.
3
rd
3 nProfiles = 3, as the number of profiles (Subjects) used is 3.
WinNonlin
Users Guide
512
19
Note: Values that are in the partial area portion of the data grid, but are not valid par-
tial areas, should be given lower and upper values of 0.
Scripting the Pharsight Knowledgebase Server
The Pharsight Knowledgebase Server (PKS), and the files stored as studies
and scenarios in it, can be accessed by scripting from WinNonlin. Scripting
the PKS is done by adding an additional FileType property to the Data Object.
The Load and Save operations on this Data Object will rely on a PKS file
pointed to by the Data Object. This PKS file is the same format as the files
generated by the Study Definition and Study Mappings dialogs used in the
creation of a study in the PKS. The file format is XML and is defined by an
embedded DTD. See PKS file format on page 513 for details.
The workflow rules associated with the manipulation of PKS data via Script-
ing can be encapsulated based on the method being invoked (i.e. Load or
Save).
4
th
3, 2 When nType is 5, the number of rows equals nProfiles, so nRows
= 3. When nType is 5, the number of columns equals the maxi-
mum number of partial areas multiplied by 2, so nCols = 2.
5
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 1st column (AUC1 Lower).
6
th
4, N n = 4, as the number of decimal places, if any, is 4. Char = N as
the data type is numeric for the 2nd column (AUC1 Upper).
7
th
5 Numeric data of the column AUC1 Lower of the 1st profile.
8
th
6 Numeric data of the column AUC1 Upper of the 1st profile.
9
th
8 Numeric data of the column AUC1 Lower of the 2nd profile.
10
th
12 Numeric data of the column AUC1 Upper of the 2nd profile.
11
th
2 Numeric data of the column AUC1 Lower of the 3rd profile.
12
th
3 Numeric data of the column AUC1 Upper of the 3rd profile.
Table 19-22. Partial areas file format (continued)
Record Contents Comments
Scripting
Scripting the Pharsight Knowledgebase Server
513
19
Load
Note: Rules follow the user interface.
1. If the PKS file pointed to by the Data Object has only a study name, then
only a study will be loaded.
2. If the PKS file pointed to by the Data Object has a study name and a sce-
nario name, then both the study and latest version of the scenario will be
loaded. Scripting will not load previous versions of a scenario.
Save
Note: A more involved set of rules based on the state of the application.
1. If no PKS session has been created (i.e. no connection has been made to
the PKS), then the Save Method will create a study in the PKS based on
the information in the PKS file pointed to by the File Name Property of
the Data Object.
2. If a PKS session has been created via loading a study only and no other
Objects (i.e. charts, texts, workbooks) are present in WinNonlin, then the
Save Method will update the Study only.
3. If a PKS session has been created via loading a study and scenario or a
study only and other Objects (i.e. charts, texts, workbooks) are present in
WinNonlin, then the Save Method will update the Study (if it changed)
and Save the scenario to a new version or an entirely new scenario. A new
version will be created if and only if the scenario name being saved is the
same as the scenario that was loaded.
PKS file format
The PKS file contains XML that describes load and/or save operations to and/
or from the PKS. It is saved as an XML file with the following format.
<?xml version="1.0"?>
<!DOCTYPE PWRImport
[
<!ELEMENT PWRImport (StudyInformation?, Scenario?
,Mappings?)>
WinNonlin
Users Guide
514
19
<!ATTLIST PWRImport
UserID CDATA #IMPLIED
Password CDATA #IMPLIED
Server CDATA #IMPLIED
Port CDATA #IMPLIED
Root CDATA #IMPLIED
>
<!ELEMENT StudyInformation EMPTY>
<!ATTLIST StudyInformation
BlindingType CDATA #IMPLIED
Compound CDATA #IMPLIED
Description CDATA #IMPLIED
Design CDATA #IMPLIED
EndTime CDATA #IMPLIED
Indication CDATA #IMPLIED
Name CDATA #IMPLIED
Portfolio CDATA #IMPLIED
Project CDATA #IMPLIED
StartTime CDATA #IMPLIED
State CDATA #IMPLIED
Type CDATA #IMPLIED
Reason CDATA #IMPLIED
>
<!ELEMENT Scenario EMPTY>
<!ATTLIST Scenario
Name CDATA #IMPLIED
Reason CDATA #IMPLIED
GetLatest (TRUE|FALSE) #IMPLIED
>
<!ELEMENT Mappings (Sources?, Mapping*)>
<!ATTLIST Mappings
Type (SAMPLE|DOSE|BOTH) #IMPLIED
>
<!ELEMENT Sources EMPTY>
<!ATTLIST Sources
Scripting
Scripting the Pharsight Knowledgebase Server
515
19
Observation CDATA #IMPLIED
Dose CDATA #IMPLIED
Demographics CDATA #IMPLIED
>
<!ELEMENT Mapping (FromFields*, FieldOption*)>
<!ATTLIST Mapping
FromField CDATA #IMPLIED
ToField CDATA #IMPLIED
FieldType (Subject_ID|Subject_Data|Observa-
tion|DCP_Description|Actual_Clock_Time|Relative_Nomina
l_Time|Sample_Number|Relative_Actual_Time|Relative_Ac
tual_End_Time|Treatment|Period|Phase|Undefined|Dose)
#IMPLIED
TreatAsDCP (TRUE|FALSE) #IMPLIED
>
<!ELEMENT FromFields EMPTY>
<!ATTLIST FromFields
Name CDATA #IMPLIED
>
<!ELEMENT FieldOption EMPTY>
<!ATTLIST FieldOption
OptionName
(Unit|Sample_Description|Sample_Matrix|Analytical_Metho
d|Status|LLOQ|ULOQ) #IMPLIED
IsColumn (TRUE|FALSE) #IMPLIED
Value CDATA #IMPLIED
>
]
>
WinNonlin
Users Guide
516
19
Example PKS scripts
Creating a study
In this example a study is created from a file. It could also have been created
from a Watson LIMS system via the WinNonlin enterprise ODBC interface
(i.e. WinNonlin loads data from an external system via an ODBC connection
or Custom Query Builder, then executes the last four lines of the script on the
Data Object created by importing the data).
Script file
Set MYRAWDAT1=Data
MYRAWDAT1.Filename="bg1.pwo"
MYRAWDAT1.FileType="PWO"
MYRAWDAT1.Load
MYRAWDAT1.Filename="CreateStudy.pks"
MYRAWDAT1.FileType="PKS"
MYRAWDAT1.Save
Scripting
Scripting the Pharsight Knowledgebase Server
517
19
Updating a study
This example refreshes a study with the latest information from the PKS.
Step 1: The study is loaded from the PKS into WinNonlin.
Step 2: The new data is loaded into another worksheet (in the script it is a file,
but it could have come from an ODBC import).
CREATESTUDY.PKS
WinNonlin
Users Guide
518
19
Step 3: The worksheet containing the Study data is overwritten by the new
data via a copy/paste operation.
Step 4: The study is then saved, at which point WinNonlin determines what
has changed, applies the reason for change in the PKS file, and saves the
change information to the PKS (i.e. observation updates, deletions, additions).
Note the reason for change in the LOADSTUDY.PKS file, below.
Script file
Rema Step1: Load study
Set MYRAWDAT1=Data
MYRAWDAT1.Filename="LoadStudy.pks"
MYRAWDAT1.FileType="PKS"
MYRAWDAT1.Load
Rema Step2: Load latest study data
Set MYRAWDAT2=Data
MYRAWDAT2.Filename="bg1-dxg-9.pwo"
MYRAWDAT2.FileType="PWO"
MYRAWDAT2.Load
Rema Step3: Refresh study data with new study data
Rema via copy/paste
MYRAWDAT2.StartRow=1
MYRAWDAT2.EndRow=16
MYRAWDAT2.StartCol="subject"
MYRAWDAT2.EndCol="concentration"
MYRAWDAT2.Copy
MYRAWDAT1.StartRow=1
MYRAWDAT1.EndRow=16
MYRAWDAT1.StartCol="subject"
MYRAWDAT1.EndCol="concentration"
MYRAWDAT1.Paste
MYRAWDAT2.Unload
Rema Step4: Update study
MYRAWDAT1.Save
Scripting
Scripting the Pharsight Knowledgebase Server
519
19
Creating a scenario
This example creates a scenario by running statistics on the loaded study and
saving it.
Note the reason for change in the CREATESCENARIO.PKS file, below.
LOADSTUDY.PKS
Script file
rema Load study
Set MYRAWDAT1=Data
MYRAWDAT1.Filename="LoadStudy.pks"
MYRAWDAT1.FileType="PKS"
MYRAWDAT1.Load
rema Do descriptive stats
Desc.InData="MYRAWDAT1"
Desc.SortVars=1
Desc.SortVar(1)="Subject"
Desc.SummaryVars=1
Desc.SummaryVar(1)="Concentration"
Desc.OutData="MYDESCDATA"
Desc.Run
MYDESCDATA.Filename="Scripted Stats"
rema Save scenario
MYRAWDAT1.Filename="CreateScenario.pks"
MYRAWDAT1.Save
CREATESCENARIO.PKS
WinNonlin
Users Guide
520
19
Re-running a scenario
In this example, a scenario is loaded with the latest changes to the study. It is
re-run and saved.
Note the reason for change in the LOADSCENARIO.PKS file below, and the Get-
Latest flag, indicating get latest study data.
Examples of individual scripting operations
This section provides examples of scripting single WinNonlin operations.
Each example is a complete script, though real scripts would generally
include multiple operations. See the Examples Guide for examples of com-
plete scripts.
Script file
rema Load study
Set MYRAWDAT1=Data
MYRAWDAT1.Filename="LoadScenario.pks"
MYRAWDAT1.FileType="PKS"
MYRAWDAT1.Load
rema Run model
PK.Run
rema Save scenario
MYRAWDAT1.Save
LOADSCENARIO.PKS
Scripting
Examples of individual scripting operations
521
19
Data manipulation
Loading files
rema ***************************************************
rema * Importing an ASCII file and an Excel file, and
rema * loading a WinNonlin Data Object
rema ***************************************************
Set MYDATA1=Data
MYDATA1.Filename="c:\winnonln\examples\bguide1.dat
MYDATA1.FileType="ASCII
MYDATA1.Delimiter=
MYDATA1.Headers=True
MYDATA1.Conseqdelim=True
MYDATA1.Missing="."
MYDATA1.Load
Set MYDATA2=Data
MYDATA2.Filename="c:\winnonln\examples\rawdata.xls"
MYDATA2.FileType="EXCEL"
MYDATA2.Headers=True
MYDATA2.Missing="."
MYDATA2.Load
Set MYDATA3=Data
MYDATA3.Filename="c:\winnonln\examples\clayton.pwo"
MYDATA3.FileType="PWO"
MYDATA3.Load
Copying and pasting data
Remark *************************************************
Remark * This example copies 10 rows of data from two columns
Remark * and pastes them to a new location (Columns E and F).
Remark *************************************************
set MYDATA = Data
MYDATA.Filename = <file name>
WinNonlin
Users Guide
522
19
MYDATA.StartRow=1
MYDATA.StartCol=A
MYDATA.EndRow=10
MYDATA.EndCol=B
MYDATA.Copy
MYDATA.StartRow=1
MYDATA.StartCol=E
MYDATA.Paste
The same script could be used to cut and paste data, by replacing
MYDATA.Copy with: MYDATA.Cut.
Renaming a column
Remark *************************************************
Remark * Method: RenameCol
Remark * This script renames column 'a' to 'Other'.
Remark *************************************************
set MYDATA = Data
MYDATA.Filename = "c:\winnonln\examples\testdata.xls"
MYDATA.Filetype = "EXCEL"
MYDATA.Headers = False
MYDATA.Load
MYDATA.Column = "a"
MYDATA.With = "Other"
MYDATA.RenameCol
Replacing values in a worksheet
Remark **************************************************
Remark * Method: Replace
Remark * This script searches for data values equal to '3' in
Remark * the column 'CONC' and replaces them with 'Missing'.
Remark **************************************************
set MYDATA=Data
MYDATA.Filename="c:\winnonln\examples\testdata.xls"
MYDATA.Filetype="EXCEL"
MYDATA.Headers=True
MYDATA.Load
MYDATA.SearchArea="CONC"
MYDATA.Find="3"
Scripting
Examples of individual scripting operations
523
19
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.With="Missing"
MYDATA.Replace
Removing rows based on a data value
Remark **************************************************
Remark * Method: Remove
Remark * This script tests the Remove function. The script searches
Remark * for data values equal to '3' in the column 'TIME' and
Remark * removes the entire row.
Remark **************************************************
set MYDATA=Data
MYDATA.Filename="c:\winnonln\examples\testdata.xls"
MYDATA.Filetype="EXCEL"
MYDATA.Headers=True
MYDATA.Load
MYDATA.SearchArea="TIME"
MYDATA.Find="3"
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.Remove
Removing a range of rows
Remark *************************************************
Remark * Method: RemoveRow
Remark * This script deletes a range of rows (2-15) from
Remark * a data set.
Remark *************************************************
set MYDATA=Data
MYDATA.Filename="c:\winnonln\examples\testdata.xls"
MYDATA.Filetype="EXCEL"
MYDATA.Headers=False
MYDATA.Load
WinNonlin
Users Guide
524
19
MYDATA.StartRow=2
MYDATA.EndRow=15
MYDATA.RemoveRow
Removing a column
Remark *************************************************
Remark * Method: RemoveCol
Remark * This script deletes a specified column from the data set.
Remark * Note: If the Headers property is 'False' the script will not
Remark * fail. This is because even if headers are not loaded a column
Remark * can still be removed by specifying the column letter, for
Remark * example 'A', 'B', etc.
Remark *************************************************
set MYDATA=Data
MYDATA.Filename="c:\winnonln\examples\testdata.xls"
MYDATA.Filetype="EXCEL"
MYDATA.Headers=False
MYDATA.Load
MYDATA.Column="a"
MYDATA.RemoveCol
Excluding and including data
Remark *************************************************
Remark * Method: Exclude, Include
Remark * This script demonstrates the Include and Exclude functions.
Remark * The script first excludes everything with a value of greater
Remark * than 1 from the entire data set, then goes back and includes
Remark * everything with a value equal to 3. Finally, everything with
Remark * a value equal to 4.3 is included in a specific column
Remark * (in this case 'CONC').
Remark *************************************************
set MYDATA=Data
MYDATA.Filename="c:\winnonln\examples\testdata.xls"
MYDATA.Filetype="EXCEL"
MYDATA.Headers=True
MYDATA.Load
Scripting
Examples of individual scripting operations
525
19
MYDATA.SearchArea="entire data set"
MYDATA.Find="1"
MYDATA.EntireRow=True
MYDATA.Operation=">"
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.Exclude
MYDATA.SearchArea="entire data set"
MYDATA.Operation="="
MYDATA.Find="3"
MYDATA.Include
MYDATA.SearchArea="conc"
MYDATA.Find="4.3"
MYDATA.Include
Appending data
Remark *************************************************
Remark * Method: Append (intelligent)
Remark * This script appends one EXCEL data file to another EXCEL
Remark * data file. Both data sets have headers.
Remark *************************************************
set MYDATA=Data
MYDATA.Filename = "c:\winnonln\examples\testapp1.xls"
MYDATA.Filetype = "EXCEL"
MYDATA.Headers = True
MYDATA.Load
MYDATA.AppendFilename = "c:\winnonln\examples\testapp2.xls"
MYDATA.AppendFileType = "EXCEL"
MYDATA.Append
Merging data sets
rema ***************************************************
rema A simple example merging two data sets
rema ********************************************************
Set ANIMAL=Data
ANIMAL.Filename="c:\testpk\animal2.pwo"
WinNonlin
Users Guide
526
19
ANIMAL.FileType="PWO"
ANIMAL.Load
Set PLANT=Data
PLANT.Filename="c:\testpk\plant2.pwo"
PLANT.FileType="PWO"
PLANT.Load
merge.numdata=2
merge.indata(1)=ANIMAL
merge.indata(2)=PLANT
merge.sortvars=1
merge.sortvar(1,1)="Common"
merge.sortvar(2,1)="Common"
merge.includevars(1)=1
merge.includevar(1,1)="Animal"
merge.includevars(2)=1
merge.includevar(2,1)="Plant"
merge.run
Plots
Specifying uniform axes
Set MYDATA=Data
MYDATA.FileName="c:\winnonln\examples\profiles.pwo"
MYDATA.FileType="PWO"
MYDATA.Load
Plot.NumData=1
Plot.InData(1,1)="MYDATA"
Plot.SortVars(1)=1
Plot.SortVar(1,1)="Subject"
Plot.GroupVars(1)=1
Plot.GroupVar(1,1)="Form"
Plot.XVar(1)="Time"
Plot.YVar(1)="Conc"
Plot.OutGraph="MYOUTGRAPH"
Scripting
Examples of individual scripting operations
527
19
Plot.Run
MYOUTGRAPH.UNIFORM=True
MYOUTGRAPH.FileName="c:\winnonln\examples\exmpl_y.pco"
MYOUTGRAPH.FileType="PCO"
MYOUTGRAPH.Save
Saving multiple charts to separate metafiles
Rema ***************************************************
Rema This script runs the command file bg1.cmd. This file creates
Rema an output graph for only one profile, but has multiple
Rema diagnostic graphs.
Rema When complete, five .WMF files will be stored to the default
Rema directory: Plot001a.wmf, Plot001b.wmf, Plot001c.wmf.
Rema Plot001d.wmf and Plot001e.wmf
Rema ***************************************************
Set MYMODEL=Model
rema Load and Run bg1.cmd
MYMODEL.Filename="c:\winnonln\examples\bg1.cmd"
MYMODEL.FileType="ASCII"
MYMODEL.Load
rema Run the command file
Pk.OutData="MYOUTDATA"
Pk.OutGraph="MYOUTGRAPH"
Pk.Run
rema Save all plots as separate .WMF fles
MYOUTGRAPH.SaveAllPrefix="plot"
MYOUTGRAPH.filetype="wmf"
MYOUTGRAPH.SaveAll
Saving multiple charts to bitmap files
Rema ***************************************************
WinNonlin
Users Guide
528
19
Rema This script saves graphs created using a Sort variable to
Rema separate bitmap files. When finished, six files will be
Rema created - one for each level of the sort variables.
Rema These files are GRAF001a.bmp, GRAF002a.bmp,
Rema GRAF003a.bmp, Rema GRAF004a.bmp,
Rema and GRAF005a.bmp and GRAF006a.bmp.
Rema ***************************************************
Set MYDATA=Data
MYDATA.FileName="c:\winnonln\examples\profiles.pwo"
MYDATA.FileType="PWO"
MYDATA.Load
Plot.NumData=1
Plot.InData(1,1)="MYDATA"
Plot.SortVars(1)=1
Plot.SortVar(1,1)="Subject"
Plot.GroupVars(1)=1
Plot.GroupVar(1,1)="Form"
Plot.XVar(1)="Time"
Plot.YVar(1)="Conc"
Plot.OutGraph="MYOUTGRAPH"
Plot.Run
rema Save all plots
MYOUTGRAPH.SaveAllPrefix="graf"
Rema to create Windows Meta Files instead, use the filetype WMF.
MYoutgraph.filetype="BMP"
MYOUTGRAPH.SaveAll
Overlay plot
rema ***************************************************
rema * A simple plotting example, with Overlay
rema ***************************************************
Set IV=Data
IV.Filename="c:\WinNonln\examples\iv.pwo"
IV.FileType="PWO"
Scripting
Examples of individual scripting operations
529
19
IV.Load
Set ORAL=Data
ORAL.Filename="c:\WinNonln\examples\oral.pwo"
ORAL.FileType="PWO"
ORAL.Load
plot.numdata=2
plot.indata(1)=IV
plot.indata(2)=ORAL
plot.Xvar(1)="Subject"
plot.Yvar(1)="AUC"
plot.Xvar(2)="Subject"
plot.Yvar(2)="AUC"
plot.legend(1)="IV"
plot.legend(2)="Oral"
plot.run
Data transformations
Change from baseline
rema ***************************************************
rema * Change from baseline transformations
rema ***************************************************
Set MYRAWDATA=Data
MYRAWDATA.Filename="c:\temp\mydata.pwo"
MYRAWDATA.FileType="PWO"
MYRAWDATA.Load
TRANS.InData = MYRAWDATA
TRANS.function=trans_changebase
trans.sourcecol=conc
trans.extra="time"
trans.destcol="Change"
trans.destarea="Append"
MYRAWDATA.sortvars=2
WinNonlin
Users Guide
530
19
MYRAWDATA.sortvar(1)="Subject"
MYRAWDATA.sortvar(2)="Form"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_pctchange
trans.sourcecol=conc
trans.extra="time"
trans.destcol="PctChg"
trans.destarea="Append"
MYRAWDATA.sortvars=2
MYRAWDATA.sortvar(1)="Subject"
MYRAWDATA.sortvar(2)="Form"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_ratiobase
trans.sourcecol=conc
trans.extra="time"
trans.destcol="ratio"
trans.destarea="Append"
MYRAWDATA.sortvars=2
MYRAWDATA.sortvar(1)="Subject"
MYRAWDATA.sortvar(2)="Form"
trans.run
Other transformations
rema ***************************************************
rema * All transformations, except change from baseline
rema * transformations
rema ***************************************************
Set MYRAWDATA=Data
MYRAWDATA.Filename="c:\winnonln\examples\bguide1.dat"
MYRAWDATA.FileType="ASCII"
MYRAWDATA.Headers=True
MYRAWDATA.Delimiter=" "
MYRAWDATA.Load
Scripting
Examples of individual scripting operations
531
19
TRANS.InData = MYRAWDATA
TRANS.function=trans_ln
trans.sourcecol="conc"
trans.destcol="LnConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_log10
trans.sourcecol=conc
trans.destcol="LogConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_sqrt
trans.sourcecol=conc
trans.destcol="SQRTconc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_abs
trans.sourcecol=conc
trans.destcol="ABSConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_metabolite
trans.sourcecol=conc
trans.extra=time
trans.destcol="Metabolite"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_E
WinNonlin
Users Guide
532
19
trans.sourcecol=conc
trans.destcol="E_conc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_inv
trans.sourcecol=conc
trans.destcol="INVconc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_power
trans.sourcecol=conc
trans.extra=2
trans.destcol="PowerConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_mult
trans.sourcecol=conc
trans.extra=2
trans.destcol="MULTConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_div
trans.sourcecol=conc
trans.extra=2
trans.destcol="DIVConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_add
trans.sourcecol=conc
Scripting
Examples of individual scripting operations
533
19
trans.extra=2
trans.destcol="ADDConc"
trans.destarea="Append"
trans.run
TRANS.InData = MYRAWDATA
TRANS.function=trans_subtract
trans.sourcecol=conc
trans.extra=2
trans.destcol="SubtractConc"
trans.destarea="Append"
trans.run
WinNonlin.msgbox = 'Script finished'
Descriptive statistics
Desc.InData="MYRAWDATA"
Desc.SortVars=1
Desc.SortVar(1)="Subject"
Desc.SummaryVars=1
Desc.SummaryVar(1)="Conc"
Desc.OutData="MYDESCDATA"
Desc.Run
Modeling
Phamacokinetic or non-compartmental analysis using a command file
rema ******************************************************
rema * This is a sample WinNonlin Professional Script file that
rema * demonstrates a batch run that loads and processes a
rema * command file.
rema ******************************************************
Set MYMODEL=Model
rema Load and Run nca_sort.cmd
WinNonlin
Users Guide
534
19
MYMODEL.Filename="c:\wnlbeta\examples\nca_sort.cmd"
MYMODEL.FileType="ASCII"
MYMODEL.Load
Pk.OutData="NCADATA"
Pk.OutText="NCATEXT"
Pk.OutGraph="NCAGRAPH"
Pk.Run
WinNonlin Model Object
Prior to writing the script, develop the model specifications including differ-
ing profile-by-profile information on dosing, initial parameters, lambda_z
range specifications and partial area calculation. Save the model to a Phar-
sight Model Object file (.pmo).
Set MYMODEL = Model
MYMODEL.Filetype="pmo"
MYMODEL.Filename="c:\winnonln\examples\ncamodel.pmo"
MYMODEL.Load
Pk.OutData="MYOUTDATA"
rema text and graphics output objects, if any, may be named here
Pk.Run
ANOVA
rema ***************************************************
rema * Running an ANOVA
rema ***************************************************
ANOVA.Filename="c:\winnonln\examples\threeper.anv"
ANOVA.run
Tables
Using the Table Wizard
rema ***************************************************
rema * Creating a simple table using the Table Wizard.
Scripting
Examples of individual scripting operations
535
19
rema * File references below expect C:\WINNONLN\EXAMPLES
rema * to contain CLAYTON.PWO
rema ***************************************************
Set MYRAWDATA=Data
MYRAWDATA.Filename="c:\winnonln\examples\clayton.pwo"
MYRAWDATA.FileType="PWO"
MYRAWDATA.Load
TABLE.TableNum=3
TABLE.NumData=1
TABLE.GroupVars=1
TABLE.GroupVar(1)="Form"
TABLE.IDVars=4
TABLE.IDVar(1)="Subject"
TABLE.IDVar(2)="Period"
TABLE.IDVar(3)="Seq"
TABLE.IDVar(4)="Hour"
TABLE.RegVars=1
TABLE.RegVar(1)="Conc"
TABLE.Stats=True
TABLE.OutData=MYDATA
TABLE.RUN
MYDATA.Filename="c:\winnonln\examples\table1.pwo"
MYDATA.FileType="PWO"
MYDATA.SAVE
Using a table definition file
rema ***************************************************
rema * Creating a formatted table using the Table Wizard.
rema * File references below expect C:\WINNONLN\EXAMPLES
rema * to contain CLAYTON.PWO.
rema ***************************************************
Set MYRAWDATA=Data
MYRAWDATA.Filename="c:\winnonln\examples\clayton.pwo"
MYRAWDATA.FileType="PWO"
WinNonlin
Users Guide
536
19
MYRAWDATA.Load
TABLE.NUMDATA=1
TABLE.InData(1)=MYRAWDATA
TABLE.OutData=MYDATA
TABLE.DefinitionFile="C:\winnonln\examples\mytable.tdf"
TABLE.RUN
MYDATA.Filename="c:\winnonln\examples\table2.pwo"
MYDATA.FileType="PWO"
MYDATA.Save
Workspaces
Loading
rema *******************************************************
rema * Loading a workspace
rema *******************************************************
WinNonlin.Filename="c:\testpk\ncaoral.wsp"
WinNonlin.Load
Saving
rema ********************************************************
rema * Running an ANOVA and saving the files as a workspace
rema ********************************************************
ANOVA.Filename="c:\winnonln\examples\threeper.anv"
ANOVA.OutData="OUTDATA"
ANOVA.OutText="OUTTEXT"
ANOVA.run
OUTDATA.Filename="c:\winnonln\examples\AOVDATA.pwo"
OUTDATA.FileType="PWO"
OUTDATA.Save
Scripting
Examples of individual scripting operations
537
19
OUTTEXT.Filename="c:\winnonln\examples\AOVTEXT.PTO"
OUTTEXT.FileType="PTO"
OUTTEXT.Save
WinNonlin.FILENAME = "c:\winnonln\examples\mydata.wsp"
WinNonlin.SAVE
Units
The script command is pk.units=text file, where text file is a file containing
one unit per line. For example:
Remark WinNonlin.WindowState=Minimized
Set MYDATA1=Data
Set MYMODEL=Model
MYMODEL.Filename="MODEL.CMD"
MYMODEL.FileType="ASCII"
MYMODEL.Load
MYMODEL.DoseFile="DOSES.DAT"
MYMODEL.LamzFile="LAMBDAZ.DAT"
Pk.OutData=OUTDATA1
Pk.OutText=OUTTEXT1
Pk.Units="units.txt"
Pk.Run
Word export
The Word Export, ExportAll, is a method on the WinNonlin system object
with the same options as PrintAll. It sets which type of object to export. For
example, the following code would export all charts:
WinNonlin.PrintData = False
WinNonlin.PrintText = False
WinNonlin.PrintGraph = True
WinNonlin.PrintModel = False
WinNonlin.ExportAll
WinNonlin
Users Guide
538
19
539
Chapter 20
Scripting WinNonlin Using
Visual Basic
Automating WinNonlin features through VB
WinNonlin analysis and data handling functions can be scripted through
Visual Basic. COM-enabled applications, such as Microsoft Word or Excel,
can be used to develop Visual Basic scripts as macros. WinNonlin-specific
elements are covered here. See the Visual Basic or other Microsoft documen-
tation for details on Visual Basic (VB) programming. See the WinNonlin
Examples Guide for example VB scripts.
Summary of properties and methods
The following tables list object properties and methods applicable to each
WinNonlin software module. Syntax, arguments, and usage examples for the
individual properties and methods are available in the Visual Basic Automa-
tion Reference on page 725.
WinNonlin
Users Guide
540
20
Table 20-1. Summary of properties and methods for each module
Module Properties Methods
Chart AxisLabelsFont
AxisLabelsFontSize
AxisTitle
AxisTitleFont
AxisTitleFontSize
AxisUnits
CaptionPrefix
Changed
ChartCountForTab
ChartTitle
CurrentChartForTab
File Name
FileType
FootnoteFont
FootnoteFontSize
FormCaption
ID
Image
LegendFont
LegendFontSize
Name
PrintMulti
PrintMultiAcross
PrintMultiDown
ReadOnly
SaveAllPrefix
Source
Tag
TitleFont
TitleFontSize
Uniform
UUID
WindowState
EditCopy
LoadTemplate
MoveFirst
MoveLast
MoveNext
MovePrevious
PrintAll
PrintOut
Save
SaveAllCharts
SaveTemplate
Sheet
SortLevel
Charts Count Item (none)
Crossover InBook
OutBook
ResponseVar
SequenceVar
SortVars
SubjectVar
TreatmentAVar
TreatmentBVar
TreatmentData
TreatmentVar
Run
Deconvolution AlphaTerm
ATerm
Bolus
ConcVar
Delta
DoseUnits
InBook
InputLag
NumPoints
NumTerms
OutBook
OutChart
OutputFrom
OutputRange
OutputTo
Smoothing
SortVars
TimeVar
Run
DescStats BoxWhiskerPlot
Confidence
ConfidenceValue
InBook
MultiSheet
OutBook
OutText
Percentiles
SortVars
SummaryVars
WeightVar
Run
Scripting WinNonlin Using Visual Basic
Summary of properties and methods
541
20
LinMix File Name
OutBook
OutText Run
Merge CarryAlong
InBook1
InBook2
IncludeVars1
IncludeVars2
Missing
OutBook
SortVars1
SortVars2
Run
Model Changed
ID
ModelWindow
ModelWorkbook
Name
Source
Tag
UUID
LoadDoseFile
LoadLambdazFile
LoadLinkFile
LoadNamesFile
LoadParamFile
LoadPartialAreasFile
LoadUnitsFile
PK OutBook
OutChart
OutText
WordExportFilename
Run
RunWordExport
Plot AutoSort
ChartType
DownVar
ErrType
GroupVars
InBook
Intervals
Legend
NumBook
OutChart
ShowUnits
SortVars
Title
UpVar
UseGroupHeaders
UsePatterns
XTitle
XUnits
XVars
YTitle
YUnits
YVars
Run
PrintExportAll ChartFormat
FigureNum
FigureNumStart
IncludeCharts
IncludeModels
IncludeTextEditors
IncludeWorkbooks
LockOutput
LogCharts
MultipleChartsPerPage
MultipleChartsPer-
PageAcross
MultipleChartsPer-
PageDown
Orientation
PreserveTableFormats
SourceLine
TableNum
TableNumStart
ExportAll
PrintAll
Rule curRuleState
Name
NonNumericCode GetValue
IsUnConditional
LetValue
Table 20-1. Summary of properties and methods for each module (continued)
Module Properties Methods
WinNonlin
Users Guide
542
20
Semicompart-
mental
ConcVar
EffectVar
InBook
Keo
Method
OutBook
OutChart
SortVars
TimeVar
Run
StatusCodes bLLOQDefined
CarryAlongs
ConcCol
InBook
LLOQCol
OutBook
RSets
RuleSets
RuleSetsDest
RuSet
SortKeys
StatusCol
TimeCol
Run
Superposition ConcVar
DisplayDose
Dose
DoseTime
DosingType
InBook
InitialDose
MaintenanceDose
Method
NumDoses
NumPoints
OutBook
OutChart
RangeStart
RangeStop
SortVars
Tau
TermLower
TermPhase
TermUpper
TimeRepeat
TimeVar
LoadDoseFile
Run
Table AggregateVar
CrossVars
DataOnly
DefinitionFile
DescStats
GroupVarBreak
GroupVars
IDVars
InBook
JoinCrossVars
JoinGroupVars
JoinIDVars
NumBook
OutBook
PageFooter
PageHeader
RegVars
ShowUnits
TableNum
UnitsFormat
Run
Table 20-1. Summary of properties and methods for each module (continued)
Module Properties Methods
Scripting WinNonlin Using Visual Basic
Summary of properties and methods
543
20
TextEditor BottomMargin
CaptionPrefix
Changed
EditorText
EditorTextLength
EditorTextRTF
File Name
FileType
FindNextPos
FindString
FormCaption
ID
IsModel
LeftMargin
Name
PageHeight
PageWidth
ReadOnly
RightMargin
SelectionLength
SelectionStart
SelectionText
SelectionTextRTF
Source
Tag
TopMargin
UUID
WindowState
EditCopy
EditCut
EditDelete
EditPaste
Find
PrintOut
Save
SelectAll
TextEditors Count Item (none)
Wnl4 Copyright
Description
Version
Workspace
(none)
Workspace ActiveChart
ActiveFormType
ActiveModel
ActiveTextEditor
ActiveWorkbook
Changed
Chart
ChartCount
Charts
File Name
Model
ModelCount
SilentMode
TextEditor
TextEditorCount
TextEditors
WindowState
Workbook
WorkbookCount
Workbooks
Arrange
CloseAll
CloseChart
CloseModel
CloseTextEditor
CloseWorkbook
Load
NewChart
NewModel
NewTextEditor
NewWorkbook
NewWorkspace
OpenChart
OpenModel
OpenTextEditor
OpenWorkbook
RunScript
Save
ShowMsg
UnloadApp
WorkingDir
Table 20-1. Summary of properties and methods for each module (continued)
Module Properties Methods
WinNonlin
Users Guide
544
20
Workbook ActiveCol
ActiveRow
ActiveSheet
AppendFileName
AppendFileType
AppendSheet
AutoFileOptions
CaptionPrefix
CellFormula
CellFormulaRC
CellValue
CellValueRC
Changed
Clip
ColName
ColUnit
ConsecutiveDelimiters
Delimiter
File Name
FileType
FormCaption
Headers
ID
IsExcluded
IsExcludedRC
IsMissingVal
IsMissingValRC
LastCol
LastRow
Missing
Name
numSheets
NumSortKeys
NumSortKeysEx
ReadOnly
SearchArea
SearchCaseSensitive
SearchCompare
SearchReplaceValue
SearchRowMode
SearchTolerance
SearchValue
Selection
SelEndCol
SelEndRow
SelStartCol
SelStartRow
SheetName
ShowUnits
Sorted
SortKey
SortKeyEx
Source
Tag
UseFormats
UUID
WindowState
Append
ConvertUnits
EditCopy
EditCut
EditDelete
EditPaste
EditPasteValues
ExcludeSel
GetActiveCell
GetColNum
GetLastRowCol
IncludeSel
InsertCol
InsertRow
LastRowForCol
PrintAll
PrintOut
ResetExclusions
Save
Search
SearchExclude
SearchInclude
SearchReplaceAll
SetActiveCell
Sort
Transform
Workbooks Count Item (none)
Variable Column
DataType
ID
key
Mapping
Name
SortIndex
SortOrder
VarType
(none)
Variables (none) Add
AddEx
Count
Exists
Item
ItemsByType
Remove
RemoveAll
Table 20-1. Summary of properties and methods for each module (continued)
Module Properties Methods
Scripting WinNonlin Using Visual Basic
Automating Pharsight Knowledgebase Server functions
545
20
Automating Pharsight Knowledgebase Server functions
Visual Basic automation can be used to operate PKS/WinNonlin data opera-
tions. The properties and methods used to work with data from files stored
locally (e.g., load, save, etc.) can be applied, using the same syntax, to PKS
studies and scenarios. This requires that:
1. The user run the program PASSWORD.EXE, which is shipped with Win-
Nonlin, to encrypt and store the PKS password. The user ID is used to
encrypt the password. The user must copy and paste the password into the
pks file. See PKS file format on page 513.
2. Replace file names in the relevant operations (load, save, etc.) with the
PKS study name, followed by the extension .PKS.
3. Use the file type: FilePKS for those objects.
For Example, to load a PKS study called TestStudy into WinNonlin:
1. Get the file name:
sFile = sUnitTestFolder & "BG1_Dose.pwo"
2. Open the workbook:
Set objWorkbook1 = objWkspace.OpenWorkbook(sFile,
FileFWBook, nHeaders)
sFile = sUnitTestFolder & "Scenario.pmo"
3. Change the file to save back to, by pointing to a pks file with the study name:
sFile = sUnitTestFolder & "TestStudy.pks"
objWorkbook2.FileType = FilePKS
objWorkbook2.file name = sFile
4. Save to PKS:
objWorkbook2.save
To create a scenario, use the same method, using the scenario name:
sFile = sUnitTestFolder & "TestScenario.pks"
sStudyName = FixStudyName(sFile, sStudyName)
wrkBk.FileType = FilePKS
wrkBk.file name = sFile
wrkBk.save
WinNonlin
Users Guide
546
20
See also Scripting the Pharsight Knowledgebase Server on page 512 for
similar functions using the WinNonlin scripting language.
Visual Basic scripting
Any COM-enabled application can be used to create Visual Basic (VB)
scripts to run WinNonlin functionality. The instructions below use Microsoft
Word 2000, as an example of how this is done.
Creating a script using Microsoft Word 2000
To create a WinNonlin Visual Basic script using Microsoft Word 2000:
1. Start Microsoft Word.
2. Choose Tools>Macro>Macros... from the Word menus.
3. In the Macro name text box, type the script name.
4. Click the Create button.
Word will open a new macro in Visual Basic.
Scripting WinNonlin Using Visual Basic
Visual Basic scripting
547
20
5. A reference to the WinNonlin object model must be added. In the VBA win-
dow, choose Tools>References... from the menus. A dialog box will open
showing a list of references that may be added to the project.
6. Scroll down the list to find WinNonlin4 and check that entry.
7. Click OK.
8. After the reference is added, enter the desired Visual Basic code in the space
provided for the new macro.
WinNonlin
Users Guide
548
20
9. After entering the code, choose File>Close and Return to Microsoft Word
from the menus. At this point the macro is available to run at any time.
Running a script using Microsoft Word 2000
To run a WinNonlin VB macro from Microsoft Word 2000:
1. In Word, choose Tools>Macro>Macros... from the menus.
Any macros previously created should appear in the list. See Creating a
script using Microsoft Word 2000 on page 546 for instructions.
2. Select the desired macro and click Run.
The macro can launch WinNonlin (if not already running), and run commands
specified in the new script. See the WinNonlin Examples Guide for examples
of WinNonlin automation using Visual Basic and Microsoft Word.
549
Appendix A
Glossary
The following terms and definitions pertain specifically to objects and opera-
tions in WinNonlin and its operations with Pharsight Workbench Repository.
Italics indicate terms that are defined elsewhere in the glossary.
A
A In Modeling, the zero time intercept associated with the Alpha phase. In
Deconvolution A and alpha refer to the parameters of a polyexponential unit
impulse response function of the form:
UIR(t) = sum[A(j) * exp(-alpha(j) * t)], j = 1 . N.
absolute error
bars
Information that indicates the degree of precision associated with a parameter
estimate. It is displayed as an absolute quantity, not as a percentage of the esti-
mate.
actual time The time that a study dose or observation actually happened; this time may
differ from the nominal time.
absorption
rate
The rate at which the drug is absorbed into the central compartment. It is often
denoted as Ka or K01.
accumulation
index
actual clock
time
(PKS) A placeholder, available for the research data. It is not automatically
used in any WinNonlin calculations.
1
1 e
z
( )
[ ]
-------------------------------- =
WinNonlin
Users Guide
550
A
actual end
time
(PKS) A field that is used specifically for dose information. The duration of
infusions can be specified here.
Akaike
Information
Criteria (AIC)
A measure of goodness of fit based on maximum likelihood. When comparing
several models for a given set of data, the model associated with the smallest
value of AIC is regarded as giving the best fit out of that set of models. AIC is
only appropriate for use when comparing models using the same weighting
scheme.
for modeling in WinNonlin. N is the number
of observations with positive weight. WRSS is the weighted residual sum of
squares. P is the number of parameters.
In LinMix, it is defined as: where is the restricted
likelihood evaluated at converged estimates, and s is the rank of the fixed
effects design matrix plus the number of variance parameters, and variance
components for linear mixedeffects modeling calculations.
Alpha In modeling, the macro rate constant associated with the distribution phase.
In Deconvolution, A and alpha refer to the parameters of a polyexponential
unit impulse response function of the form:
UIR(t) = sum[A(j) * exp(-alpha(j) * t)], j = 1 . N.
Alpha half-life The half life associated with the macro constant Alpha. Sometimes denoted
ALPHA_HL.
Anderson-
Hauck pval
The p-value of the Anderson-Hauck test statistic. This is derived from a non-
central t distribution.
Anderson-
Hauck statistic
Test statistic applicable for testing equality of means in a bioequivalence
study. The test statistic t is:
where the 's are the respective sample means, and are the group sam-
ple sizes, and S is the estimate of the residual standard deviation. A and B are
the lower and upper limits.
AIC N WRSS ( ) log 2P + =
AIC 2 L
R
2S + = L
R
t
X
E
X
S
1
2
--- A B + ( )
S 1 n
E
1 n
S
+
---------------------------------------------- =
X n
E
n
S
Glossary
A
551
A
ANOVA
command file
(.anv)
An ANOVA command file (.ANV) contains all of the information required to
recall and reproduce a given ANOVA model, including the data set used.
These files are used in the Scripting Language to specify ANOVAs to be run.
See also command file and table definition file.
application log An application log file is produced by WinNonlin and viewed using the Log
Viewer application. The log file records many of the activities performed in
WinNonlin, including loading/creating of a data set; cutting and pasting of
regions; setting, clearing and converting units; PK/PD/NCA modeling results
and error messages; sorting, exclusions, inclusions, replacements, and other
revisions to data sets.
Controls for the application log are limited. Users can specify the size for the
log file (before it is purged) and can purge it manually.
AUC Area under a concentration of analyte vs. time curve. Theoretically, if C(t)
denotes the concentration of analyte at time t, then:
AUCINF AUC (area under a curve) extrapolated to infinity:
AUClast AUC (area under a curve) computed to the last observation:
AUMC Area under the moment curve:
AUMCINF Area under the moment curve when the time concentration curve is extrapo-
lated to infinity.
AUMClast Area under the moment curve computed to the last observation.
AUC
b
a
c t ( ) t d
a
b
=
AUC
0
AUC
t
l ast
0
AUMC
b
a
c t ( )t t d
a
b
=
AUMCINF AUMC
0
=
AUMClast AUMC
t
l ast
0
=
WinNonlin
Users Guide
552
A
B
B The zero time intercept associated with the beta phase.
balanced
design
An experimental design set is said to be balanced if the number of observa-
tions is the same for every combination of the experimental effects. For exam-
ple, for a crossover design with effects for formulation and period, each with
two levels, if each of the four combinations of formulation by period treat-
ment groups has the same number of observations, then the design is bal-
anced. If a subject drops out of one sequence, the design is no longer
balanced.
Beta Macro rate constant associated with the elimination phase.
Beta half-life The half life associated with the macro constant Beta. Sometimes denoted
BETA_HL.
bioequiva-
lence
Bioequivalence is said to exist when a test formulation has a bioavailability
that is similar to that of the reference. There are three types of bioequivalence:
average, individual, and population. Average bioequivalence states that aver-
age bioavailability for test formulation is the same as for the reference formu-
lation. Population bioequivalence is meant to assess equivalence in
prescribability and takes into account both differences in mean bioavailability
and in variability of bioavailability. Individual bioequivalence is meant to
assess switchability of products, and is similar to population bioequivalence.
bounds Upper and lower constraints on the initial parameter estimates for compart-
mental modeling.
The lower and upper values bound the range of values the parameters can take
on during the model fitting process. This can be very valuable if the parameter
values become unrealistic or the model will not converge. Although bounds
are not always required, it is recommended that Lower and Upper bounds be
used routinely. If they are used, every parameter must be given lower and
upper bounds.
The WinNonlin default bounds are 0 for one bound and 10 times the initial
estimate for the other bound. For models with parameters that may be either
positive or negative, user-defined bounds are preferred.
Glossary
C
553
A
box and
whiskers plot
The box and whiskers plot is designed to show the amount of distribution of
values. To include a box and whiskers plot as output, select the Box and
Whiskers check box. The plot appears in a separate text window.
Each profile will display an axis from the Min to the Max including their mid-
point. The box hinges are the 25th and 75th percentiles. The whiskers will end
at the Max and Min points unless there are outliers that are outside 1.5 times
the H-spread [the distance between the hinges] from the hinges. The median is
plotted as well.
If there are fewer than five data points, no plot is produced; the points are sim-
ply graphed.
BQL Below the lower limit of quantification (LLOQ) for a given assay.
C
C The zerotime intercept associated with the absorption phase for an extravas-
cular model or the zero time intercept associated with the gamma phase for a
3 compartment IV bolus model.
carry along
variables
Variables that are not required for the current analysis, but will be copied and
included in the output data set.
Cavg For steady-state data: computed as AUC(0- ) divided by .
CL Total body clearance. CL= Dose/AUC
classification
variables
Classification variables are the variables that have discrete sets of values such
as formulation, treatment and gender.
clock time Time expressed as a date and/or time, rather than relative to the first dose or
the start of a study.
CLR Renal Clearance.
WinNonlin
Users Guide
554
A
Clss, Clss/F For steady-state data: an estimate of the total body clearance. For extravascu-
lar models the fraction of dose absorbed cannot be estimated, therefore Clear-
ance for these models is actually Clearance/F where F is the fraction of dose
absorbed.
Cmax The peak or maximum concentration.
Cmin For steady-state data: the minimum concentration between 0 and (corre-
sponding to Tmin).
command file A Command file (.CMD) contains all of the information required to recall and
reproduce a given compartmental model or noncompartmental model, includ-
ing the data set used. Command files or WinNonlin model objects can be used
in the Scripting Language to include models to be run. See also ANOVA com-
mand file (.anv) and table definition file.
compound A drug molecule under study. It may include one or more formulations of that
drug. The concept is used especially in the PWR to group studies that are
investigating the same molecule.
COND Condition number of the matrix of partial derivatives. COND is the square
root of the ratio of the largest to the smallest eigenvalue of the matrix of par-
tial derivatives.
constant Dosing information such as number of doses, magnitude of each dose, and
dosing times are input as constants. Each library model requires specific dos-
ing information.
contrasts In LinMix, contrasts are linear combinations of levels of an effect, such that
the sum of the coefficients add to 0. For example, suppose that effect Trt has
three levels: Placebo, 10mg, and 20mg. To compare the two dose groups
against the placebo group, construct the contrast (Placebo=1, 10mg=-0.5,
20mg=-0.5). Note that 1-0.5-0.5=0, so this is a valid contrast. This contrast
compares the average of the 10mg and 20mg groups versus the placebo group.
convergence
criterion
The convergence criterion determines when WinNonlin can stop with a suc-
cessful fit. Convergence is achieved when the relative change in the residual
objective function is less than the convergence criteria.
Dose
AUC
0
---------------- =
Glossary
D
555
A
covariates Independent variables in a LinMix model. Generally, some subject character-
istic of interest, such as age, blood pressure, or body weight. Covariates are
continuous measurements.
crossed
factors
In a LinMix crossedclassification model every level of every factor could be
used in combination with every level of every other factor. In this way, the
factors cross each other. It is not required that data be available at every
intersection of the factors. See also nested factors.
cross variable In the Table Wizard, cross variables divide data into separate columns,
according to the value of the Cross variable(s).
curve stripping A graphical method for estimating parameters associated with models that can
be written as a sum of exponentials. This method can be used to determine ini-
tial estimates required as a prelude to nonlinear least-squares regression.
D
data history A data history worksheet is maintained as part of every workbook. This data
history tracks the history of that data set, including the source, sorting, data
changes, and analyses.
If a data set was generated by the system, e.g., descriptive statistics or com-
partmental modeling, the date and time stamp will be followed by the name of
the source data set from which it was generated, followed by a listing of any
missing or excluded values that were in the source data set.
After the initial loading/creating of a data set, the data history will contain
information about cutting and pasting regions; setting, clearing, and convert-
ing units; and PK/PD/NCA modeling errors. The data history worksheet will
also show any sorting that takes place, exclusions, inclusions, replacements,
added rows/columns, deleted rows/columns and transformations. It applies
only to the worksheets in the current workbook.
dependent
variable
Dependent variables have some functional relationship, possibly unknown, to
the independent variables. A variable such as drug concentration is usually
a dependent variable because it depends on factors like formulation,
period, or time of sample.
descriptive
statistics
Summary statistics of variables in data grids. The output from Descriptive
Statistics includes: N, Nmiss, Nobs, Mean, Standard Deviation, Standard
Error, Variance, Minimum, Median, Maximum, Range, CV%, Geometric
WinNonlin
Users Guide
556
A
Mean, Harmonic Mean, Mean of the logs, Standard Deviation of the logs,
skewness, kurtosis, and pseudo standard deviation. Percentiles and Confi-
dence Intervals may also be included.
dosing
regimens
The schedule of dosing. This information normally includes the designated
dose and the time of the dose. It may also include the dose cycle, the sched-
uled times for observations, etc., depending on the particular model's require-
ments.
down variable This option appears on the Error Bars tab of the Chart Wizard. It specifies a
variable to be used as down error bar values. If a group variable exists, error
bars will be placed at each of the subsetted data points.
E
E Used to denote Effect.
EC50 Concentration that causes 50% of the effect.
eigenvalue An eigenvalue of matrix A is a number , such that for some vector
x, x is the eigenvector. Eigenvalues and their associated eigenvectors can be
thought of as building blocks for matrices.
The eigenvalues included in WinNonlin's modeling output are associated with
the variance - covariance matrix. For compartmental modeling, WinNonlin
prints a condition number which is equal to the square root of the ratio of the
largest to the smallest eigenvalue. Very large values of the condition number
may be indicative of instability in the model fitting process.
elimination
rate
The rate at which the drug is eliminated from a compartment.
E0 Effect at time 0.
Emax Maximum effect.
engine Scripting Language Engines, also known as modules, execute tasks in Win-
Nonlin. WinNonlin engines are: PK, DESC, ANOVA, PLOT, TABLE,
TRANSFORM, MERGE, LINMIX, BIOEQUIVALENCE.
error bars Graphical elements on a plot that depict ranges of variability from a specific
data point. Error bars may be placed above and/or below the actual data value,
Ax x =
Glossary
F
557
A
and can be drawn as relative (e.g., standard error) or absolute variances (e.g.,
min/max).
exponential
curve stripping
A graphical method for estimating parameters associated with models that can
be written as a sum of exponentials. This method can be used to determine ini-
tial estimates required as a prelude to nonlinear least-squares regression.
extravascular Denotes drug administration via routes other than directly into the blood
stream. Oral, intramuscular and topical are examples of extravascular admin-
istration.
F
first-order Used to denote rate constants when the transfer rates are proportional to the
amount in the source compartment.
first row
headers
An option on the File Open dialog for ASCII and Excel files which allows
specification of column headers in the first row of data. WinNonlin will trans-
form the headers located in the first row of data to column headings.
fixed effects generally associated with explanatory variables, as in a standard linear model.
The variables can be either qualitative, as in traditional ANOVA, or quantita-
tive, as in standard linear regression.
% fluctuation For steady-state data: % fluctuation is computed as 100*(Cmax-Cmin)/Cavg,
where Cmin and Cmax were obtained between 0 and Tau.
formulation The point of dose input into a structural (PK/PD) model.
FORTRAN
notation
Syntax used in the FORTRAN programming language. For example, EXP(-
K01*t) is the constant e with an exponent of the negative product of time, t
and the rate constant K01.
function
variable
A variable in the data set that indicates which observations belong with which
functions. This allows fitting multiple functions to one data set. Function vari-
ables are required for simultaneous link models.
G
Gamma The terminal elimination rate associated with a three compartment, first-order
model. Sometimes denoted GAMMA_HL.
WinNonlin
Users Guide
558
A
Gamma half-
life
The halflife associated with the macro constant Gamma.
Gauss-
Newton
algorithm
A model fitting algorithm. Modifications of the Gauss-Newton algorithm
include the Hartley and Levenberg modifications. Hartley Modification: This
method is not as robust as others but is very fast. Levenberg Modification: A
model fitting algorithm that performs well on a wide class of problems,
including ill-conditioned data sets. This method requires the estimated vari-
ance - covariance matrix of the parameters, however the Levenberg modifica-
tion suppresses the magnitude of the change in parameter values from
iteration to iteration to a reasonable amount. This method is used as the
default in WinNonlin.
geometric
mean
The geometric mean is the nth root of the product of the n Y's: GM =
. This requires that each Y > 0.
group
variables
In the Chart Wizard, a group variable is used to break the data into separately
plotted data lines.
For the Table Wizard, Group variables are much like ID variables, with the
exception that only unique values of Group variables are printed. That is, they
are only printed when their value changes. The value of the Group variables is
also printed if values from a group go over a page break. Multiple group vari-
ables may be used. Note that Group variables may appear as a column in the
body of the table, or as an information line above the column titles. Use the
Options command from the Tools menu to make this selection.
In LinMix, group variables allow for heterogeneity of variances while retain-
ing the same mean model.
H
harmonic
mean
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals
of the Ys (Y > 0).
Y
1
Y
2
Y
3
Y
n
n
HM
1
n
---
1
Y
---
\ .
| |
1
=
Glossary
I
559
A
I
ID variables These variables are used by the Table Wizard to identify data in adjacent
Data variable columns. When summary statistics are selected these vari-
ables are not considered. Note that multiple ID variables may be used, and
that this may be a convenient way to include units.
increment for
partial
derivatives
Nonlinear algorithms require derivatives of the models with respect to the
parameters. The program estimates these derivatives using a forward differ-
ence. For example:
where = Increment times the parameter value. The default is 0.001.
independent
variable
The independent variables are controlled by the experimenter (e.g., formula-
tion) or do not depend on other factors.
indirect
response
models
The measured response, R, to a drug may be produced by an indirect mecha-
nism. Factors controlling the input or production, kin, of a response variable
may be either inhibited or stimulated, or determinants of loss, kout, of the
response variable may be inhibited or stimulated.
initial
parameter
estimates
Initial values for the parameters. All iterative estimation procedures require
initial estimates of the parameters.
interaction Interaction is the degree to which the effect of one factor is different with
varying values of another factor. For example, if a treatment has a different
effect in one period than it does in another period, then Treatment and Period
are said to interact.
Interaction terms would be included in a LinMix or Bioequivalence model
using the * symbol: Treatment*Period.
intercept For LinMix ANOVA and regression models, the value of the response when
all effects are zero.
IPR Indirect Pharmacodynamic Response Model.
iterations An option on the Settings tab of the Model Options dialog box that may be
used to limit the maximum number of times WinNonlin will update the esti-
mates. The default for Gauss-Newton type method is 50 and the Nelder-Mead
F d
P 1 ( ) d
--------------
F P 1 ( ) + ( ) F P 1 ( ) ( )
---------------------------------------------------------
WinNonlin
Users Guide
560
A
simplex method is 500. Usually these are adequate for most problems. If the
number of iterations is set to zero, all output will be based on using the initial
estimates as the final parameters.
iterative
reweighting
A weighting scheme where weights associated with the individual observa-
tions are functions of the predicted values.
J
K
K half-life The halflife associated with the rate constant K. Sometimes denoted K_HL.
K01 The rate at which the drug enters the central compartment from outside the
system. It is sometimes denoted as Ka.
K10 The rate at which the drug leaves the system from the central compartment.
The elimination rate.
K10 half-life The halflife associated with the rate constant K10. Sometimes denoted
K10_HL.
Kij For first-order rate constants; the rate from Compartment i to Compartment j.
K0 Zero-order input or infusion rate constant.
KM Michaelis constant for models involving nonlinear kinetics.
L
lag time (LT) Lag time is a time delay between drug administration and the onset of drug
absorption. An example of such a process is the stomachemptying time, fol-
lowing oral administration of a drug which is not absorbed from the stomach.
When a drug is administered by bolus intravenous injection there is no lag
phase.
Lambda Z (
z
) First order rate constant associated with the terminal (log-linear) portion of
the curve. This is estimated via linear regression of time vs. log concentration.
Glossary
M
561
A
least squares
fitting
In least squares fitting, the estimates are those which minimize the sum of the
squares of the deviations between the observed values and the values pre-
dicted by the model.
least squares
means
Least squares means are estimates of what the mean values would have been
had the data been balanced. That is, least squares means are the means pre-
dicted by the fixedeffects model. If a data set is balanced, the least square
means will be identical to the raw (observed) means.
linear kinetics A model in which the transfer rates are first order.
linear
regression
A model relating an independent variable to dependent variables such that the
unknown parameters enter into the model linearly.
In the simplest case of regression, a straight line is fit to the data. The inter-
cept and slope are determined by the method of least squares. The slope and
intercept are called coefficients, or parameters, of the model.
LLOQ Lower limit of quantification, the concentration whose lower bound (of vari-
ability in the assay) includes zero. Analyte may be detectable below this con-
centration even though it is not quantifiable.
lower
constraint
Lower boundary on possible values of a model parameter.
M
macro rate
constants
Compartmental models involving first order kinetics can be written as a sum
of exponentials. The parameters associated with the sum of exponentials are
called macro rate constants and are functions of the underlying micro rate
constants.
max The maximum value.
mean The arithmetic average.
mean of the
logs
Arithmetic average of the logs of the Ys.
mean square The variance is normally a function of weighted residual SS/df, or the Mean
Square. For certain types of problems, when computing the variance the mean
square needs to be set to a fixed value.
WinNonlin
Users Guide
562
A
It is possible to use a specified value other than the residual mean square in
the estimates of the variances and standard deviations. The value specified
here replaces the residual sum of squares in the estimates of variances and
standard deviations.
method In compartmental modeling using a command file, the METHOD command
specifies the type of fitting algorithm WinNonlin is to use in fitting a model.
The argument N takes the values in table A-1.
In noncompartmental analysis, the METHOD command specifies the method
to be used to compute area under the curve (AUC). The argument N takes on
the values shown in table A-2.
method
(scripting)
A method in the Scripting Language is a set of computer code that performs
functionality on a particular object or engine. In short, it invokes an action.
For example, the Method 'LOAD' causes an associated data files (an Object)
to be loaded. The Method 'RUN' causes an associated PK Model (Engine) to
run the model.
Table A-1. Compartmental modeling methods
1 Nelder-Mead Simplex
2 (default) Levenberg and Hartley modification of Gauss-Newton
3 Hartley modification of Gauss-Newton
Table A-2. Noncompartmental analysis methods
1 Linear/Log Trapezoidal MethodLinear trapezoidal
rule up to Tmax, and log trapezoidal rule for the
remainder of the curve
2 (default) Linear trapezoidal Method with linear interpolation
3 Linear Up/Log Down MethodLinear trapezoidal rule
any time that the concentration data is increasing and
the logarithmic trapezoidal rule when the concentra-
tion data is decreasing
4 Linear trapezoidal method with linear/log interpolation
Glossary
N
563
A
Michaelis-
Menten
A type of model often employed for models involving nonlinear kinetics. The
Michaelis-Menten equation is:
micro rate
constants
Transfer rates associated with a compartmental model.
min The minimum value.
minimization The Minimization field on the Model Options dialog box allows the user to
specify the minimization method to be used when doing modeling. See
Method.
MM.LIB The ASCII library file containing the Michaelis-Menten models. To use a
model from this library, select ASCII Model from the WinNonlin Models sec-
tion of the Library of Models dialog box, and indicate the model number
(301-304). This file is provided in the WinNonlin installation in the \LIB
directory.
model size Model size may range from 1 to 64. The default size is 4. Model size is only
applicable when using ASCII models. Model size sets default memory
requirements.
MRT Mean Residence Time is the average amount of time a particle remains in a
compartment or system.
MRTINF Mean Residence Time when the drug concentration profile is extrapolated to
infinity. This can be estimated from single dose data or steady state data.
MRTlast Mean Residence Time when the drug concentration profile is not extrapolated
to infinity, but rather is based on values up to and including the last measured
concentration.
MRT
last
= AUMC
last
/ AUC
last
N
N The number of observations with non-missing data.
Nmiss The number of observations with missing data.
V V
max
C K
m
C + ( ) =
MRT AUMC AUC =
WinNonlin
Users Guide
564
A
Nelder-Mead
Simplex
algorithm
A model fitting algorithm that does not require the estimated variancecova-
riance matrix as part of its algorithm. It often performs very well on ill-condi-
tioned data sets (data sets that do not contain enough information to precisely
estimate all of the parameters in the model). When used to fit a system of dif-
ferential equations, it can be extremely slow unless the model has been com-
piled.
nested factors In a nested classification, unlike a crossed classification, the levels of the
nested factor are unrelated to one another and are nested within a level of
another factor.
For example, in a crossover study, Subjects are assigned to Treatment
Sequences. Subjects are not crossed with Sequences, because the subjects
within one sequence are unrelated to the subjects within another sequence.
Nested factors are included in a LinMix or bioequivalence model using paren-
theses:
Subject(Sequence)
See also crossed factors.
Nobs The number of observations.
nominal time The time specified in the protocol for a dose or observationwhich may dif-
fer from the actual time that a dose or observation was taken.
noncompart-
mental analy-
sis
Noncompartmental, or Model Independent Analysis describes the concentra-
tion-time curve by estimating noncompartmental parameters such as: area
under the curve (AUC), Tmax, Cmax, and Lambda z (the rate constant associ-
ated with the terminal elimination phase), among others.
Noncompartmental parameters are estimated using the Linear or Linear/Log
trapezoidal rule. If lambda z can be estimated, then the noncompartmental
parameters will be extrapolated to infinity.
nonlinear
kinetics
Kinetics that can be modeled by nonlinear differential equations, for example,
V
c d
t d
-----
V
max
C
K
m
C +
----------------- =
Glossary
O
565
A
nonlinear
model
In nonlinear models, at least one of the parameters appears as other than a
coefficient of an independent variable. One such model is the sum of two or
more exponentials, such as Y = A1*exp(-B1*X) + A2*exp(-B2*X).
A nonlinear model is one for which one or more of the partial derivatives with
respect to the model parameters involve model parameters. Note that nonlin-
ear models may arise from compartmental models having either linear or non-
linear kinetics.
nonlinear
regression
The process of fitting nonlinear models to data.
number of
predicted
values
An option of the PK Settings tab in the Model Options dialog box which
allows the specification of the number of points in the Predicted Data file. Use
this option to create a data set to be used to plot a smooth curve. The mini-
mum allowable value is 10 and the maximum is 20,000.
If the number of derivatives is greater than 0 (i.e., differential equations are
used), this command is ignored and the number of points is equal to the num-
ber of points in the data set. For compiled models without differential equa-
tions the default value is 1000.
The default for user models is the number of data points. This value may be
increased only if the model has only one independent variable.
O
ODBC Open Database Connectivity. A standard for data exchange, in common use
on Microsoft Windows platforms. It is an application programming interface
(API) for database access that uses Structured Query Language (SQL) as its
database access language.
object In object-oriented programming languages, objects are described by Proper-
ties, and acted upon by Methods. In WinNonlin, there are five objects: Data
objects, Text objects, Model objects, Graph objects, and WinNonlin itself.
P
partial tests LinMix tests of whether each model term contributes to the fit after all other
model terms have been included. Partial tests are invariant to the model speci-
fication order.
WinNonlin
Users Guide
566
A
percentiles The p
th
percentile divides the distribution at a point where p percent of the
distribution are below this point.
pharmacody-
namic (PD)
models
Models that are used to model effect as a function of a drug concentration.
pharmacoki-
netic (PK)
models
Models that are used to model drug concentrations as a function of time.
PK / PD Link A PK/PD Link model uses the pharmacokinetic concentration data to estimate
concentrations at an effect site which are then used to model the pharmacody-
namics.
planar
confidence
interval
A confidence interval obtained from the tangent planes to the joint confidence
ellipsoid of all the parameter estimates.
power As employed in WinNonlin's Bioequivalence Wizard, this is the probability of
detecting a difference greater than or equal to a specified percentage of the
reference mean.
profile A set of observed data to be fit at one time, producing one set of individual
model parameters. A profile is identified as data records with a given, unique
set of values for all sort variables.
profile header A Header that appears at the top of the first page of every profile in the ASCII
output. The Profile Header may contain the processing time and/or sort infor-
mation.
propagate
final estimates
When this option is selected, the final estimates from each sort level are used
as the initial estimates for the next sort level. This option may be used with
each of the three parameter calculation methods.
property Every object in the Scripting Language has properties that define how the
object should appear and interact with the user. It also sets a value for an
object or engine. In short, properties are attributes or characteristics of an
object.
Glossary
Q
567
A
Q
R
random effect also known as covariance parameters, distinguish a linear mixed effects
model from a standard linear model. In general, random effects parameters are
additional unknown random variables assumed to impact the variability of the
data. The variances of the random effects parameters, commonly known as
variance components, become the covariance parameters for this structure.
range The maximum minus the minimum value.
rank Rank of the matrix of partial derivatives. If the matrix is of full rank, Rank= #
of parameters. If the Rank is less than the number of parameters, then there is
not enough information contained in the data to estimate all of the parameters
in the model.
regressors In a LinMix model, regressor variables or covariates are independent vari-
ables that employ values from a continuous set (e.g. temperature, body
weight), rather than categories.
relative actual
time
(PKS) The time that observations or doses really happened, as opposed to rel-
ative nominal time. See also relative nominal end time.
relative actual
end time
(PKS) Times when infusion doses actually ended, as opposed to relative nom-
inal end time. See also relative nominal end time.
relative error
bars
Relative error information is plotted as an offset from the original data value.
relative
nominal time
(PKS) Scheduled dose and observation times, as set in the study protocol.
Compare with relative actual time. See also relative nominal end time.
relative
nominal end
time
(PKS) Times when infusion doses were scheduled to end, as set in the study
protocol. Compare with relative actual end time. See also relative nominal
end time.
relative time Elapsed time since the first dose or the beginning of the study, period or
phase.
residuals Observed minus predicted values, where the predicted values come from fit-
ting the specified model.
WinNonlin
Users Guide
568
A
route of
administration
The dose administration as Extravascular, Bolus Injection or Constant Infu-
sion.
S
S Standard error of the weighted residuals: where WRSS
is the weighted residual sums of squares, and DF is the number of observa-
tions minus the number of zero weights and the rank of the variance/covari-
ance matrix.
sampling
times
The actual times at which the concentration or effects are observed.
scenario (PKS) A structural model, initial parameters, and/or statistical tests to be
applied to a data set for fitting or analysis. See also study.
SBC Schwartz Bayesian Criteria. A measure of goodness of fit based on maximum
likelihood. When comparing several models for a given set of data, the model
associated with the smallest value of SBC is regarded as giving the best fit out
of that set of models. Schwartz Criteria is only appropriate for use when com-
paring models using the same weighting scheme.
For LinMix, the SBC calculation is:
where is the restricted log-likelihood function evaluated at final esti-
mates and ; r is dim(x); s is the number of parameters; and N is the num-
ber of observations.
script file A script file (*.psc, *.wsc) is an ASCII file that contains WinNonlin scripting
code.
SD The standard deviation.
SD of the
Logs
Standard deviation of the logs of the Ys.
SE The standard error.
S WRSS ( ) DF ( ) =
SBC NOBS WRSS ( ) log NOBS ( ) log NPARM + =
SBC 2 L
R
s N r ( ) log + =
L
Glossary
S
569
A
secondary
parameters
Parameters that are functions of the primary model parameters. For example,
AUC and half lives are secondary parameters.
The standard errors of the secondary parameters are obtained by computing
the linear term of a Taylor series expansion of the estimates. As such, they
represent about the third level of approximation and must be regarded with
caution.
SE - Yhat Standard error of Predicted Y.
sequential
tests
Tests each model term for significant improvement in fit, in sequence.
Depends upon the order that model terms are written.
sigmoid Denotes the S shaped nature of certain models.
simulations Given a model and time points, requesting WinNonlin to perform a simulation
causes predicted values to be generated. These simulations can be used to:
view the shape of the model being simulated, predict concentration as a func-
tion of varying doses or regimens, or aid in determining optimal sampling
times.
sort variables A separate analysis or plot is done for each level of the sort variable(s). If gen-
der and smoking are sort variables, a separate set of analysis results or plots
will be created for each of female non-smokers, male non-smokers, female
smokers and male smokers.
stripping dose Dose associated with initial parameter estimates for macro constant models.
For models that can be written as a sum of exponentials, dose does not explic-
itly appear in the model. Rather, the macro constants are themselves a func-
tion of dose. Thus, when fitting macro constant models where the user
specifies the initial estimates, the user must specify the dose associated with
the macro constants. For single dose macro constant models, where WinNon-
lin is requested to determine initial parameter estimates by curve stripping, the
stripping dose is identical to the administered dose.
structural
model
The set of functions defining the shape of a model, i.e., a structural PK, PD, or
PK/PD model. It does not include parameter distributions.
study (PKS) A study consists of a collection of data that can include observations,
dosing, and protocols and one or more scenarios.
summary
variables
The variable(s) for which descriptive statistics will be calculated.
WinNonlin
Users Guide
570
A
T
table definition
file
A table definition file contains information used to format a table. A table def-
inition file (.TDF) stores a user-defined table format that can be used repeat-
edly. See also Table definition files on page 204.
Tau () The (assumed equal) dosing interval for steady-state data.
TI The length of infusion.
Tmax The time of peak concentration.
Tmin For steady-state data: time of minimum concentration based on samples col-
lected during a dosing interval.
transform Performs a mathematical operation on the data. The transformations available
in WinNonlin include: natural log, log base 10, square root, absolute value,
change from baseline, percent change from baseline, ratio from baseline, x*y,
x/y, x+y, x-y, eX, 1/X, Xn, X*n, X/n, X+n, X-n. Some of these require only
the column that is to be transformed, while others require the input of a con-
stant, and still others require that a second column be specified.
treatment A combination of one or more drugs given at specific doses and time(s).
treatment
contrasts
See contrasts.
U
univariate
confidence
interval
A confidence interval based on standard error. The univariate confidence
interval does not take into account correlations with other parameters.
up variable This option appears on the Error Bar tab of the Chart Wizard. It allows the
specification of a variable to be used as up error bar values. This data will
appear as error bars in the upward direction of the X/Y data points. If a group
variable exists, error bars will be placed at each of the subsetted data points.
upper
constraint
Upper boundary on possible values of a model parameter.
user libraries Libraries of models defined by the user.
Glossary
V
571
A
V
V Volume of distribution of the central compartment. This is also denoted V
C
.
variance The variance, v, in descriptive statistics is defined by the expression:
Note: .
vars These are variables that go into the body of the table. When summary statis-
tics are requested, they will be computed for these variables.
VIF Variation Inflation Factor. VIF is the multiplier of the residual mean square
that is used in deriving the asymptotic variance of the parameter estimates.
The VIF is useful when performing simulations, to determine optimal experi-
mental designs. A smaller value is better.
Vmax Theoretical maximum rate of process described by Michaelis-Menten kinet-
ics.
Vss Volume of distribution at steady state: Vss = MRT * CL, where MRT = Mean
Residence Time and CL= total body clearance.
Vss For steady-state data: an estimate of the volume of distribution at steady-state.
(Not computed for Model 200). Vss = MRT * CL
VZ, VZ/F Volume of distribution based on the terminal phase. For extravascular models,
the fraction of dose absorbed cannot be estimated. Therefore, Volume for
these models is actually Volume/F, where F is the fraction of dose absorbed.
W
weight
variable
(LinMix)
A variable from the Variable Collection can serve as the Weight Variable. The
Weight Variable must be a column with numeric data. The Weight Variable
should not be a classification variable. It can be a regressor. It can also be used
in the model. It is used to compensate for observations having different vari-
ances. The weight variable should have values that are proportional to recip-
rocals of variances. When using a weight variable, the whole row of data gets
multiplied by the square root of the corresponding weight.
v Y
i
Y ( )
2
n 1 ( )
i 1 =
n
=
SD v =
WinNonlin
Users Guide
572
A
weighted
computed Y
Square root of the weight times Y Predicted.
weighted
predicted Y
Predicted Y times the square root of the weight.
weighted
residual Y
Residual Y times the square root of the weight.
weighted - SS Weighted Sum of Squared Residuals. See also WRSS.
weighting
Scheme
Allows weighting such as Uniform weighting, 1/Y, 1/(Y*Y), 1/SQRT(Y) or
Weights with Data.
Westlake
confidence
interval
Confidence intervals that are constrained to be symmetric about 100%.
workspace A workspace can contain all of the child windows (and files represented in
them) for a WinNonlin project. The entire project can be saved with a single
command and later reopened, again with a single command. When the work-
space file is opened, all of the child windows are opened and positioned as
they had been.
WRSS Weighted residual sums of squares, an estimate of the variance of the residu-
als. This is the quantity WNL minimizes during modeling.
X
X variable The independent variable to be used in PK modeling or Noncompartmental
analysis. Normally this variable is a measure of time.
Y
Y variable The dependent variable to be used PK modeling or Noncompartmental analy-
sis. Normally this variable is Concentration.
573
Appendix B
WinNonlin Model Libraries
Parameterization and equations for WinNonlin
compiled and ASCII models
WinNonlin is distributed with an extensive library of models, including mod-
els for most of the commonly used one, two and three compartment pharma-
cokinetic (PK), pharmacodynamic (PD), link, indirect response
A
, Michaelis-
Menten, and noncompartmental analyses. The following models are included
in the library of compiled models and detailed in the sections below, follow-
ing the syntax noted under Notation and conventions on page 574.
Some of the libraries are provided as ASCII (text) models; others are com-
piled into machine language. Each PK and PD model is included in both
ASCII and compiled forms. Compiled models run faster. The ASCII versions
provide the user with examples and starting templates for custom models.
Note: When using the ASCII models, be sure to examine the ASCII code to ascer-
tain what dosing constants need to be created.
A. Dayneka NL, Garg V, Jusko W (1993); Jusko W (1990); Nagashima R, OReilly RA, Levy
G (1969).
Table B-1. Model libraries
Model Compiled ASCII
Pharmacokinetic models on page 575 Yes Yes
Pharmacodynamic models on page 596 Yes Yes
PK/PD link models on page 602 Yes No
Indirect response models on page 605 Yes No
Michaelis-Menten models on page 609 No Yes
Simultaneous PK/PD link models on page 612 No Yes
WinNonlin
Users Guide
574
B
Although WinNonlin can be used to estimate the parameters in any system of
nonlinear equations, these libraries contain classical PK and PD models. Note
that it is possible to create custom libraries of models. The means of doing this
is described under User Models on page 273.
Notation and conventions
WinNonlin Model Libraries number the central compartment 1, and the exte-
rior to the compartments, zero. First-order rate constants are expressed as Kij,
meaning the rate from Compartment i to Compartment j. Thus, K01 is the rate
at which drug enters the central compartment from outside the system, and
K10 is the rate at which drug leaves the system from the central compartment.
For some models there are secondary parameters such as half-lives and areas
that are computed from the estimates of the primary parameters of the model.
WinNonlin computes estimates and estimated standard errors of these second-
ary parameters. For the two and three-compartment models some pharmacok-
ineticists prefer to estimate the micro rate constants (Kij) as primary
parameters; others prefer to estimate the macro rate constants (alpha and beta)
as the primary parameters of the models. The WinNonlin libraries contain
both forms of these models. Thus, Model 11, for example, is the two-compart-
ment model with first-order input and alpha and beta as secondary parameters
and Model 13 is the same model with alpha and beta as primary parameters
and the rate constants K01, K12, and K21 as secondary parameters.
Since these models are normally used to model concentration as a function of
time, t is the independent variable, and C(t) is the mathematical equation
being fit to the observations. All of the models require the dose(s) and time(s)
of dosing to be input as a constant(s). In addition, for those models defined in
terms of the macro constants, the dose associated with the initial parameter
estimates (this dose is hereafter referred to as the stripping dose) must also be
input. The reason for this is as follows. Such models can be written as:
Note that the dose, D, does not appear directly in the expression for C(t).
Instead, the intercepts, {A
i
}, are functions of D (as well as the micro con-
stants). In order for WinNonlin to be able to fit multiple dose data to macro
constant models, the stripping dose (D) must be input. WinNonlin actually
defines the macro constants model as:
C t ( ) A
i
i
t ( ) exp
=
WinNonlin Model Libraries
Pharmacokinetic models
575
B
where D
j
denotes the j
th
administered dose. Writing the model in this way
enables WinNonlin to fit multiple dose data for the macro constant models.
With the exception of the Noncompartmental Analysis models WinNonlin
models assume that the Time variable has been coded such that the time of the
first dose is 0. This applies whether using WinNonlin for modeling or simula-
tion.
The factor that changes amount to concentration is denoted as V, volume. In
absorption models there is no way to estimate both volume and fraction of
dose absorbed, so both of these are included in V (thus V/F is estimated where
F is the fraction of the dose that was absorbed).
The presentation of the mathematical equations of the models follows FOR-
TRAN notation. For example, EXP(-K01*t) is the constant e with an expo-
nent of the negative product of time, t and the rate constant K01.
The models with first-order input are presented with and without a lag time.
Since this amounts only to a shift on the time axis, the lag time is not explic-
itly shown in the expression for C(t), and the estimated Tmax should have the
lag time added to it for those models which include a lag time.
Note: For discussion of one and two-compartment models with first-order exchange
see Gibaldi and Perrier (1982).
Pharmacokinetic models
The WinNonlin Model Libraries include 19 pharmacokinetic (PK) models.
Each is available in both compiled and ASCII text forms.
C t ( ) D
j
A
i
D
-----
i
t ( ) exp
j
=
Model Input Number of
compartments
Parameterization Lag
time
Elimination
rate
Model 1 IV-bolus 1 - no 1st order
Model 2 IV-infusion 1 - no 1st order
Model 3 1st order 1 - no 1st order
Model 4 1st order 1 - yes 1st order
Model 5 1st order 1 K10 = K01 no 1st order
n
WinNonlin
Users Guide
576
B
Note: All models except models 15-17 accept multiple dose data.
The models shown in this section give equations for compartment 1 (central).
ASCII models and files
WinNonlin PK models are available as compiled models, and also in the
ASCII library files PK1.LIB - PK10.LIB, as follows.
Model 6 1st order 1 K10 = K01 yes 1st order
Model 7 IV-bolus 2 micro no 1st order
Model 8 IV-bolus 2 macro no 1st order
Model 9 IV-infusion 2 micro no 1st order
Model 10 IV-infusion 2 macro no 1st order
Model 11 1st order 2 micro no 1st order
Model 12 1st order 2 micro yes 1st order
Model 13 1st order 2 macro no 1st order
Model 14 1st order 2 macro yes 1st order
Model 15 IV-bolus plus
IV-infusion
1 micro no 1st order
Model 16 IV-bolus plus
IV-infusion
2 micro no 1st order
Model 17 IV-bolus plus
IV-infusion
2 macro no 1st order
Model 18 IV-bolus 3 macro no 1st order
Model 19 IV-infusion 3 macro no 1st order
Model Input Number of
compartments
Parameterization Lag
time
Elimination
rate
Model # File name
1, 2 PK1.LIB
3, 4 PK2.LIB
5, 6 PK3.LIB
7, 8 PK4.LIB
9, 10 PK5.LIB
11, 12 PK6.LIB
13, 14 PK7.LIB
15, 16 PK8.LIB
17, 18 PK9.LIB
19 PK10.LIB
WinNonlin Model Libraries
Pharmacokinetic models
577
B
PK models
Model 1 One compartment with bolus input and first-order output
Estimated parameters: (1) V = Volume
(2) K10 = elimination rate
Constants in input: (1) # doses
(2) dose 1
(3) time of dose 1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) AUC = D/V/K10
(2) K10 half-life
(3) Cmax = D/V
(4) CL
(5) AUMC
(6) MRT
(7) Vss
Clearance primary parameters: (1) V
(2) CL
Secondary Parameters: (1) AUC
(2) K10 half-life
(3) Cmax
(4) K10
(5) AUMC
(6) MRT
(7) VSS
( ) ( ) C T
D
V
K T = exp 10
WinNonlin
Users Guide
578
B
Model 2 One-compartment with constant IV input and first-order
absorption
where TI = Length of infusion, TSTAR = T-TI for T>TI, and TSTAR = 0 for
TTI
Estimated parameters: (1) V = Volume
(2) K10 = elimination rate
Constants in input: (1) # doses
(2) dose 1
(3) start time 1
(4) end time 1
(Repeat 2-4 for additional doses)
Secondary parameters: (1) AUC = D/V/K10
(2) K10 half-life
(3) Cmax = C(TI)
(4) CL
(5) AUMC
(6) MRT
(7) Vss
Clearance primary parameters: (1) V
(2) CL
Secondary Parameters: (1) AUC
(2) K10 half-life
(3) Cmax
(4) K10
(5) AUMC
(6) MRT
( ) ( ) ( ) ( ) ( ) C T
D
TI
V K
K TSTAR K T =
1
10
10 10 exp exp
WinNonlin Model Libraries
Pharmacokinetic models
579
B
Model 3 One-compartment with first-order input, first-order output, and
no lag time
(7) Vss
Estimated parameters: (1) V_F
(2) K01 = absorption rate
(3) K10 = elimination rate
Constants in input: (1) # doses
(2) dose 1
(3) time of dose 1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) AUC = D/V/K10
(2) K01 half-life
(3) K10 half-life
(4) CL_F
(5) Tmax = time of maximum
concentration
(6) Cmax = maximum concentration
= C(Tmax)
Clearance Primary parameters: (1) V_F
(2) K01
(3) CL_F
Secondary Parameters: (1) AUC
(2) K01 half-life
(3) K10 half-life
( )
( )
( ) ( ) ( ) C T
D K
V K K
K T K T =
01
01 10
10 01 exp exp
ln K01 K10 ( )
K01 K10 ( )
---------------------------------- =
WinNonlin
Users Guide
580
B
Model 4 One-compartment with first-order input, first-order output, and
a lag time
Everything as in Model 3, with an additional estimated parameter.
Estimated parameter: (4) Tlag = lag time
Clearance parameters the same as in Model 3.
Model 5 One-compartment with equal first-order input and output, no
lag time
(4) K10
(5) Tmax
(6) Cmax
Estimated parameters: (1) V_F
(2) K= absorption rate, K01 = elimination rate, K10
Constants in input: (1) # doses
(2) dose 1
(3) time of dose 1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) AUC = D/V/K
(2) K half-life
(3) CL_F
(4) Tmax = time of maximum
concentration = 1/K
(5) Cmax = maximum concentration
= C(Tmax)
Clearance Primary Parameters: (1) V_F
(2) CL_F
( ) ( ) C T
D
V
K T K T = exp
WinNonlin Model Libraries
Pharmacokinetic models
581
B
Model 6 One-compartment with equal first-order input and first-order
output and a lag time
Everything as in Model 5, with an additional estimated parameter.
Estimated parameter: (3) Tlag = lag time
Clearance parameters the same as in Model 5.
Model 7 Two-compartment with bolus input and first-order output;
micro-constants as primary parameters
where
and -ALPHA and -BETA (ALPHA > BETA) are the roots of the quadratic
equation: (r*r + (K12 + K21 + K10)*r + K21*K10 = 0).
Secondary Parameters: (1) AUC
(2) K half-life
(3) K
(4) Tmax
(5) Cmax
Estimated parameters: (1) V1 = Volume1
(2) K10 = elimination rate
(3) K12 = transfer rate, 1 to 2
( ) ( ) ( ) C T A ALPHA T B BETA T = + exp exp
( ) ( ) A
D
V
ALPHA K ALPHA BETA = 21
( ) ( ) B
D
V
BETA K ALPHA BETA =
21
WinNonlin
Users Guide
582
B
Model 8 Two-compartment with bolus input and first-order output;
macro-constants as primary parameters
(4) K21 = transfer rate, 2 to 1
Constants in input: (1) # doses
(2) dose 1
(3) time of dose 1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) AUC = D/V/K10 (9) Cmax = D/V
(2) K10 half-life (10) CL
(3) ALPHA (11) AUMC
(4) BETA (12) MRT
(5) ALPHA half-life (13) Vss
(6) BETA half-life (14) V2
(7) A (15) CLD2
(8) B
Clearance Primary Parameters: (1) V1
(2) CL
(3) V2
(4) CLD2
Secondary Parameters (1) AUC (9) Cmax
(2) K10 half-life (10) K10
(3) ALPHA (11) AUMC
(4) BETA (12) MRT
(5) ALPHA half-life (13) Vss
(6) BETA half-life (14) K12
(7) A (15) K21
(8) B
WinNonlin Model Libraries
Pharmacokinetic models
583
B
Clearance parameters are not available on Model 8.
Model 9 Two-compartment with constant IV input and first-order output;
micro-constants as primary parameters
Estimated parameters: (1) A
(2) B
(3) ALPHA
(4) BETA
Constants in input: (1) stripping dose
(2) # doses
(3) dose 1
(4) time of dose 1
(Repeat 3-4 for additional doses)
Secondary parameters: (1) AUC = A/ALPHA + B/BETA (9) V1
(2) K10 half-life (10) CL
(3) ALPHA half-life (11) AUMC
(4) BETA half-life (12) MRT
(5) K10 (13) Vss
(6) K12 (14) V2
(7) K21 (15) CLD2
(8) Cmax
( ) ( ) ( ) C T A ALPHA T B BETA T = + exp exp
( ) ( ) ( ) ( )
( ) ( ) ( )
C T A ALPHA T ALPHA TSTAR
B BETA T BETA TSTAR
=
+
1
1
exp exp
exp exp
WinNonlin
Users Guide
584
B
where TI = Length of infusion, TSTAR = T-TI for T>TI, and TSTAR = 0 for
TTI
and -ALPHA and -BETA (ALPHA > BETA) are the roots of the quadratic
equation: r*r + (K12 + K21 + K10)*r + K21*K10 = 0.
Note: A, B are the zero time intercepts following an IV injection
Estimated parameters: (1) V1 = Volume1
(2) K10 = elimination rate
(3) K12 = transfer rate, 1 to 2
(4) K21 = transfer rate, 2 to 1
Constants in input: (1) # doses
(2) dose 1
(3) start time 1
(4) end time 1
(Repeat 2-4 for additional doses)
Secondary parameters: (1) AUC = D/V/K10 (9) Cmax = C(TI)
(2) K10 half-life (10) CL
(3) ALPHA (11) AUMC
(4) BETA (12) MRT
(5) ALPHA half-life (13) Vss
(6) BETA half-life (14) V2
(7) A (15) CLD2
(8) B
( )
( )
( )
( )
A
D
TI V
K ALPHA
ALPHA BETA ALPHA
B
D
TI V
K BETA
ALPHA BETA BETA
1
1
21
21
=
Clearance Primary Parameters: (1) V1
(2) CL
(3) V2
WinNonlin Model Libraries
Pharmacokinetic models
585
B
Model 10 Two-compartment with constant IV input and first-order
output; macro-constants as primary parameters
where TI = Length of infusion, TSTAR = T-TI for T>TI, and TSTAR = 0 for
TTI
(4) CLD2
Secondary Parameters: (1) AUC (9) Cmax
(2) K10 half-life (10) K10
(3) ALPHA (11) AUMC
(4) BETA (12) MRT
(5) ALPHA half-life (13) Vss
(6) BETA half-life (14) K12
(7) A (15) K21
(8) B
Estimated parameters: (1) V1
(2) K21
( ) ( ) ( ) ( )
( ) ( ) ( )
C T A ALPHA T ALPHA TSTAR
B BETA T BETA TSTAR
=
+
1
1
exp exp
exp exp
( )
( )
( )
( )
A
D
TI V
K ALPHA
ALPHA BETA ALPHA
B
D
TI V
K BETA
ALPHA BETA BETA
1
1
21
21
=
WinNonlin
Users Guide
586
B
Note: NOTE: A, B are the zero time intercepts following an IV injection.
Clearance parameters are not available in Model 10.
Model 11 Two-compartment with first-order input, first-order output, no
lag time and micro-constants as primary parameters
(3) ALPHA
(4) BETA
Constants in input: (1) # doses
(2) dose 1
(3) start time of dose 1
(4) end time of dose 1
(Repeat 2-4 for additional doses)
Secondary parameters: (1) K10 (9) Cmax
(2) K12 (10) CL
(3) K10 half-life (11) AUMC
(4) AUC (12) MRT
(5) ALPHA half-life (13) Vss
(6) BETA half-life (14) V2
(7) A (15) CLD2
(8) B
WinNonlin Model Libraries
Pharmacokinetic models
587
B
and -ALPHA and -BETA (ALPHA > BETA) are the roots of the quadratic
equation: r*r + (K12 + K21 + K10)*r + K21*K10 = 0.
Estimated parameters: (1) V1_F
(2) K01 = absorption rate
(3) K10 = elimination rate
(4) K12 = transfer rate, 1 to
2
(5) K21 = transfer rate, 2 to
1
Constants in input: (1) # doses
(2) dose #1
(3) time of dose #1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) AUC = D/V/K10 (8) A
(2) K01 half-life (9) B
(3) K10 half-life (10) CL_F
(4) ALPHA (11) V2_F
(5) BETA (12) CLD2_F
(6) ALPHA half-life
(13) Tmax
a
(7) BETA half-life
(14) Cmax
b
Clearance Primary Parameters: (1) V1_F
(2) K01
(3) CL_F
(4) V2_F
( ) ( ) ( ) ( ) C T A ALPHA T B BETA T C K T = + + exp exp exp 01
A
D
V
K K ALPHA
ALPHA BETA ALPHA K
=
01 21
01
( )
( ) ( )
B
D
V
K K BETA
ALPHA BETA BETA K
=
01 21
01
( )
( ) ( )
C
D
V
K K K
BETA K ALPHA K
=
01 21 01
01 01
( )
( ) ( )
where
WinNonlin
Users Guide
588
B
Model 12 Two-compartment with first-order input, first-order output, lag
time and micro-constants as primary parameters
Everything as in Model 11, with an additional estimated parameter.
Estimated parameter: (6) Tlag = lag time
Model 13 Two-compartment with first-order input, first-order output, no
lag time and macro-constants as primary parameters
(5) CLD2_F
Secondary Parameters: (1) AUC (8) A
(2) K01 half-life (9) B
(3) K10 half-life (10) K10
(4) ALPHA (11) K12
(5) BETA (12) K21
(6) ALPHA half-life (13) Tmax
(7) BETA half-life (14) Cmax
a. Estimated for the compiled (internal) library only.
b. Estimated for the compiled (internal) library only.
Estimated parameters: (1) A
(2) B
(3) K01 = absorption rate
(4) ALPHA
(5) BETA
(Note: C = -(A + B))
Constants in input: (1) stripping dose
C T A ALPHA T B BETA T C K T ( ) exp( ) exp( ) exp( ) = + + 01
WinNonlin Model Libraries
Pharmacokinetic models
589
B
Clearance parameters are not available for Model 13.
Model 14 Two-compartment with first-order input, first-order output, lag
time and macro-constants as primary parameters
Everything as in Model 13, with an additional estimated parameter.
Estimated parameter: (6) TLAG = lag time
Clearance parameters are not available for model 14.
Model 15 One compartment with simultaneous bolus IV and constant IV
infusion
(2) # doses
(3) dose 1
(4) time of dose 1
(Repeat 3-4 for additional doses)
Secondary parameters: (1) K10 (8) BETA half-life
(2) K12 (9) V1_F
(3) K21 (10) CL_F
(4) AUC = D/V/K10 (11) V2_F
(5) K01 half-life (12) CLD2_F
(6) K10 half-life
(13) Tmax
a
(7) ALPHA half-life
(14) Cmax
b
a. Estimated for the compiled (internal) library only.
b. Estimated for the compiled (internal) library only.
WinNonlin
Users Guide
590
B
where TSTAR = T-TI for T>TI and TSTAR = 0 for TTI
Model 16 Two compartment with simultaneous bolus IV and constant
infusion input, micro constants as primary parameters
Estimated parameters: (1) V = Volume
(2) K10
Constants in input: (1) bolus dose
(2) IV dose
(3) length of infusion = TI
Secondary parameters: (1) CL
(2) K10 half-life
Clearance primary parameters: (1) V
(2) CL
Secondary parameters: (1) K10
(2) K10 half-life
C T
D
V
K T
B
B
( ) exp( ) = 10
C T
D
TI
V K
K TSTAR K T
IV
IV
( ) (exp( ) exp( )) =
1
10
10 10
C T C T C T
B IV
( ) ( ) ( ) = +
WinNonlin Model Libraries
Pharmacokinetic models
591
B
where TSTAR = T-TI for T>TI and TSTAR = 0 for TTI
Estimated parameters: (1) V1
(2) K10
(3) K12
(4) K21
Constants in input: (1) bolus dose
(2) IV dose
(3) length of infusion (= TI)
Secondary parameters: (1) K10 half-life (6) A
(2) ALPHA (7) B
(3) BETA (8) CL
(4) ALPHA half-life (9) V2
(5) BETA half-life (10) CLD2
C T A ALPHA T B BETA T
B
( ) exp( ) exp( ) = +
1 1
A
D
V
ALPHA K
ALPHA BETA
B
1
21
=
*
( )
( )
B
D
V
BETA K
ALPHA BETA
B
1
21
=
( )
( )
where
( ) ( ) ( ) ( )
( ) ( ) ( )
C T A ALPHA T ALPHA TSTAR
B BETA T BETA TSTAR
IV
=
+
2
2
exp exp
exp exp
( )
( )
A
D
TI V
K ALPHA
ALPHA BETA ALPHA
IV
2
21
=
where
( )
( )
B
D
TI V
K BETA
ALPHA BETA BETA
IV
2
21
=
( ) ( ) ( ) C T C T C T
B IV
= +
WinNonlin
Users Guide
592
B
Model 17 Two compartment with simultaneous bolus IV and constant
infusion input and macro constants as primary parameters
C
B
(T) = A*exp(-ALPHA*T) + B*exp(-BETA*T)
C
IV
(T) = (A / ALPHA) * (exp(ALPHA*TSTAR) exp(ALPHA*T) )
+ (B / BETA) * (exp(BETA*TSTAR) exp(BETA*T) )
where TSTAR = T-TI for T>TI and TSTAR = 0 for TTI
Clearance primary parameters: (1) V1
(2) CL
(3) V2
(4) CLD2
Secondary parameters: (1) K10 half-life (6) A
(2) ALPHA (7) B
(3) BETA (8) K10
(4) ALPHA half-life (9) K12
(5) BETA half-life (10) K21
Estimated parameters: (1) A
(2) B
(3) ALPHA
(4) BETA
( ) ( ) ( ) C T C T C T
B IV
= +
WinNonlin Model Libraries
Pharmacokinetic models
593
B
Clearance parameters are not available in Model 17.
Model 18 Three-compartment with bolus input, first-order output and
macro constants as primary parameters
Constants in input: (1) stripping dose
(2) bolus dose
(3) IV dose
(4) length of infusion (= TI)
Secondary parameters: (1) K10 (6) BETA half-life
(2) K12 (7) V1
(3) K21 (8) CL
(4) K10 half-life (9) V2
(5) ALPHA half-life (10) CLD2
Estimated parameters: (1) A
(2) B
(3) C
(4) ALPHA
(5) BETA
(6) GAMMA
Constants in input: (1) stripping dose
(2) # doses
(3) dose 1
(4) start time of dose 1
( ) ( ) ( ) ( ) C T A ALPHA T B BETA T C GAMMA T = + + exp exp exp
WinNonlin
Users Guide
594
B
Clearance parameters are not available in Model 18.
Model 19 Three compartment model with constant IV infusion; macro
constants as primary parameters
(Repeat 3-4 for additional doses)
Secondary parameters: (1) Cmax (11) GAMMA half-life
(2) V1 (12) AUC
(3) K21 (13) CL
(4) K31 (14) AUMC
(5) K10 (15) MRT
(6) K12 (16) Vss
(7) K13 (17) V2
(8) K10 half-life (18) CLD2
(9) ALPHA half-life (19) V3
(10) BETA half-life (20) CLD3
WinNonlin Model Libraries
Pharmacokinetic models
595
B
where TI = Length of infusion, TSTAR = T-TI for T>TI, and TSTAR = 0 for
TTI
Estimated parameters: (1) V1
(2) K21
(3) K31
(4) ALPHA
(5) BETA
(6) GAMMA
Constants in input: (1) # doses
(2) dose 1
(3) start time of dose 1
(4) end time of dose 1
(Repeat 2-4 for additional doses)
Secondary parameters: (1) Cmax (11) GAMMA half-life
(2) K10 (12) AUC
(3) K12 (13) CL
(4) K13 (14) AUMC
(5) A (15) MRT
(6) B (16) Vss
(7) C (17) V2
(8) K10 half-life (18) CLD2
(9) ALPHA half-life (19) V3
( ) ( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
C T A ALPHA TSTAR ALPHA T
B BETA TSTAR BETA T
C GAMMA TSTAR GAMMA T
=
+
+
1
1
1
exp exp
exp exp
exp exp
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( ) ( )
A
D TI K ALPHA K ALPHA
V ALPHA GAMMA ALPHA BETA ALPHA
B
D TI K BETA K BETA
V BETA GAMMA BETA ALPHA BETA
C
D TI K GAMMA K GAMMA
V GAMMA ALPHA GAMMA BETA GAMMA
1
1
1
21 31
21 31
21 31
=
=
=
WinNonlin
Users Guide
596
B
Clearance parameters are not available in Model 19.
Note: NOTE: A, B, C are the zero time intercepts following an IV injection.
Pharmacodynamic models
Load and set up pharmacodynamic (PD) models as described under Loading
the model on page 247 and Model properties on page 249. Available PD
models in the WinNonlin Model Libraries include the following.
ASCII library
These models are available as compiled models and also as ASCII library
files. The ASCII library files are stored in the WINNONLN\LIB subdirectory.
(10) BETA half-life (20) CLD3
Model Description C=0 C=infinity
Model 101 Simple Emax Model 0 Emax
Model 102 Simple Emax Model E0 Emax
Model 103 Inhibitory Effect Emax Model Emax 0
Model 104 Inhibitory Effect Emax Model Emax E0
Model 105 Sigmoid Emax Model 0 Emax
Model 106 Sigmoid Emax Model E0 Emax
Model 107 Inhibitory Effect Sigmoid Emax Model Emax 0
Model 108 Inhibitory Effect Sigmoid Emax Model Emax E0
Model # File name
101, 102 PK51.LIB
103, 104 PK52.LIB
105, 106 PK53.LIB
107, 108 PK54.LIB
WinNonlin Model Libraries
Pharmacodynamic models
597
B
Models
Notation
Model 101 Simple Emax model
Term Definition
Emax Maximum effect
E
0
Baseline effect
EC
50
Drug concentration required to produce 50% of the drug-induced maximal
effect (Emax- E
0
)
Emax- E
0
Drug-induced maximal effect
Gamma Shape parameter
Estimated parameters: (1) Emax
(2) EC
50
( )
( )
E
E C
C EC
=
+
max
50
WinNonlin
Users Guide
598
B
Model 102 Simple Emax model with a baseline effect parameter
Model 103 Inhibitory effect model
Estimated parameters: (1) Emax
(2) EC
50
(3) E
0
Secondary Parameters: (1) Emax-E
0
Estimated parameters: (1) Emax
( ) ( ) E E E E C C EC = + +
0 0 50
max ( )
( ) ( ) E E C C EC = + max ( ) 1
50
WinNonlin Model Libraries
Pharmacodynamic models
599
B
Model 104 Inhibitory effect model with a baseline effect parameter
Model 105 Sigmoid Emax model
(2) EC
50
Estimated parameters: (1) Emax
(2) EC
50
(3) E
0
Secondary Parameters: (1) Emax-E
0
( ) ( ) ( ) E E E E C C EC = + max max
0 50
WinNonlin
Users Guide
600
B
Model 106 Sigmoid Emax model with a baseline effect parameter
Estimated parameters: (1) Emax
(2) EC
50
(3) Gamma
Estimated parameters: (1) Emax
(2) EC
50
(3) E
0
(4) Gamma
Secondary Parameters: (1) Emax-E
0
( )
( )
E
E C
C EC
=
+
max
50
( ) ( ) ( ) E E E E C C EC = + +
0 0 50
max
WinNonlin Model Libraries
Pharmacodynamic models
601
B
Model 107 Sigmoid inhibitory effect model
Model 108 Sigmoid inhibitory effect model with a baseline effect
parameter
Estimated parameters: (1) Emax (2) EC
50
(3) Gamma
Estimated parameters: (1) Emax
(2) EC
50
(3) E
0
(4) Gamma
( ) ( ) ( ) E E C C EC = + max 1
50
( ) ( ) ( ) E E E E C C EC = + max max
0 50
WinNonlin
Users Guide
602
B
PK/PD link models
When pharmacological effects are seen immediately and are directly related
to the drug concentration, a pharmacodynamic model is applied to character-
ize the relationship between drug concentrations and effect. When the phar-
macologic response takes time to develop and the observed response is not
directly related to plasma concentrations of the drug a link model is usually
applied to relate the pharmacokinetics of the drug to its pharmacodynamics.
The PK/PD Link models can use any combination of WinNonlin compiled
Pharmacokinetic models and Pharmacodynamic models. The PK model is
used to predict concentrations, and these concentrations are then used as input
to the PD model. Thus, the PK data are not modeled; the PK/PD Link models
treat the pharmacokinetic parameters as fixed, and generate concentrations at
the effect site to be used by the PD model. Model parameter information will
be required for the PK model in order to simulate the concentration data.
Note: To model PK and PD data simultaneously, see Simultaneous PK/PD link
models on page 612.
Notation
Linking PK and PD models
WinNonlin can generate concentrations at effect sites using any PK model in
the compiled library, and using these concentrations in any PD model.
Secondary Parameters: (1) Emax-E
0
Term Definition
Emax Maximum effect
ECe
50
Concentration required to produce one-half of
the drug induced maximal effect.
E
0
Effect at time 0
Ke0 Rate of drug loss from the effect compartment.
The Ke0 T1/2 is the half life of the amount of
time required to collapse the hysteresis curve.
Emax- E
0
Drug induced maximal effect
Gamma Shape parameter
WinNonlin Model Libraries
PK/PD link models
603
B
To link any PK and PD models:
1. Click on the PK/PD/NCA Analysis Wizard button on the tool bar or choose
Tools>PK/PD/NCA Analysis Wizard from the menus.
2. Select PK/PD Link in the Model Types dialog.
3. Select a PK model from those detailed under Pharmacokinetic models on
page 575.
4. Click Next.
5. Select a PD model from those detailed under Pharmacodynamic models on
page 596.
6. Click Next. The Selection Summary dialog appears.
7. Click Finish.
To assign parameter values for the PK model:
1. Enter the Data Variables, Model Parameters, Dosing Regimen/ Constants, and
model options as for other compartmental models, as described under Model
properties on page 249.
2. Click the Model Parameters button or choose Model>Model Parameters
from the menus. Notice that the Model Parameters dialog now has a two tabs,
one for the PK Model and one for the PD Model.
3. Select the PK Model tab.
4. Enter the parameter values. The initial parameter values must be entered.
5. Click Apply or OK.
Note: The units for PK concentration can be entered in the PK Concentration Unit
field or set using the Units Builder button.
To assign initial estimates and bounds for the PD model:
1. Select the PD Model tab.
2. Enter initial estimates and bounds.
3. Click OK. The model parameters are set and the dialog closes.
WinNonlin
Users Guide
604
B
Output parameters
The output parameters for the PD models differ from the parameters for these
models when they are not linked. The primary and secondary parameters for
the PD models are listed here.
Link model 101 Simple Emax model
Link model 102 Simple Emax model with a baseline effect parameter
Link model 103 Inhibitory effect model
Link model 104 Inhibitory effect model with a baseline effect parameter
Link model 105 Sigmoid Emax model
Primary parameters: (1) Emax
(2) ECe
50
(3) KEO
Estimated parameters: (1) Emax
(2) ECe
50
(3) E
0
(4) KEO
Secondary parameters: (1) Emax-E
0
Estimated parameters: (1) Emax
(2) ECe
50
(3) KEO
Estimated parameters: (1) Emax
(2) ECe
50
(3) E
0
(4) KEO
Secondary parameters: (1) Emax-E
0
Estimated parameters: (1) Emax
WinNonlin Model Libraries
Indirect response models
605
B
Link model 106 Sigmoid Emax model with a baseline effect parameter
Link model 107 Sigmoid inhibitory effect model
Link model 108 Sigmoid inhibitory effect model with a baseline effect
parameter
Indirect response models
When pharmacological effects are seen immediately and are directly related
to the drug concentration, a pharmacodynamic model is applied to character-
ize the relationship between drug concentrations and effect. When the phar-
macologic response takes time to develop and the observed response is not
(2) ECe
50
(3) Gamma
(4) KEO
Estimated parameters: (1) Emax
(2) ECe
50
(3) E
0
(4) Gamma
(5) KEO
Secondary parameters: (1) Emax-E
0
Estimated parameters: (1) Emax
(2) ECe
50
(3) Gamma
(4) KEO
Estimated parameters: (1) Emax
(2) ECe
50
(3) E
0
(4) Gamma
(5) KEO
Secondary parameters: (1) Emax-E
0
WinNonlin
Users Guide
606
B
directly related to plasma concentrations of the drug a link model is usually
applied to relate the pharmacokinetics of the drug to its pharmacodynamics.
One kind of link model available in WinNonlin is the family of indirect phar-
macodynamic response (IPR) models proposed by Jusko and co-workers
Jusko (1990) and Dayneka, Garg, and Jusko (1993).
The indirect response models differ from other models in the WinNonlin
Model Libraries in that they use a PK model to predict concentrations, and
then use these concentrations as input to the indirect response model.
Four basic models have been developed for characterizing indirect pharmaco-
dynamic responses after drug administration. These models are based on drug
effects (inhibition or stimulation) on the factors controlling either the input or
the dissipation of drug response.
Note: These models are available only as compiled models
Models
Notation
Model 51 Inhibition of input
Term Definition
R Measured response to a drug
k
in
The zero order constant for the production of response
k
out
The first order rate constant for loss of response
Cp Plasma concentration of a drug
Ce Drug concentration at the effect site
IC
50
The drug concentration which produces 50% of maximum inhibition
Emax Maximum effect
EC
50
The drug concentration which produces 50% of maximum stimulation
Estimated parameters: (1) Kin
dR
dt
k
C
C IC
k R
in
p
p
out
=
+
|
\
|
.
|
|
1
50
WinNonlin Model Libraries
Indirect response models
607
B
Model 52 Inhibition of output
Model 53 Stimulation of input
Model 54 Stimulation of output
(2) Kout
(3) IC
50
Estimated parameters: (1) Kin
(2) Kout
(3) IC
50
Estimated parameters: (1) Kin
(2) Kout
(3) EC
50
(4) Emax
Estimated parameters: (1) Kin
(2) Kout
(3) EC
50
(4) Emax
dR
dt
k k
C
C IC
R
in out
p
p
=
+
|
\
|
.
|
|
1
50
dR
dt
k
E C
EC C
k R
in
p
p
out
= +
+
|
\
|
.
|
|
1
50
max
dR
dt
k k
E C
EC C
R
in out
p
p
= +
+
|
\
|
.
|
|
1
50
max
WinNonlin
Users Guide
608
B
Running an indirect response model
To select an Indirect Response model:
1. Click on the PK/PD/NCA Analysis Wizard button on the tool bar or select
the PK/PD/NCA Analysis Wizard from the Tools menu. The PK/PD Analy-
sis Wizard appears, displaying the Model Types dialog.
2. Select Indirect Response from the selections in the Compartmental Models
group box. The WinNonlin Compiled Models dialog appears.
3. Select a PK model.
4. Click Next. The list of Indirect Response Models appears.
5. Select an Indirect Response model.
6. Click Next. The Selection Summary box appears.
7. If everything described in this summary box is correct, click Finish. (Other-
wise, click Back and return to correct the mistake.) The modeling window
appears.
Note: Enter the Data Variables, Dosing Regimen/Constants, and Model Options pre-
cisely as for other models.
To assign parameter values for the PK model:
1. Enter the Data Variables, Model Parameters, Dosing Regimen/ Constants, and
model options as for other compartmental models, as described under Model
properties on page 249.
2. Click the Model Parameters button or choose Model>Model Parameters
from the menus. Notice that this dialog now has tabs for both the PK Model
and the indirect response model.
It is possible to choose to have WinNonlin generate the initial parameter val-
ues or to specify user-supplied initial values.
3. Select the PK Model tab located under the parameters table.
4. Enter the parameter values for the PK model.
Note: Initial parameter values for the PK model must be specified.
WinNonlin Model Libraries
Michaelis-Menten models
609
B
5. (Optional) Enter the PK units in the PK Concentration Unit field.
6. Click Apply.
Initial estimates and bounds can be specified for the IPR model.
To assign initial estimates and bounds for the IPR model:
1. Select the IPR Model tab in the Model Properties dialog.
2. Enter initial estimates and bounds.
3. Click Apply or OK to specify the settings and close the dialog.
Michaelis-Menten models
The WinNonlin library contains four Michaelis-Menten models:
These models are stored as ASCII library files in \LIB\MM.LIB. As with all
WinNonlin ASCII models, be sure to examine the ASCII code to determine
which dosing constants need to be created.
When these models are being used, the times on the data set must correspond
to the dosing times, even if these observations contain no other information.
In this case, include a column for Weight on the data set, and weight these
observations as 0.
WinNonlin assumes that the time of the first dose is zero.
For these models Vmax is parameterized in terms of concentration per unit
time.
For discussion of difficulties inherent in fitting the Michaelis-Menten models
see Tong and Metzler (1980) and Metzler and Tong (1981).
Model Description
Model 301 One compartment with bolus input and Michaelis-Menten output
Model 302 One compartment with constant IV input and Michaelis-Menten output
Model 303 One compartment with first order input, Michaelis-Menten output and no time lag
Model 304 One compartment with first order input, Michaelis-Menten output and a lag time
WinNonlin
Users Guide
610
B
Model 301 One-compartment with bolus input and Michaelis-Menten
output
C(T) is the solution to the following differential equation:
dC/dt = - VMAX*C/( KM + C ),
with initial condition C(0) = D/V.
Model 302 One-compartment with constant IV input and Michaelis-
Menten output
C(T) is the solution to the following differential equations:
dC/dt = (D/TI/V) - VMAX*C/( KM + C ), for T <= TI,
dC/dt = - VMAX*C/( KM + C ), for T > TI,
with initial condition C(0) = 0.1) # doses
Estimated parameters: (1) V = Volume
(2) VM = maximum rate of elimination
(3) KM = Michaelis constant
Constants in input: (1) # doses
(2) dose 1
(3) time of dose 1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) AUC = (D/V)*(D/V/2 + KM)/ VMAX
Estimated parameters: (1) V = Volume
(2) VM = maximum rate of elimination
(3) KM = Michaelis constant
WinNonlin Model Libraries
Michaelis-Menten models
611
B
Model 303 One-compartment with first-order input and Michaelis-
Menten output and no lag time
C(T) is the solution to the following differential equation:
dC/dt = K01*(D/V)*EXP(-K01*T) - VM*C/( KM + C ),
with initial condition C(0) = 0.
Model 304 One-compartment with first-order input and Michaelis-
Menten output and a lag time
Everything as in Model 303, with one additional estimated parameter.
Estimated parameter: (5) Tlag = lag time
Constants in input: (1) number of doses
(2) dose 1
(3) start time for dose 1
(4) end time for dose 1
(repeat 2-4 for additional doses)
Secondary parameters: None
Estimated parameters: (1) V_F
(2) K01 = absorption rate
(3) VM = maximum rate of elimination
(4) KM = Michaelis constant
Constants in input: (1) # doses
(2) dose 1
(3) time of dose 1
(Repeat 2-3 for additional doses)
Secondary parameters: (1) K01 half-life
WinNonlin
Users Guide
612
B
Simultaneous PK/PD link models
WinNonlin has a library of link models which simultaneously fit PK and PD
data. As it is difficult to rewrite these models for changes in the PK model, but
easy to rewrite them for a different PD model, this library includes each PK
models with PD Model 105. These models are described below.
Data
The data for these models must contain the concentration and effect data in
the same column, with a function variable in a separate column to distinguish
the two. Function 1 should include the time and concentration data, Function
2 should include the time and effect data. An example is shown below.
ASCII library
These models are stored as ASCII library files in the \LIB subdirectory.
As with all of the WinNonlin ASCII models, be sure to examine the ASCII
code to see what dosing constants need to be created.
Time Response Function
0 0 1
0.5 5 1
1 15 1
. . . . . . . . .
36 1 1
0 148 2
0.5 145 2
1 123 2
. . . . . . . . .
36 121 2
Model File PK model PK model description
401 KEO1.LIB Model 1 1 compartment - bolus input
402 KEO1.LIB Model 2 1 compartment - constant IV input
403 KEO2.LIB Model 3 1 compartment - extravascular input
404 KEO2.LIB Model 4 1 compartment - extravascular input, with a lag time
405 KEO3.LIB Model 5 1 compartment - extravascular input, equal input and out-
put rates
406 KEO3.LIB Model 6 1 compartment - extravascular input, equal input and out-
put with a lag time
WinNonlin Model Libraries
Simultaneous PK/PD link models
613
B
407 KEO4.LIB Model 7 2 compartment - bolus input, defined in microconstants
408 KEO4.LIB Model 8 2 compartment - bolus input, defined in macroconstants
409 KEO5.LIB Model 9 2 compartment - constant IV input, defined in microcon-
stants
410 KEO5.LIB Model 10 2 compartment - constant IV input, defined in macrocon-
stants
411 KEO6.LIB Model 11 2 compartment - 1st order input, defined in microconstants
412 KEO6.LIB Model 12 2 compartment - 1st order input, defined in macrocon-
stants, includes a lag time
413 KEO7.LIB Model 13 2 compartment - 1st order input, defined in macroconstants
414 KEO7.LIB Model 14 2 compartment - 1st order input, defined in macrocon-
stants, includes a lag time
415 KEO8.LIB Model 15 1 compartment - bolus input + constant infusion
416 KEO8.LIB Model 16 2 compartment - bolus input + constant infusion, defined in
microconstants
417 KEO9.LIB Model 17 2 compartment - bolus input + constant infusion, defined in
macroconstants
418 KEO10.LIB Model 18 3 compartment - bolus input, defined in macroconstants
419 KEO10.LIB Model 19 3 compartment - constant infusion, defined in macrocon-
stants
Model File PK model PK model description
WinNonlin
Users Guide
614
B
615
Appendix C
Worksheet Functions
Syntax, arguments, and examples for functions in
WinNonlin worksheets
WinNonlin worksheets support an extensive set of functions. Complete syntax
and examples of these functions follow. In the following functions:
number is a number or reference to a cell that contains a number.
number list is a comma-separated list of up to 30 numbers or cell references.
serial number refers to the stored value for the date or time entered in a cell.
value list is a list of up to 30 values or cell references, separated by commas.
expression list is a list of up to 30 expressions.
significance is the multiple to which to round.
precision is the number of decimal places allowed.
[ ] denotes optional arguments.
Table C-1. Worksheet functions
Function(arguments) Description
ABS(number) Absolute value of a number
ACOS(number) Returns the arc cosine of a number.
ACOSH(number) Returns the inverse hyperbolic cosine of a number.
ADDRESS(row, column,
ref_type[,a1] [,sheet] )
Creates a cell address as text.
AND(logical_list) Returns True if all arguments are true; False if at least one argument is false.
ASC(text) In DBCS systems this function returns a copy of text in which the double-byte
characters are converted to single-byte characters, if possible. Characters that
cannot be converted are left unchanged.
WinNonlin
Users Guide
616
C
ASIN(number) Returns the arcsine of a number.
ASINH(number) Returns the inverse hyperbolic sine of a number.
ATAN(number) Returns the arctangent of a number.
ATAN2(x, y) Returns the arctangent of the specified coordinates.
ATANH(number) Returns the inverse hyperbolic tangent of a number.
AVERAGE(number list) Returns the arithmetic mean of the supplied numbers.
CEILING(number, signifi-
cance)
Rounds a number up to the nearest multiple of a specified significance.
CHAR(number) Returns a character that corresponds to the supplied ASCII code.
CHOOSE(index, item_list) Returns a value from a list of numbers based on the index number supplied.
CLEAN(text) Removes all nonprintable characters from the supplied text.
CODE(text) Returns a numeric code representing the first character of the supplied string.
COLUMN(reference) Returns the column number of the supplied reference.
COLUMNS(range) Returns the number of columns in a range reference.
CONCATENATE(text1,
text2,)
Joins several text items into one item.
COS(number) Returns the cosine of an angle.
COSH(number) Returns the hyperbolic cosine of a number.
COUNT(value list) Returns the number of values in the supplied list.
COUNTA(expression list) Returns the number of non-blank values in the supplied list.
COUNTIF(range, criteria) Returns the number of cells within a range which meet the given criteria.
DATE(year, month, day) Returns the serial number of the supplied date.
DATEVALUE(text) Returns the serial number of a date supplied as a text string. Example DAT-
EVALUE (3/6/94) returns 34399.
DAY(text) Returns the day of the month that corresponds to the given date. Example:
DAY(34399) returns 6; DAY(6-21-94) returns 21.
DB(cost, salvage, life, period
[,months] )
Returns the real depreciation of an asset for a specific period of time using the
fixed-declining balance method.
DDB(cost, salvage, life,
period [, factor] )
Returns the depreciation of an asset for a specific period of time using the dou-
ble-declining balance method or a declining balance factor.
DOLLAR(number [, precision]
)
Returns the specified number as text, using the local currency format and the
supplied precision.
Table C-1. Worksheet functions (continued)
Function(arguments) Description
Worksheet Functions
617
C
EVEN(number) Rounds the specified number up to the nearest even integer.
EXACT(expression1,
expression2)
Compares two expressions for identical, case-sensitive matches. True is
returned if the expressions are identical; False is returned if they are not.
EXP(number) Returns e raised to the specified power.
FACT(number) Returns the factorial of the specified number.
FIND(search_text, text [,
start_position] )
Searches for a string of text within another text string and returns the character
position at which the search string first occurs.
FINDB(search_text, text [,
start_position] )
Searches for a string of text within another text string and returns the byte posi-
tion at which the search string first occurs.
FIXED(number [,preci-
sion][,no_commas] )
Rounds a number to the supplied precision, formats the number in decimal for-
mat, and returns the result as text. Example: FIXED(2000.5, 3) returns
2,000.500. FIXED(2009.5, -1, 1) returns 2010.
FLOOR(number, significance) Rounds a number down to the nearest multiple of specified significance.
FV(interest, nper, payment [,
pv] [, type] )
Returns the future value of an annuity based on regular payments and a fixed
interest rate.
HLOOKUP(search_item,
search_range, row_index )
Searches the top row of a table for a value and returns the contents of a cell in
that table that corresponds to the location of the search value.
HOUR(serial_number) Returns the hour component of the specified time in 24-hour format.
IF(condition, true_value,
false_value)
Tests the condition and returns the specified value.
INDEX(reference [, row] [, col-
umn] [, range_number] )
Returns the contents of a cell from a specified range.
INDIRECT(ref_text [, a1] ) Returns the contents of the cell referenced by the specified cell.
INT(number) Rounds the supplied number down to the nearest integer.
IPMT(interest, per, nper, pv,
[fv], [type] )
Returns the interest payment of an annuity for a given period, based on regular
payments and a fixed periodic interest rate.
IRR(cash_flow [, guess] ) Returns internal rate of return for a series of periodic cash flows.
ISBLANK(reference) Determines if the specified cell is blank.
ISLOGICAL(expression) Determines if the specified expression returns a logical value.
ISNONTEXT(expression) Determines if the specified expression is not text.
ISNUMBER(expression) Determines if the specified expression is a number.
ISREF(expression) Determines if the specified expression is a range reference.
ISTEXT(expression) Determines if the specified expression is text.
Table C-1. Worksheet functions (continued)
Function(arguments) Description
WinNonlin
Users Guide
618
C
LEFT(text [, num_chars]) Returns the left-most characters from the specified text string. Examples:
LEFT(2nd Quarter) returns 2; LEFT(2nd Quarter, 3) returns 2nd.
LEFTB(text [,num_bytes] ) Returns the left-most byte from the specified text string.
LEN(text) Returns the number of characters in the supplied text string. Examples: LEN(3rd
Quarter) returns 11; LEN(1-3) returns 3.
LENB(text) Returns the number of bytes in the supplied text string.
LN(number) Returns the natural logarithm of a number.
LOG(number, [,base]) Returns the logarithm of a number to the specified base, omitting the base
assumes a base of 10.
LOG10(number) Returns the base 10 logarithm of a number.
LOWER(text) Changes alphabetic characters in the specified string to lower case.
MAX(number list) Returns the largest value in the specified list of numbers.
MID(text, start_position,
num_chars)
Returns the specified number of characters from a text string, beginning with the
specified starting position. Example: MID(07/04/96, 4, 2) returns 04.
MIDB(text, start_position,
num_bytes)
Returns the specified number of bytes from a text string, beginning with the spec-
ified starting position.
MIN(number list) Returns the smallest value in the specified list of numbers.
MINUTE(number list) Returns the minute that corresponds to the supplied date.
MIRR(cash_flows,
finance_rate, reinvest_rate)
Returns the modified internal rate of return for a series of periodic cash flows.
MOD(number, divisor) Returns the remainder after dividing a number by a specified divisor.
MONTH(serial_number) Returns the month that corresponds to the supplied date.
N(value) Tests the supplied value and returns the value if it is a number.
NOW() Returns the current date and time as a serial number.
NPER(interest, pmt, pf [, fv] [,
type] )
Returns the number of periods of an investment based on regular periodic pay-
ments and a fixed interest rate.
NPV(discount_rate,
value_list)
Returns the net present value of an investment based on a series of periodic
payments and a discount rate.
ODD(number) Rounds the specified number up to the nearest odd integer.
OR(logical_list) Returns True if at least one of a series of logical arguments is true.
PI() Returns the value of p. (Empty parentheses are required).
Table C-1. Worksheet functions (continued)
Function(arguments) Description
Worksheet Functions
619
C
PMT(interest, nper, pv [, fv] [,
type] )
Returns the periodic payment of an annuity, based on regular payments and a
fixed periodic interest rate.
PPMT(interest, per, nper, pv,
[fv], [type] )
Returns the principle paid on an annuity for a given period.
PRODUCT(number list) Multiplies a list of numbers and returns the result.
PV(interest, nper, pmt [, fv] [,
type] )
Returns the present value of an annuity, considering a series of constant pay-
ments made over a regular payment period.
RAND() Returns a number selected randomly from a uniform distribution greater than or
equal to 0 and less than 1. (Empty parentheses are required).
RATE(nper, pmt, pv [, fv] [,
type] [, guess] )
Returns the interest rate per period of an annuity, given a series of constant cash
payments made over a regular payment period.
REPLACE(orig_text,
start_position, num_chars,
repl_text)
Replaces part of a text string with another text string. Example: REPLACE(For
the year: 1996", 18, 1, 7) returns For the year: 1997".
REPLACEB(orig_text,
start_position, num_bytes,
repl_text)
Replaces part of a text string with another text string.
REPT(text, number) Repeats a text string the specified number of times.
RIGHT(text [, num_chars] ) Returns the right-most characters from the given text string.
RIGHTB(text [, num_chars] ) Returns the right-most bytes from the given text string.
ROUND(number, precision) Rounds the given number to the supplied number of decimal places.
ROUNDDOWN(number, num-
berOfDigits)
Rounds a number down.
ROUNDUP(number, number-
OfDigits)
Rounds the given number up to the supplied number of decimal places.
ROWS(range) Returns the number of rows in a range reference.
SEARCH(search_text, text [,
start position])
Locates the position of the first character of a specified text string within another
text string. Example: SEARCH(/, 07/04/96) returns 3.
SEARCHB(search_text, text [,
start_position] )
Locates the position of the first byte of a specified text string within another text
string.
SECOND(serial_number) Returns the second that corresponds to the supplied date.
SIGN(number) Returns the sign of the specified number.
SIN(number) Returns the sine of the supplied angle.
Table C-1. Worksheet functions (continued)
Function(arguments) Description
WinNonlin
Users Guide
620
C
SINH(number) Returns the hyperbolic sine of the specified number.
SLN(cost, salvage, life) Returns the depreciation of an asset for a specific period of time using the
straight-line balance method.
SQRT(number) Returns the square root of the specified number.
STDEV(number list) Returns the standard deviation of a list of as many as 30 numbers.
SUBSTITUTE(text, old_text,
new_text [, instance])
Replaces a specified part of a text string with another text string. Example: SUB-
STITUTE(07-04-97, -, /) returns 07/04/97.
SUM(number list) Returns the sum of the specified numbers.
SUMIF(range, criteria,
sum_range)
Returns the sum of the specified cells based on the given criteria.
SUMPRODUCT(range_list) Multiplies the cells in the given ranges, then returns the sum of those products.
SUMSQ(number list) Squares each of the supplied numbers and returns the sum of the squares.
SYD(cost, salvage, life,
period)
Returns the depreciation of an asset for a specified period using the sum-of-
years method.
TAN(number) Returns the tangent of the specified angle.
TANH(number) Returns the hyperbolic tangent of a number.
TEXT(number,format) Returns the given number as text, using the specified formatting.
TIME(hour, minute, second) Returns a serial number for the supplied time.
TIMEVALUE(text) Returns a serial number for the supplied text representation of time.
TODAY() Returns the current date as a serial number.
TRIM(text) Removes all spaces from text except single spaces between words.
TRUNC(number [,precision]) Truncates the given number to an integer.
TYPE(expression) Returns the argument type of the given expression.
UPPER(text) Changes the characters in the specified string to uppercase characters.
VAR(number list) Returns the variance of a population based on a sample of up to 30 values.
VDB(cost, salvage, life,
start_period, end_period [,
factor] [, method] )
Returns the depreciation of an asset for a specified period using a variable
method of depreciation.
VLOOKUP(search_item,
search_range, column_index)
Searches the first column of a table for a value and returns the contents of a cell
in that table that corresponds to the location of the search value.
WEEKDAY(serial_number) Returns the day of the week that corresponds to the supplied date.
YEAR(serial_number) Returns the year that corresponds to the supplied date.
Table C-1. Worksheet functions (continued)
Function(arguments) Description
621
Appendix D
Commands, Arrays and
Functions
Commands and syntax for the WinNonlin
command language
Notation
Items enclosed in brackets, i.e., [ ], are optional.
The symbol | means or.
B
BEGIN COMMAND
BTIME COMMAND
Usage BEGIN
Description Indicates that all commands have been specified and processing can start.
Example BEGIN
Usage BTIME lower_val, upper_val, numexcl, #, #, etc.
Description The user can select points within the Lambda z time range to be excluded
from computations of Lambda z. In the following example, Lambda z is to be
computed using times in the range of 12 to 24. However, the concentrations
at 16 and 20 hours will not be used in the computation of Lambda z. These
excluded points will, however, still be used in the computation of the phar-
macokinetic parameters.
Example BTIME 12, 24, 2, 16, 20
Notes If there are no times to be excluded, enter a zero for the number of times, or
leave it blank.
Do not mark a point for exclusion by setting the case weight to 0 as that will
also exclude this data point from the calculation of the PK parameters.
WinNonlin
Users Guide
622
D
C
CARRYA-
LONG
COMMAND
COMMANDS MODEL BLOCK
Usage CARRY #, etc.
Description The user can specify variables from the input data grid to be copied into the
output. These variables are not required for the analysis, but are included in
each of the output worksheets.
Examples CARRY 3
CARR 1
CARRYALONG 2
Notes See the NCARRY command.
How Carry Along Data is Migrated to Output Multigrids
The data for carry along columns is moved to all output multigrids from PK
(PK/PD) or NCA analyses, with the exception of the last multigrid, named
Settings. This final multigrid does not receive any carry along data.
For all output multigrids other than the Summary Table, the carry along col-
umns will be located at the end (right-most) of the multigrid. The first cell of
data for any given profile within a carry along column will be copied over the
entire profile range of output data for a given multigrid. This technique must
be used as there will almost always be a differing number of observations on
the raw data set than there will be for any generated multigrid.
The exception is in the generation of the Summary Table multigrids. The
carry along columns will be the first columns of data on the multigrid, pre-
ceded only by any sort key columns that may have been specified. Also, as
there is almost the same number of observations in the raw data set as in the
Summary Table, all the cells of data within a profile of a carry along column
are copied over to the Summary Table, not just the first value. There is one
special case here as well, that being when doing an NCA analysis without a
first data point of t=0, c=0. When such a data point does not exist on the raw
data set, depending on which NCA model is selected, the core program may
generate a pseudo-point of t=0, c=0 to be able to perform all necessary calcu-
lations. In this event, the first cell of data within a carry along column is copied
'up' to the core-generated data value of 0,0.
Usage COMMANDS
Statements
END
Commands, Arrays and Functions
C
623
D
CON ARRAY
CONSTANTS COMMAND
CONVER-
GENCE
COMMAND
Description The COMMAND - END block allows WinNonlin commands to be permanently
inserted into a model. Following the COMMANDS statement, any WinNonlin
command such as NPARAMETERS, NCONSTANTS, PNAME, etc., may be
given. To end the COMMAND section use the END statement.
Example COMMANDS
NCON 2
NPARM 4
PNAME 'A', 'B', 'Alpha', 'Beta'
END
Usage CON(N)
Description The array CON contains the values of the constants, such as dosing informa-
tion, used to define the model. The index N specifies the Nth constant.
Example CON(3)
Note The values specified by the CONSTANT command, described below, corre-
spond to CON(1), CON(2), etc. respectively.
Usage CONSTANTS [are | =] C1, C2, ..., CN
Description The CONSTANTS command specifies the values of the constants (such as
dosing information) required by the model being used. The arguments C1,
C2, ..., CN are the values of the constants.
Examples CONSTANTS 20, 2.06, -1
CONS are 5, 2
Note The NCONSTANTS command must appear before CONSTANTS.
Usage CONVERGENCE [is | =] C
Description The CONVERGENCE command specifies the convergence criterion for the
algorithms. The argument C is the value of the convergence criterion.
Values for CONVERGENCE must be greater than 0 and less than 0.1. The
default value is 10
-4
.
Examples CONVERGENCE = 1.e-6
CONV .001
WinNonlin
Users Guide
624
D
D
DATA COMMAND
DATE COMMAND
DHEADERS COMMAND
Note The test for convergence is
where SS is the residual sum of squares.
When 0 is specified as the CONVERGENCE criterion, convergence checks
and halvings are turned off. This option is useful when obtaining maximum
likelihood estimates.
SSnew SSold
SSold
--------------------------------------
C <
Usage DATA [[are in,] 'path']
Description The DATA command begins data input and optionally specifies an external
data file. If arguments are omitted the data are expected to follow the DATA
statement. If the arguments are used, path is the full path of the data set and
must be 64 characters or less in length.
Examples DATA
DATA 'C:\MYLIB\MYFILE.DAT'
Usage DATE
Description The DATE command places the current date in the upper right corner of each
page in the ASCII output.
Example DATE
Usage DHEADERS
Description Statement in a .CMD file which specifies that data included in the command
file have variable names as the first row.
Example DHEADERS
Note If a DNAMES command is also included in the .CMD file, these names will
override the names included with the data file.
Commands, Arrays and Functions
D
625
D
DIFFEREN-
TIAL
MODEL BLOCK
DINCRE-
MENT
COMMAND
DNAMES COMMAND
Usage DIFFERENTIAL
Statements
END
Description Statements in the DIFFERENTIAL - END block define the system of differen-
tial equations to fit. The values of the differential equations are assigned to
the DZ array.
Example DIFFERENTIAL
DZ(1) = -(K1+KE)*Z(1) + K2*Z(2)
DZ(2) = K1*Z(1) - K2*Z(2)
END
Note The NDERIVATIVES statement must be used to specify the number of differ-
ential equations to fit. The NFUNCTIONS command specifies the number of
differential equations and/or other functions with associated data.
Usage DINCREMENT [is | =] D
Description The DINCREMENT command specifies the increment to use in the estimation
of the partial derivatives. The argument D is the increment to use in the partial
derivative estimation.
Values for DINCREMENT must be greater than 0 and less than 0.1. The
default value is 0.0001
Examples DINCREMENT is 0.001
DINC 0.005
Usage DNAMES [are | =] 'name1' , 'name2' , . . . , 'nameN'
Description The DNAMES command assigns names to the columns on the data set. The
arguments 'name1', 'name2', . . . ,'nameN' are names of the variables and
may be up to eight letters, numbers or underscores in length, and must begin
with a letter. They may be separated by commas or spaces.
Example DNAMES 'Subject', 'Time', 'Conc'
Note These names are used in the output and may also be used in the modeling
code.
If both DNAMES and DHEADERS commands are included in a command file,
DNAMES will take precedence.
WinNonlin
Users Guide
626
D
DTA ARRAY
DTIME COMMAND
DZ ARRAY
F
F VARIABLE
FINISH COMMAND
Usage DTA(N)
Description DTA(N) returns the value of the Nth column for the current observation.
Example T = DTA(1)
W = DTA(3)
Usage DTIME #
Description DTIME specifies the time of the last administered dose. This value will be
printed out on the Final Parameters table as Dosing_time. Computation of the
final parameters will be adjusted for this dosing time.
Example DTIME 48
Usage DZ(N)
Description The array DZ contains the current values of the differential equations. The
index N specifies the particular differential equation in the order listed in the
DERIVATIVE command.
Example DZ(3) = -P(3)*Z(3)
Note The maximum value of N is specified by the NDERIVATIVES command.
Usage F
Description F returns the value of the function for the current observation.
Example F = A * exp(-B*X)
Usage FINISH
Commands, Arrays and Functions
F
627
D
FNUMBER COMMAND
FUNCTION MODEL BLOCK
Description The FINISH command is retained in WinNonlin to provide compatibility with
PCNonlin Version 4. It should immediately follow the BEGIN command.
Example BEGIN
FINISH
Usage FNUMBER [is | =] N
Description The FNUMBER command indicates the variable (column) in the data set to
be used to delineate data for the individual functions when NFUN > 1.
Examples FNUMBER is 3
FNUM 3
Note The FNUMBER command should be specified prior to the DATA command.
Usage FUNCTION N
Statements
END
Description The FUNCTION - END block contains statements to define the function to be
fit to the data. The argument N indicates the function number.
Examples FUNC 1
F=A*EXP(B) + C*EXP(D)
END
FUNC 1
F=A*EXP(B) + C*EXP(D)
END
FUNC 2
F=Z(1)
END
Note A function block must be used for every data set to be fit. The NFUNCTIONS
command specifies the number of function blocks.
The variable F must be assigned the function value. WT can be assigned a
value to use as the weight for the current observation.
WinNonlin
Users Guide
628
D
I
INITIAL COMMAND
ITERATIONS COMMAND
L
LOWER COMMAND
Usage INITIAL [ARE | =] I1, I2, I3, . . . , IN
Description The INITIAL command specifies the initial values for the estimated parame-
ters. The arguments I1, I2, I3, . . . , IN are the initial values. They may be sep-
arated by commas or blanks.
Examples INITIAL = 0.01, 5.e2, -2.0
INIT are 0.02, 10, 1.3e-5
INIT 0.1 .05 100
Note The INITIAL command must be preceded by an NPARAMETERS command.
Usage ITERATIONS [are | =] N
Description The ITERATIONS command specifies the maximum number of iterations to
be executed. The argument N is the maximum number of iterations.
Examples ITERATIONS are 30
ITER 20
Note If ITERATIONS is set to 0, the usual output is produced using the initial esti-
mates as the final values of the parameters.
Usage LOWER [are |=] L1, L2, L3, . . . , LN
Description The LOWER command specifies lower bounds for the estimated parameters.
The arguments L1, L2, L3, . . . , LN are the lower bounds. They may be sepa-
rated by commas or blanks.
Example LOWER 0 0 10
Note If the LOWER command is used, a lower bound must be provided for each
parameter, and the UPPER command must also be specified. The LOWER
command must be preceded by the NPARAMETERS command.
Commands, Arrays and Functions
M
629
D
M
MEAN-
SQUARE
COMMAND
METHOD COMMAND
MODEL COMMAND
Usage MEANSQUARE [is | =] M
Description The MEANSQUARE command allows a specified value other than the resid-
ual mean square to be used in the estimates of the variances and standard
deviations. The argument M replaces the residual sum of squares in the esti-
mates of variances and standard deviations.
If given, MEANSQUARE must be greater than 0.
Examples MEANSQUARE = 100
MEAN=1.0
Usage METHOD [is =] N
Description When modeling, the METHOD command specifies the type of fitting algorithm
WinNonlin is to use. The argument N takes on the following values:
1. Nelder-Mead Simplex
2. Levenberg and Hartley modification of Gauss-Newton (default)
3. Hartley modification of Gauss-Newton
When doing noncompartmental analysis, METHOD specifies the method to
compute area under the curve. The argument N takes on the following values:
1. Lin/Log - Linear trapezoidal rule up to Tmax, and log trapezoidal rule for the
remainder of the curve
2. Linear trapezoidal rule (Linear interpolation) (default)
3. Linear up/Log down rule Uses the linear trapezoidal rule any time the
concentration data is increasing and the logarithmic trapezoidal rule any time
that the concentration data is decreasing.
4. Linear Trapezoidal (Linear/log Interpolation)
Example METHOD is 2
METH 3
Usage MODEL [N[[,] 'path']]
Description In a command file, MODEL specifies the compiled or source model to use. If
MODEL N is specified, model N is used from the built-in library. If MODEL
N, PATH is used, model N from the source file path is used.
Valid values for MODEL are 1 to 64. The default value is 2.
WinNonlin
Users Guide
630
D
MODEL LINK COMMAND
N
NCARRY COMMAND
NCATRANS COMMAND
Examples MODEL 5
MODEL 7, 'PK'
MODEL 3 'D:\MY.LIB'
Usage MODEL LINK M1 [,] M2
Description The MODEL command with the option LINK specifies that compiled models
are to be used to perform PK/PD or Indirect Response modeling. The argu-
ments M1 and M2 are model numbers where:
M1 is the PK model number, and
M2 is the model number of the PD model or Indirect Response model.
When this option is used a PKVAL command must also be used.
Examples MODEL LINK 4 101
PKVAL 10 1.5 1.0 1.0
MODE LINK 1, 53
PKVA 10, 2.5
Note See also PKVAL command.
Usage NCARRY [are | =] N
Description The NCARRY command specifies the number of carry-over variables speci-
fied. The argument N is the number of carry-over variables.
Examples NCAR are 3
NCAR 1
Note The NCARRY command must be specified before the CARRY command.
See the CARRY command.
Usage NCATRANS
Description When using Noncompartmental Analysis the NCATRANS command specifies
that the Final Parameters will present each final parameter value in a sepa-
rate column, rather than row. See Transpose Final Parameter Table on
page 231.
Commands, Arrays and Functions
N
631
D
NCON-
STANTS
COMMAND
NDERIVA-
TIVES
COMMAND
NFUNC-
TIONS
COMMAND
Examples NCATRANS
NCAT
Usage NCONSTANTS [are | =] N
Description The NCONSTANTS command specifies the number of constants, N, required
by the model. If used, NCONSTANTS must precede CONSTANTS.
Examples NCONSTANTS are 3
NCON 1
Note The NCONSTANTS command must be specified before the CONSTANTS
command.
Usage NDERIVATIVES [are | =] N
Description The NDERIVATIVES command indicates the number, N, of differential equa-
tions in the system that WinNonlin is fitting.
Examples NDERIVATIVES are 2
NDER 5
Usage NFUNCTIONS [are | =] N
Description The NFUNCTIONS command indicates the number of functions to be fit.
There must be data available for each function. The argument N is the num-
ber of functions (default = 1). If used, NFUNCTIONS must precede DATA.
Examples NFUNCTIONS are 2
NFUN 3
Note The functions can contain the same parameters so that different data sets
can contribute to the parameter estimates.
When fitting multiple functions one must in some way delineate which obser-
vations belong to which functions. To do this, include a FUNCTION variable
on the data set or use the NOBSERVATIONS command. See the FNUMBER
command or the NOBSERVATIONS command.
WinNonlin
Users Guide
632
D
NOBOUNDS COMMAND
NOBSERVA-
TIONS
COMMAND
NOPAGE COMMAND
NOPLOTS COMMAND
Usage NOBOUNDS
Description The NOBOUNDS command tells WinNonlin not to compute bounds during
parameter estimation.
Examples NOBOUNDS
NOBO
Note Unless a NOBOUNDS command is supplied WinNonlin will either use bounds
that the user has supplied, or compute bounds.
Usage NOBSERVATIONS [are | =] N
1
, N
2
, N
3
, . . . , N
F
Description When more than one function is fit simultaneously, NOBSERVATIONS may
be used to indicate which observations are to be used for each function. The
arguments N
1
, N
2
, N
3
, . . . , N
F
are the number of observations to be used
with each of the functions. If used, NOBSERVATIONS must precede DATA.
Example NOBS 10, 15, 12
Note An alternate approach is to include a FUNCTION variable whose values indi-
cate the number of the function to which the observations belong. (See
FNUMBER.)
Usage NOPAGE
Description The NOPAGE command tells WinNonlin to omit page breaks on the ASCII
output file.
Examples NOPAGE
NOPAGE BREAKS ON OUTPUT
Usage NOPLOTS
Description The NOPLOTS command specifies that no plots are to be produced.
Example NOPLOTS
Note This command affects both the high resolution plots and the ASCII output.
Commands, Arrays and Functions
N
633
D
NOSCALE COMMAND
NOSTRIP COMMAND
NPAUC COMMAND
NPARAME-
TERS
COMMAND
NPOINTS COMMAND
Usage NOSCALE
Description The NOSCALE command turns off the automatic scaling of weights when the
WEIGHT command is used. By default, the weights are scaled such that the
sum of the weights equals the number of observations with non-zero weights.
Example NOSCALE
Note This command will have no effect unless the WEIGHT command is used.
Usage NOSTRIP
Description The NOSTRIP command turns off curve stripping for all profiles.
Example NOSTRIP
Usage NPAUC #
Description The NPAUC command specifies the number of partial area under the curve
computations requested.
Examples NPAUC 3
Note See the PAUC command.
Usage NPARAMETERS [are | =] N
Description NPARAMETERS specifies the number of parameters to be estimated. The
argument N is the number of parameters. NPARAMETERS must precede INI-
TIAL, LOWER or UPPER. Note that LOWER and UPPER are optional.
Examples NPARAMETERS 5
NPAR 3
Note See the PNAMES command.
Usage NPOINTS [is | =] N
WinNonlin
Users Guide
634
D
NSECOND-
ARY
COMMAND
NVARIABLES COMMAND
P
P ARRAY
Description This determines the number of points in the Predicted Data file. Use this
option to create a data set to be used to plot a smooth curve. The minimum
allowable value is 10 and the maximum is 20,000.
Example NPOINTS 200
Notes For compiled models without differential equations the default value is 1000.
If NDER> 0 (i.e., differential equations are used) this command is ignored and
the number of points is equal to the number of points in the data set.
The default for user models is the number of data points. This value may be
increased only if the model has only one independent variable.
Usage NSECONDARY [are | =] N
Description The NSECONDARY command specifies the number of secondary parame-
ters to be estimated. The argument N indicates the number of secondary
parameters to be estimated.
Examples NSECONDARY 2
NSEC = 3
Note See the SNAMES command.
Usage NVARIABLES [are | =] N
Description The NVARIABLES command specifies the number of columns of data in the
data grid. The argument N is the number of columns (default = 2). If used,
NVARIABLES must precede the DATA command.
Examples NVARIABLES 5
NVAR 3
Usage P(N)
Commands, Arrays and Functions
P
635
D
PAUC COMMAND
PKVALUE COMMAND
PNAMES COMMAND
Description The array P contains the values of the estimated parameters for the current
iteration. The index N specifies the Nth estimated parameter.
Examples P(1)
T=P(3) - A
Note The values on the INITIAL command correspond to P(1), P(2), etc., respec-
tively. The NPARAMETERS command specifies the value of N.
The PNAMES command can be used to assign aliases for P(1), P(2), etc.
Usage PAUC #, # etc.
Description Lower, upper values for the partial AUC computations. If a specified time
interval does not match times on the data set, then WinNonlin will generate
concentrations corresponding to those times.
Examples PAUC 0, 5, 17, 24
Note See the NPAUC command.
Usage PKVALUE N1, N2,. . . ,NPK
Description The PKVALUE command is used to assign parameter values to the PK model
when using the MODEL LINK command.
Examples MODEL LINK 4 101
PKVAL 10 1.5 1.0 1.0
MODE LINK 1, 53
PKVA 10, 2.5
Usage PNAMES [are | =] 'name1', 'name2', . . . , 'nameN'
Description The PNAMES command specifies the names associated with the estimated
parameters. The arguments 'name1', 'name2', . . . ,'nameN' are names of the
parameters and may be up to eight letters, numbers, or underscores in
length, and must begin with a letter. These names are used in the output and
may also be used in the modeling code.
Examples PNAMES are 'ALPHA', 'BETA', 'GAMMA'
PNAM 'K01', 'K10', 'VOLUME'
Note The number of names specified must equal that for NPARAMETERS.
WinNonlin
Users Guide
636
D
PUNITS COMMAND
R
REMARK COMMAND
REWEIGHT COMMAND
Usage PUNITS [are | =] 'unit1', 'unit2', . . . , 'unitN'
Description The PUNITS command specifies the units associated with the estimated
parameters. The arguments 'unit1', 'unit2', . . . ,'unitN' are units of the parame-
ters and may be up to eight letters, numbers, operators or underscores in
length. These units are used in the output.
Examples PUNITS are 'hr', 'ng/mL', 'L/hr'
PUNI 'hr'
Note The number of units specified must equal that for NPARAMETERS.
Usage REMARK [comment]
Description The REMARK statement allows comments to be placed in a command file.
Examples REMARK Y transformed to log(y)
REMA GAUSS-NEWTON
Note If a command takes no arguments or a fixed number of arguments, comments
may be placed on the same line as a command after any required arguments.
For Example -
MODEL 1: Nelder-Mead
Usage REWEIGHT W
Description In the PK modeling module, the REWEIGHT command specifies that itera-
tively reweighted least squares estimates of the parameters are to be com-
puted. The weights have the form WT = FW where W is the argument of the
REWEIGHT command and F is the current value of the estimated functions.
If W < 0 and F < 0 then the weight is set to 0.
Examples REWEIGHT 2
REWE -.5
Commands, Arrays and Functions
S
637
D
S
S ARRAY
SECONDARY MODEL BLOCK
Note The REWEIGHT command is useful for computing maximum likelihood esti-
mates of the estimated parameters.
The following statement in a model is equivalent to the REWEIGHT com-
mand:
WT = exp(W log(F)), or
WT = F**W
This command is not used with noncompartmental analysis.
Usage S(N)
Description The array S contains the estimated secondary parameters. The index N spec-
ifies the Nth secondary parameter.
Example S(1) = -P(1)/P(2)
Note The value of N is specified by the NSECONDARY command. Aliases may be
assigned for S(1), S(2), etc. using the SNAMES command.
The secondary parameters are defined in the SECONDARY section of the
model definitions.
Usage SECONDARY
Statements
END
Description The secondary parameters are defined in the SECONDARY - END block.
Assignments are made to the array S.
Examples SECONDARY
S(1)=0.693/K10
END
Or, if the command SNAMES 'K10_HL' and a PNAMES
command with the alias K10 have been included:
SECONDARY
K10_HL=0.693/K10
END
Note The NSECONDARY command must be used to specify the number of sec-
ondary parameters.
WinNonlin
Users Guide
638
D
SIMULATE COMMAND
SIZE COMMAND
SNAMES COMMAND
SORT COMMAND
Usage SIMULATE
Description The SIMULATE command causes the specified model to be estimated using
only the time values in the data set and the initial values. It must precede the
DATA statement, if one is included.
Example SIMULATE
Note The SIMULATE command may be placed in any set of WinNonlin commands.
When encountered, no data fitting is performed, only the estimated parame-
ters and predicted values from the initial estimates are computed. All other
output such as plots and secondary parameters are also produced.
Usage SIZE N
Description The SIZE command has as its argument the model size. Model size sets
default memory requirements. Model size may range from 1 to 64; the default
size is 2.
Example SIZE 3
Note Model size is only applicable when using ASCII models.
Usage SNAMES [are | =] 'name1', 'name2', . . . , 'nameN'
Description The SNAMES command specifies the names associated with the secondary
parameters. The arguments 'name1', 'name2', . . , 'nameN' are names of the
secondary parameters and may be up to eight letters, numbers or under-
scores in length, and must begin with a letter. These names are aliases for
S(1), S(2), etc. They are used in the output and may also be used in the pro-
gramming statements.
Examples SNAMES are 'AUC', 'Cmax', 'Tmax'
SNAM 'K10_HL' 'K01_HL'
Usage SORT 1 [,] s1 [,] s2 . . .
Commands, Arrays and Functions
S
639
D
STARTING MODEL BLOCK
STEADY
STATE
COMMAND
SUNITS COMMAND
Description The SORT command causes WinNonlin to segment a large data file into
smaller subsets. Each subset will be run through the modeling separately.
Arguments s1 and the options s2, s3, etc. are the column numbers of the sort
keys that may be specified.
The 1 that follows the command SORT has no function. It is included to pro-
vide compatibility with PCNonlin version 4.
Examples SORT 1, 1
SORT 1 3 2
SORT 1, 1, 2
Note The SORT command must be on one line only, i.e., it can not use the line con-
tinuation symbol, '&.
Usage STARTING
Statements
END
Description Statements in the STARTING - END block specify the starting values of the
differential equations. Values are placed in the Z array. Parameters can be
used as starting values.
Example START
Z(1) = CON(1)
Z(2) = 0
END
Usage STEADY STATE #
Description This command informs WinNonlin that data were obtained at steady state. In
this instance, a different set of PK parameters is computed. # is Tau, the
(assumed equal) dosing interval. In the following example, dosing was admin-
istered every 12 hours, and data were obtained at steady state.
Examples STEADY STATE 12
STEA 12
Usage SUNITS [are | =] 'unit1', 'unit2', . . . , 'unitN'
WinNonlin
Users Guide
640
D
T
TEMPORARY MODEL BLOCK
TIME COMMAND
TITLE COMMAND
Description The SUNITS command specifies the units associated with the secondary
parameters. The arguments 'unit1', 'unit2', . . . ,'unitN' are units of the second-
ary parameters and may be up to eight letters, numbers, operators or under-
scores in length. These units are used in the output.
Examples SUNITS are 'ml', 'mL/hr'
SUNI '1/hr'
Note The number of units specified must equal that for NSECONDARY.
Usage TEMPORARY
Statements
END
Description Statements placed on the TEMPORARY - END block define global temporary
variables that can be used in the MODEL statements.
Example TEMP
T=X
DOSE1 = CON(1)
TI=CON(2)
K21=(A*BETA + B*ALPHA)/(A+B)
K10=ALPHA*BETA/K21
K12=ALPHA+BETA-K21-K10
END
Usage TIME
Description The TIME command places the current time in the upper right hand corner of
each output page.
Example TIME
Usage TITLE [N]
Commands, Arrays and Functions
U
641
D
TRANSFORM MODEL BLOCK
U
UPPER COMMAND
URINE COMMAND
Description The TITLE command indicates that the following line contains a title to be
printed on each page of the output.
Up to five titles may be allowed per run. To specify any title other than the first,
a value N must be included with the TITLE command. N may take on the val-
ues 1 through 5.
Examples TITLE
Experiment EXP-4115
TITLE 1
Experiment EXP-4115
TITLE 2
Subject #1
Usage TRANSFORM
Statements
END
Description Statements placed in the TRANSFORM - END block are executed for each
observation before the estimation begins.
Example TRANSFORM
Y = exp(Y)
END
Usage UPPER [are |=] U
1
, U
2
, U
3
, . . . , U
N
Description The UPPER command specifies upper bounds for the estimated parameters.
The arguments U
1
, U
2
, U
3
, . . . , U
N
are the upper bounds. They may be sep-
arated by commas or blanks.
Example UPPER 1, 1, 200
Note If the UPPER command is used, an upper bound must be provided for each
parameter, and the LOWER command must also be specified. The UPPER
command must be preceded by the NPARAMETERS command.
Usage URINE LOWER [is | =] C1 UPPER [is | =] C2 VOLUME [is | =] C3 [is | =] CON-
CENTRATION [is | =] C4
WinNonlin
Users Guide
642
D
W
WEIGHT COMMAND
WT VARIABLE
Description The URINE command is used to specify variables when doing noncompart-
mental analysis for urine data (Models 210-212). The user must supply:
the beginning time of the urine collection interval,
the ending times of the urine collection interval,
the volume of urine collected, and
the concentration in the urine.
The four keywords LOWER UPPER VOLUME, and CONCENTRATION spec-
ify which column number is being indicated. The arguments C1 - C4 are the
column numbers for these variables.
Examples URINE LOWER=C1 UPPER=C2 VOLUME=C3 CONC=C4
URINE CONC C1 VOLU C2 LOWE C3 UPPE C4
Note The keywords may appear in any order, and only the first four letters of each
keyword is required. Variables must be specified for all four keywords.
Usage WEIGHT [W]
Description WEIGHT activates weighted least squares computations. The argument W
sets the weight value: YW. If W is not specified, a column in the data set pro-
vides weights, by default, the third column. Another column may be specified
using WTNUMBER.
Examples WEIGHT Uses the values in Column 3 as the weights
WEIGHT -.5 Uses as the weight 1/Sqrt(Y)
WEIGHT
WTNUM 7 Uses the values in Column 7 as the weights
Note The weights are scaled so that the sum of the weights is equal to the number
of observations with non-zero weights.
See also WTNUMBER, WT, REWEIGHT and NOSCALE.
Usage WT
Description In the PK modeling module, the variable WT contains the weight to be used
for the current observation.
Example WT = 1/(F*F)
Commands, Arrays and Functions
X
643
D
WTNUMBER COMMAND
X
X VARIABLE
XNUMBER COMMAND
Note If the variable WT is included in a model, then any weighting indicated via the
Variables and Weighting dialog box will be ignored.
Usage WTNUMBER [is | =] N
Description The WTNUMBER command specifies from which column of the data set that
the weights are to be read.
Examples WTNUMBER 4
WTNU is 7
Note If WEIGHT is specified and WTNUMBER is not, the default column for the
weights is 3. See WEIGHT on page 642.
This command is not used with noncompartmental analysis.
Usage X
Description X contains the current value of the independent variable.
Example F = exp(-X)
Note By default, when used in a command file, the values of X are taken from the
first column of the data set unless the XNUMBER command has been used.
Usage XNUMBER [is | =] N
Description XNUMBER sets the column number, N, of the independent variable. If differ-
ential equations are being fit, XNUMBER indicates the column number that
the differential equations are integrated with respect to. The default value is 1.
Examples XNUMBER is 3
XNUM 1
Note The XNUMBER command should precede the DATA command.
WinNonlin
Users Guide
644
D
Y
Y VARIABLE
YNUMBER COMMAND
Z
Z ARRAY
Usage Y
Description Y is the current value of the dependent variable.
Example Y = log(Y)
Note
By default, Y is assumed to be in the 2
nd
column unless YNUMBER is used.
Usage YNUMBER [is | =] N
Description The YNUMBER command specifies the column number, N, of the dependent
variable. When running Version 4 command files, the default value is 2.
Examples YNUMBER is 4
YNUM 3
Note The YNUMBER command should precede the DATA command.
Usage Z(N)
Description The array Z contains the current values of the solutions of the differential
equations. The index N specifies the Nth differential equation.
Example B = A*Z(2)
Note The maximum value of N is specified by the NDERIVATIVES command.
645
Appendix E
Scripting Commands
WinNonlin scripting language commands, syntax
and usage
For instructions on writing and executing WinNonlin scripts, refer to Script-
ing on page 489. See the Examples Guide and Examples of individual
scripting operations on page 520 for example scripts.
A
AggregateVar Property
Applies To Table
Description Defines the variable from Data Set 1 that composes the body of the table.
Syntax Table.AggregateVar = VariableName
Remarks Applies to Tables 9 and 10. The Aggregate Variable is much like a Variable
in Tables 4-8. In Tables 9 and 10 the Aggregate Variable is divided into sep-
arate columns based on the values of the Cross Variable(s). Note that only
one Aggregate Variable may be used.
Example
Table.AggregateVar = Conc
AlphaTerms() Property
Applies To Toolbox
Syntax Toolbox.AlphaTerms(n)=number
Remarks (n) corresponds to the number set by NumTerms
See Also NumTerms
Example
Toolbox.AlphaTerms(1)=.229
Toolbox.AlphaTerms(2)=3.84
WinNonlin
Users Guide
646
E
Append Method
Applies To Data
Description Add or attach a file to another file.
Syntax Objectname.Append
Remarks Note that data can be appended to a Pharsight workbook object (.PWO), but it
is not possible to append a .PWO to another file.
When using Append:
If different missing value codes are used in the two data sets WinNonlin will not update
these automatically. Use Find/Replace to standardize the missing value codes.
Formulas: Formulas from Excel files will be lost in the process. Only the values them-
selves are appended to the original data set.
The ReadOnly status is not recalled for the appended file. The ReadOnly status of the
original file will be maintained.
All load options are in effect as usual. When using the Data.Append method, if the file
type is ASCII, it will use the .Headers, .Delimiter, etc. properties when appending the file,
just as the Data.Load method would.
See Also AppendFilename, AppendFileType, Headers, Delimiter, Missing
Example
MYDATA.AppendFilename = C:\MYDIR\newdata.xls
MYDATA.AppendFileType = EXCEL
MYDATA.Append
AppendFilename Property
Applies To Data
Description Specifies a file to be appended to an existing data object.
Syntax objectname.AppendFilename = string
See Also Append, AppendFileType
AppendFileType Property
Applies To Data
Description Specifies the file format of the file to be appended to an existing data object.
Syntax objectname.AppendFileType = {ASCII | EXCEL}
Remarks .PWO file types are not supported with this property.
See Also Append, AppendFilename
Scripting Commands
A
647
E
Example
MYDATA.AppendFilename = C:\MYDIR\newdata.xls
MYDATA.AppendFileType = EXCEL
MYDATA.Append
AppendFileType (continued) Property
AppendSheet Property
Applies To Data
Description Selects the sheet of a multisheet workbook to be used for an append opera-
tion (similar to the Multigrid Property). Only used with the Append method.
Syntax MYDATA.AppendSheet=Final Parameters
Remarks Used with the Append method of the Data property.
Example
MYDATA1.Filename=Test1
MYDATA1.Load
MYDATA1Multigrid=Sheet 3
MYDATA1.AppendFilename=Test2
MYDATA1.AppendSheet=Sheet 1 <-selected sheet to append
MYDATA1.Append
Arrange Method
Applies To WinNonlin
Description Arranges the icons representing any minimized windows in WinNonlin.
Syntax WinNonlin Arrange
Aterms() Property
Applies To Toolbox
Syntax Toolbox.Aterms(n)=number
Remarks (n) corresponds to the number set by NumTerms
See Also NumTerms
Example
Toolbox.Aterms(1)=12.3
Toolbox.Aterms(2)=8.1
WinNonlin
Users Guide
648
E
B
C
AutoFileOptions Property
Applies To Data
Description Turns on automatic file options when loading a data file.
Syntax DataObject.AutoFileOptions = True/False
AutoSort Property
Applies To Plot
Description If AutoSort is set to True (default), then the column defined for the X vari-
able will automatically be sorted before the plot is generated.
Syntax Plot.AutoSort = {True | False}
Example Plot.AutoSort = False
Bolus Property
Applies To Toolbox
Description Selects whether the program will constrain the estimated input rate to be
zero at the initial time (lag time)
Syntax Toolbox.Bolus={True|False}
Example Toolbox.Bolus=True
CarryData Property
Applies To Merge
Description Indicates whether or not the Carry along data for like sort levels check box
will be checked.
Syntax Merge.CarryData = {True | False}
Remarks The default is True.
Scripting Commands
C
649
E
Cascade Property
Applies To WinNonlin
Description Causes the open objects to be cascaded in the WinNonlin window.
Syntax WinNonlin.Cascade
See Also TileHorizontal and TileVertical
Example WinNonlin.Cascade
CaseSensitive Property
Applies To Data
Description Specifies whether a search is case sensitive or not.
Syntax Objectname.CaseSensitive = {True | False}
Remarks Use with Include, Exclude, Remove, RemoveCol, RenameCol and Replace
Example
MYDATA.SearchArea=CONC
MYDATA.Find=3
MYDATA.Operation==
MYDATA.Tolerance=0
MYDATA.CaseSensitive=False
MYDATA.With=Missing
MYDATA.Replace
CloseAll Method
Applies To WinNonlin
Description Closes all window objects within WinNonlin.
Syntax WinNonlin.CloseAll
Remarks Any information that had not been previously saved will be lost.
See Also Unload
Column Property
Applies To Data
Description Specifies the name of a column to be renamed or removed.
WinNonlin
Users Guide
650
E
Syntax Objectname.Column = string
Remarks Use with RemoveCol and RenameCol.
Example
MYDATA.Column=a
MYDATA.With=Subject
MYDATA.RenameCol
Column (continued) Property
ConcCol Property
Applies To Toolbox
Description Specifies input data set column for Concentration
Syntax Toolbox.ConcCol=column name
Example Toolbox.ConcCol=Concentration
Confidence Property
Applies To Desc
Description When Confidence is set to True, it specifies that confidence intervals are
to be calculated when doing descriptive statistics.
Syntax Desc.Confidence = {True | False}
Remarks The default is False.
See Also Interval, Percentiles
Example Desc.Confidence = True
ConseqDelim Property
Applies To Data
Description When ConseqDelim is set to True, it causes the Load method to treat con-
secutive delimiters as one while reading a file.
Syntax objectname.ConseqDelim = {True | False}
Remarks ConseqDelim is used only when loading ASCII data. If this value is not set,
the system will use the value specified on the most-recent Load method.
See Also Delimiter, Missing, Headers
Scripting Commands
C
651
E
Copy Method
Applies To Data
Description Copies a specified range of data and stores it for use with the Paste function.
Syntax Objectname.Copy = string
Remarks Use with the Paste method.
Optionally, specify a selection of cells for copying using the StartCol, End-
Col, StartRow and EndRow properties. To specify an entire column (or
entire columns) use just the StartCol and EndCol properties. To specify an
entire row (or entire rows) use just the StartRow and EndRow properties.
See Also StartCol, StartRow, EndCol, EndRow
Example
MYDATA.Filename = <file name>
MYDATA.StartCol=a
MYDATA.StartRow=1
MYDATA.EndCol=b
MYDATA.EndRow=20
MYDATA.Copy
MYDATA.StartCol=e
MYDATA.StartRow=1
MYDATA.Paste
CrossVar( ) Property
Applies To Table
Description Defines the Cross Variable for the Table engine. Cross variables are used to
define the columns when breaking a variable into separate columns for dis-
play in the table.
Syntax Table.CrossVar(Variable no.) = Variable Name
Remarks Applies to Table numbers 4, 5, 6, 7, 8, 9. The example shown below speci-
fies that the CrossVars are Subject and Form. For Table 9, the Cross Vari-
ables must come from Data Set 1.
See Also GroupVar( ), IDVar( ), RegVar( )
Example
Table.CrossVar(1) = Subject
Table.CrossVar(2) = Form
WinNonlin
Users Guide
652
E
CrossVars Property
Applies To Table
Description Defines the number of Cross variables for the Table engine.
Syntax Table.CrossVars = integer
Remarks Applies to Table no. 4, 5, 6, 7, 8, 9.
The following example specifies that there are 2 Cross variables used in the
table.
See Also GroupVars, IDVars, RegVars
Example Table.CrossVars = 2
Cut Method
Applies To Data
Description Cuts a specified range of data from a data set and stores it for use with the
Paste function.
Syntax Objectname.Cut = <string>
Remarks Use with the Paste method. To specify a selection of cells to be cut, use the
StartCol, EndCol, StartRow and EndRow properties. To specify an entire
column (or entire columns) use only the StartCol and EndCol properties. To
specify an entire row (or entire rows) use only the StartRow and EndRow
properties.
See Also StartCol, StartRow, EndCol, EndRow
Example
MYDATA.Filename = <file name>
MYDATA.StartCol=A
MYDATA.StartRow=1
MYDATA.EndCol=J
MYDATA.EndRow=10
MYDATA.Cut
MYDATA.StartRow=5
MYDATA.StartCol=A
MYDATA.Paste
Scripting Commands
D
653
E
D
DefinitionFile Property
Applies To Table
Description Loads a definition file that contains all of the specifications for a table,
except the data file(s) to be used.
Syntax Table.DefinitionFile = string
Remarks A table definition file contains all of the information about the table, except
the input data set to be used. Note that any input data file that includes the
variables used in the table definition (with the exact same variable names)
may be used with this definition file.
Note that it may sometimes be necessary to turn a table definition file off.
If one script will use a table definition file, and then subsequently create
another table using Scripting Language commands, include the command:
TABLE.DefintionFile=
to nullify the definition file before using the commands.
Similar to graphics template files, a definition file is machine readable only.
It must be created by the Table Generator and saved there.
Example Table.DefinitionFile=c:\winnonln\mytable.tdf
DeleteFiles Method
Applies To WinNonlin
Description Deletes all files selected using the FileMask property.
Syntax WinNonlin.DeleteFiles
Remarks Directory names and *.* are not allowed in file specifications.
See Also FileMask
Example
WinNonlin.FileMask = c:\winnonln\examples\*.xls
WinNonlin.DeleteFiles
Delimiter Property
Applies To Data
Description Specifies the field delimiter to use when the Load method is used.
WinNonlin
Users Guide
654
E
Syntax objectname.Delimiter = character
Remarks This property is only used while loading ASCII data files. If this value is not
specified, the system will use the value specified for the most-recent Load
method.
See Also ConseqDelim, Missing, Headers
Example
MYDATA.Delimiter = ,
MYDATA.Delimiter =
Delimiter (continued) Property
Delta Property
Applies To Toolbox
Description User supplied smoothing parameter
Syntax Toolbox.Delta=number
Example Toolbox.Delta=2
DestArea Property
Applies To Trans
Description If DestCol (see DestCol listed below) is defined as a new column name, then
DestArea determines the location of the new column. It can be either
inserted adjacent to the SourceCol or appended to the end of the data set.
Syntax Trans.DestArea = {Adjacent | Append}
Remarks If DestCol is defined as an existing column, then DestArea is ignored.
See Also DestCol
Example Trans.DestArea = Append
DestCol Property
Applies To Trans
Description This property defines the destination column for the transform function.
Syntax Trans.DestCol = string
Remarks Spaces are not allowed in the new column name.
Scripting Commands
D
655
E
See Also DestArea
Example Trans.DestCol = LnConc
DestCol (continued) Property
DnErr( ) Property
Applies To Plot
Description Defines the down error column of data for a plot.
Syntax Plot.DnErr(Data Set no.) = string
Remarks This property must always contain a value even if there is only one data
source for the plot.
See Also UpErr( ), ErrType
Example
Plot.DnErr(1) = SE
Plot.DnErr(1) = Minimum
DoseFile Method
Applies To Model
Description Loads an ASCII data file containing model dosing information
Syntax Model.DoseFile=string
Remarks See Special file formats on page 502
See Also LamzFile, LinkFile, ParmFile, PartFile
Example Model.DoseFile = c:\dosedata.dat
DoseUnit Property
Applies To Toolbox
Description Specifies unit for dosing
Syntax Toolbox.DoseUnit={unit}
Example Toolbox.DoseUnit=ng/ml
WinNonlin
Users Guide
656
E
E
Ecol Property
Applies To Toolbox
Description Specifies input data set column for Effect
Syntax Toolbox.Ecol=column name
Remarks Not used in calculations
Example Toolbox.Ecol=Effect
EndCol Property
Applies To Data
Description Specifies last column in a range.
Syntax Objectname.EndCol = string | <number>
Remarks Use with the RemoveRow, Cut and Copy methods or the Font and FontSize
properties.
StartCol must be less than or equal to EndCol. The value for EndCol can be
a string identifying the column by name or it can be a number identifying the
column by position.
See Also StartRow, StartCol, EndRow
Examples
MyData.StartRow = 1
MyData.StartCol = Time
MyData.EndRow = 12
MyData.EndCol = Time
MyData.Copy
MyData.StartRow = 1
MyData.StartCol = 1
MyData.EndRow = 12
MyData.EndCol = 3
MyData.Copy
EndRow Property
Applies To Data
Description Specifies last row in a range.
Syntax Objectname.EndRow = number
Scripting Commands
E
657
E
Remarks Use with the RemoveRow, Cut and Copy methods.
StartRow must be less than or equal to EndRow.
If StartRow is given, and is not 1, a value of 1 for EndRow indicates that
the rest of the rows will be selected. The following example will remove all
rows after row 4.
Example
MYDATA.StartRow=5
MYDATA.EndRow=-1
MYDATA.RemoveRow
EndRow (continued) Property
EntireRow Property
Applies To Data
Description Specifies that the entire row, as opposed to an individual value, is to be
included or excluded.
Syntax Objectname.EntireRow = {True | False}
Remarks Use with Include and Exclude.
Example
MYDATA.SearchArea=entire data set
MYDATA.Find=1
MYDATA.EntireRow=True
MYDATA.Operation=>
MYDATA.Tolerance=0
MYDATA.CaseSensitive=False
MYDATA.Exclude
ErrType Property
Applies To Plot
Description Determines how the error data will be handled by the Plot engine. Error data
can be either absolute or relative.
Syntax Plot.ErrType = {Absolute | Relative}
Remarks Default is Relative.
See Also UpErr( ), DnErr( )
Example Plot.ErrType = Absolute
WinNonlin
Users Guide
658
E
Exclude Method
Applies To Data
Description Excludes a range of data from a grid.
Syntax objectname.Exclude
See Also Find, EntireRow, Tolerance, SearchArea, Operation, CaseSensitive
Example
MYDATA.SearchArea=entire data set
MYDATA.Find=1
MYDATA.EntireRow=True
MYDATA.Operation=>
MYDATA.Tolerance=0
MYDATA.CaseSensitive=False
MYDATA.Exclude
ExportAll Method
Applies To WinNonlin
Description Exports all open objects to Microsoft Word. Word Export works very much
like PrintAll. It is a method on the WinNonlin system object and has the
same options as PrintAll. The user can set which type of object to export.
Syntax WinNonlin.ExportAll
See Also PrintAll
Example
The following code would export all charts:
WinNonlin.PrintData=False
WinNonlin.PrintText=False
WinNonlin.PrintGraph=True
WinNonlin.PrintModel=False
WinNonlin.ExportAll
Extra Property
Applies To Trans
Description Contains the additional information that is required for some built in trans-
formations. Different information is required for each transformation. See
Remarks below for the type of information required for each.
Syntax Trans.Extra = {string | number}
Scripting Commands
F
659
E
F
Remarks
Function used
TRANS_LN
TRANS_LOG10
TRANS_SQRT
TRANS_ABS
TRANS_CHANGEBASE
TRANS_PCTCHANGE
TRANS_RATIOBASE
TRANS_MULTCOL
TRANS_METABOLITE
TRANS_ADDCOL
TRANS_SUBTRACTCOL
TRANS_E
TRANS_INV
TRANS_POWER
TRANS_MULT
TRANS_DIV
TRANS_ADD
TRANS_SUBTRACT
Use
Not used
Not used
Not used
Not used
Variable Name - specifies Time column
Variable Name - specifies Time column
Variable Name - specifies Time column
String - defines Column Y
String - defines the denominator, Column Y
String - defines Column Y
String - defines Column Y
Not used
Not used
number
number
number
number
number
See Also InData, SourceCol, Extra, DestCol, DestArea
Example
TRANS_CHANGEBASE: Trans.Extra = Hour
TRANS_POWER: Trans.Extra = 2
Extra (continued) Property
FileMask Property
Applies To WinNonlin
Description Specifies a file or group of files in a folder.
Syntax WinNonlin.FileMask =string
Remarks Use with DeleteFiles. As for that property, do not use directory names or *.*
for specifications.
The example below demonstrates how to mask or select a group of files in
a folder, then demonstrates how to delete those files.
Example
WinNonlin.FileMask=c:\winnonln\examples\bguide3.dat
WinNonlin.DeleteFiles
WinNonlin
Users Guide
660
E
Filename Property
Applies To WinNonlin
Description When used with the WinNonlin object, the Filename property is used to
specify a workspace to be loaded.
Syntax WinNonlin.filename =string
Remarks No FileType property is required, since the file type must be .WSP.
Example WinNonlin.filename = c:\winnonln\examples\pro-
files.wspWinNonlin.load
FileType Property
Applies To ANOVA, Data, Graph, Model, Text
Description Sets the file format for the Load and Save methods.
Syntax objectname.FileType = {ASCII | ANV | EXCEL | EXCEL95 | EXCEL97 |
PWO | BMP | WMF | PCO | PMO | RTF | PTO | LML | SAS | ODBC | PKS}
a
Remarks When loading graph objects, the FileType must be set to PCO. When the File-
Type is set to anything other than PCO, Save is equivalent to export. EXCEL is
the file type for Excel 4.0 files. Excel 5.0/95 files are set as EXCEL95. Excel
97 files are set as EXCEL97. WinNonlin can load WDO, WTO, WMO, WGO, and
EXCEL file types but cannot save back to them.
See Also Filename, Load, Save
Example MyData.FileType = EXCEL
a. Use Excel97 to load Excel2000 files.
Find Property
Applies To Data
Description Specifies data to search for.
Syntax objectname.Find = string
Remarks Use with Exclude, Include, Remove and Replace.
Scripting Commands
F
661
E
Example
MYDATA.SearchArea=CONC
MYDATA.Find=3
MYDATA.Operation==
MYDATA.Tolerance=0
MYDATA.CaseSensitive=False
MYDATA.With=Missing
MYDATA.Replace
Find (continued) Property
Font Property
Applies To Data
Description Sets the font based on the current selection as defined by the StartRow, Start-
Col, EndRow, and EndCol properties.
Syntax ObjectName.Font = string
Remarks The value of -1 can be used in the StartRow or StartCol properties to select
either the entire row or column. If -1 is used, then EndRow and/or EndCol
will be ignored.
See Also FontSize, StartRow, StartCol, EndRow, EndCol
Example
MyData.StartRow=1
MyData.StartCol=1
MyData.EndRow=1
MyData.EndCol=10
MyData.Font=Arial
FontSize Property
Applies To Data
Description Sets the font size based on the current selection as defined by the StartRow,
StartCol, EndRow and EndCol properties.
Syntax ObjectName.FontSize = <number>
Remarks The value of -1 can be used in the StartRow or StartCol properties to select
either the entire row or column. If -1 is used, then EndRow and/or EndCol
will be ignored.
See Also Font, StartRow, StartCol, EndRow, EndCol
WinNonlin
Users Guide
662
E
Example
MyData.StartRow=1
MyData.StartCol=1
MyData.EndRow=1
MyData.EndCol=10
MyData.FontSize=12
FootnoteFont Property
Applies To Graph
Description Sets the font for the chart footnote
Syntax ObjectName.FootnoteFont=string
See Also FootnoteFontSize
Example MyGraph.FootnoteFont = Arial
FootnoteFontSize Property
Applies To Graph
Description Sets the font size for the chart footnote
Syntax ObjectName.FootnoteFontSize=<number>
See Also FootnoteFont
Example MyGraph.FootnoteFontSize = 12
Function Property
Applies To Transform
Description Defines the function to be used by the transform engine.
FontSize (continued) Property
Scripting Commands
G
663
E
G
Syntax Trans.Function = {TRANS_LN |
TRANS_LOG10 |
TRANS_SQRT |
TRANS_ABS |
TRANS_CHANGEBASE |
TRANS_PCTCHANGE |
TRANS_RATIOBASE |
TRANS_MULTCOL|
TRANS_METABOLITE |
TRANS_ADDCOL|
TRANS_SUBTRACTCOL|
TRANS_E |
TRANS_INV |
TRANS_POWER |
TRANS_MULT |
TRANS_DIV |
TRANS_ADD |
TRANS_SUBTRACT}
LN(x)
Log10(x)
Square Root(x)
Absolute Value(x)
Change from Baseline
%Change from Baseline
Ratio from Baseline
x*y
x/y
x+y
x-y
e^x
1/x
x^n
x*n
x/n
x+n
x-n
Remarks The given string must match exactly (with the exception of character cases)
one of the strings listed above.
See Also InData, SourceCol, Extra, DestCol, DestArea
Example Trans.Function = TRANS_LN
Function (continued) Property
GroupVar( ) Property
Applies To Table
Description Defines the group variables for the Table engine.
See GroupVar(,) when specifying Group variable(s) for the Plot engine.
Syntax Table.GroupVar(Variable no.) = string
Remarks This property must be specified after the GroupVars property. GroupVar
applies to all tables except Tables 9 and 10. When using Table 9 or 10, see
JoinGroupVar(,). The example given below specifies that the first GroupVar
is Subject.
WinNonlin
Users Guide
664
E
See Also CrossVar( ), IDVar( ), RegVar( )
See GroupVar( , ) when using the Plot engine.
Example Table.GroupVar(1) = Subject
GroupVar( ) (continued) Property
GroupVar( , ) Property
Applies To Plot
Description Defines the group variables for each data set for the Plot engine.
Syntax Plot.GroupVar(Variable no.) = string
Remarks This property must be specified after the GroupVars( ) property.
The example given below specifies that the first GroupVar for Data Set 1 is
Subject and for Data Set 2 is Patno.
See Also CrossVar( ), IDVar( ), RegVar( )
Example Plot.GroupVar(1,1) = Subject
Plot.GroupVar(2,1) = Patno
GroupVars Property
Applies To Table
Description Defines the number of group variables for the Table engine.
Syntax Table.GroupVars = integer
Remarks Applies to all tables except Tables 9 and 10.
When using Table 9 or 10, see JoinGroupVars.
See Also CrossVars, IDVars, RegVars
Example Table.GroupVars = 1
GroupVars( ) Property
Applies To Plot
Description Defines the number of group variables for the Plot engine.
Syntax Plot.GroupVars(Data Set no.) = integer
Scripting Commands
H
665
E
H
Remarks Since the Plot engine can involve more than one data set, it is necessary to
specify to which data set the command refers.
Example Plot.GroupVars(1) = 2
GroupVars( ) (continued) Property
GroupVarBreak( ) Property
Applies To Table
Description Specifies whether a page break is made in the text output when the value of
the group variables changes.
Syntax Table.GroupVarBreak (Variable no.) = {True|False}
See Also GroupVar( ), GroupVars
Example Table.GroupVarBreak(1) = True
Halt Method
Applies To WinNonlin
Description Stops a script at the point the command is encountered and presents a dialog
asking Do You Want to Continue? with Yes/No buttons. Selecting Yes
allows the script to continue from that point. Selecting No stops the script
and leaves the system in interactive mode; no window is closed.
Syntax WinNonlin.Halt= string
Remarks This method is extremely useful in debugging scripts under development.
Halt works just like MsgBox, but it shows Yes/No buttons and a string Do
You Want to Continue? rather than an OK button.
Example WinNonlin.Halt=See the output
See Also MsgBox
Headers Property
Applies To Data
WinNonlin
Users Guide
666
E
I
Description When Headers is set to True, it indicates that the first row of a data file
contains variable names rather than data.
Syntax objectname.Headers = {True | False}
Remarks This property is not used when loading PWO files. If this value is not set, the
system will set the default value to that specified in the last Load operation.
See Also Missing, Delimiter, ConseqDelim
Headers (continued) Property
IDVar( ) Property
Applies To Table
Description Defines the ID Variables for a table.
Syntax Table.IDVar(Variable no.) = string
Remarks Applies to Table no. 2, 3, 5, 6, 7, 8, 10.
When using Table 9, see JoinIDVar(,).
See Also CrossVar( ), GroupVar( ), RegVar( )
Example
Table.IDVar(1) = Subject
Table.IDVar(2) = Time
IDVars Property
Applies To Table
Description Defines the number of ID Variables for the Table engine.
Syntax Table.IDVars = integer
Remarks Applies to Table no. 2, 3, 5, 6, 7, 8, 10.
When using Table 9, see JoinIDVars.
See Also CrossVars, GroupVars, RegVars
Example Table.IDVars = 2
Include Method
Applies To Data
Scripting Commands
I
667
E
Description Includes a range of data in a grid.
Syntax objectname.Include
See Also Find, EntireRow, Tolerance, SearchArea, Operation, CaseSensitive
Example
MYDATA.SearchArea="conc"
MYDATA.Find="4.3"
MYDATA.Include
Include (continued) Method
IncludeVar( , ) Property
Applies To Merge
Description Defines the Included columns for each data set for the Merge engine.
Syntax Merge.IncludeVar(Data Set no.,Variable no.) = string
This property must be specified after the IncludeVars( ) property.
See Also IncludeVars( )
Example
Merge.IncludeVar(1,1) = AUC_PO
Merge.IncludeVar(1,2) = Cmax_PO
Merge.IncludeVar(1,3) = Tmax_PO
Merge.IncludeVar(2,1) = AUC_IV
Merge.IncludeVar(2,2) = Cmax_IV
IncludeVars( ) Property
Applies To Merge
Description Defines the number of variables to be included from each data set in a merge
operation.
Syntax Merge.IncludeVars(Data Set no.) = integer
See Also IncludeVar( , )
Example
Merge.IncludeVars(1) = 3
Merge.IncludeVars(2) = 2
InData Property
Applies To Desc, Trans
WinNonlin
Users Guide
668
E
Description Defines the data source for the above engines.
Syntax engine.InData = string
This property must be specified after the NumData property.
Remarks The value supplied must be a valid Data object in the script file.
See Also NumData, InData( )
Example Trans.InData = MYDATA
InData (continued) Property
InData( ) Property
Applies To Table, Merge, Plot
Description Defines the data source for the above engines.
Syntax engine.InData( ) = string
Remarks The value supplied must be a valid Data object in the script file.
See Also NumData, InData
Example
Merge.InData(1) = MyOral
Merge.InData(2) = MyIV
Where MyOral and MyIV are previously defined data
objects
InitialDose Property
Applies To Toolbox
Description Specifies value for initial dose
Syntax Toolbox.InitialDose=number
Example Toolbox.InitialDose=11
InputLag Property
Applies To Toolbox
Description Selects whether the program will constrain the derivative of the estimated
input rate to be zero at the initial time (lag time)
Syntax Toolbox.InputLag={True|False}
Example Toolbox.InputLag=False
Scripting Commands
J
669
E
J
Interval Property
Applies To Desc
Description Specifies the value of the confidence interval to use when calculating
descriptive statistics.
Syntax Desc.Interval = number
Remarks Default is 95.
See Also Confidence, Percentiles
Example Desc.Interval = 95
JoinCrossVar( , ) Property
Applies To Table
Description Defines the Join Cross variable for the Table engine when merging two
tables. A Join Cross variable is the common Cross variable of two tables.
Syntax Table.JoinCrossVar(Data Set no., Variable no.) = Variable Name
Remarks Applies to Table no. 9. This property always contains two values even if
there is just one data source and/or one Join Cross variable.
See Also CrossVar( ), JoinCrossVars, JoinGroupVar( , ), JoinIDVar( , )
Example
Table.JoinCrossVar(1,1) = Form
Table.JoinCrossVar(1,1) = Subject
Table.JoinCrossVar(2,1) = Form
Table.JoinCrossVar(2,1) = Subject
JoinCrossVars Property
Applies To Table
Description Defines the number of Join Cross variables for the Table engine.
Syntax Table.JoinCrossVars = integer
Remarks Applies to Table no. 9.
This property is not dimensioned because the two data sets must have the
same number of Cross Variables.
See Also CrossVars, JoinCrossVar( , ), JoinIDVars, JoinGroupVars
WinNonlin
Users Guide
670
E
Example Table.JoinCrossVars = 2
JoinCrossVars (continued) Property
JoinGroupVar( , ) Property
Applies To Table
Description Defines the Join Group variable for the Table engine when merging two
tables. A Join Group variable is the common Group variable of two tables.
Syntax Table.JoinGroupVar(Data Set no., Variable no.) = Variable Name
Remarks Applies to Table 9.
This property always contains two values even if there is just one data
source and/or one Join Group variable.
See Also GroupVar( ), JoinGroupVars, JoinCrossVar( , ), JoinIDVar( , )
Example
Table.JoinGroupVar(1,1) = Form
Table.JoinGroupVar(1,1) = Trt
JoinGroupVars Property
Applies To Table
Description Defines the number of Join Group variables for the Table engine.
Syntax Table.JoinGroupVars = integer
Remarks Applies to Table 9. This property is not dimensioned because the two data
sets must have the same number of Group Variables.
See Also GroupVars, JoinGroupVar( , ), JoinCrossVars, JoinIDVars
Example Table.JoinGroupVars = 1
JoinIDVar( , ) Property
Applies To Table
Description Defines the Join ID variable for the Table engine when merging two tables.
A Join ID variable is the common ID variable from the two data sets.
Syntax Table.JoinIDVar(Data Set no., Variable no.) = Variable Name
Remarks Applies to Table no. 9. This property always contains two values even if
there is just one data source and/or one Join ID variable.
Scripting Commands
K
671
E
K
L
See Also IDVar( ), JoinIDVars, JoinGroupVar( , ), JoinCrossVar( , )
Example
Table.JoinIDVar(1,1) = Subject
Table.JoinIDVar(1,2) = PatNo
JoinIDVar( , ) (continued) Property
JoinIDVars Property
Applies To Table
Description Defines the number of Join ID variables for the Table engine.
Syntax Table.JoinIDVars = integer
Remarks Applies to Table no. 9. This property is not dimensioned because the two
data sets must have the same number of ID Variables.
See Also IDVars, JoinIDVar( , ), JoinGroupVars, JoinCrossVars
Example Table.JoinIDVars = 1
Keo Property
Applies To Toolbox
Description Specifies value for Keo
Syntax Toolbox.Keo=number
Remarks Range is between 0 and 1
Example Toolbox.Keo=.5
LamzFile Method
Applies To Model
Description Loads an ASCII data file containing Lambda_z information for NCA mod-
els.
Syntax Model.LamzFile = string
WinNonlin
Users Guide
672
E
Remarks This method only applies to NCA models. See the Special Notes section
later in this chapter for the required format of these ASCII files.
See Also DoseUnit, PartFile
Example Model.LamzFile = c:\lamzdata.dat
LamzFile (continued) Method
Legend( ) Property
Applies To Plot
Description Defines the string to be displayed in the legend of a plot.
Syntax Plot.Legend(Data Set no.) = string
Remarks This property only applies when creating overlaid plots. The string given
with this property is used in the legend instead of the data set name.
Example
Plot.Legend(1) = Plasma
Plot.Legend(2) = Urine
Plot.Legend(1) =
LegendFont Property
Applies To Graph
Description Sets the font for the chart legend
Syntax ObjectName.LegendFont=string
See Also LegendFontSize
Example MyGraph.LegendFont = Arial
LegendFontSize Property
Applies To Graph
Description Sets the font size for the chart legend
Syntax ObjectName.LegendFontSize=<number>
See Also LegendFont
Example MyGraph.LegendFontSize = 12
Scripting Commands
L
673
E
LinkFile Method
Applies To Model
Description Load an ASCII data file containing model parameters information for PK/
PD and IPR models.
Syntax Model.LinkFile = string
Remarks When using developer (SCI) pre-compiled, ASCII PK models, or User-
ASCII models, Model.ParmFile is used to read in the model parameters and
possibly lower/upper bounds. When using the pre-compiled PK/PD or PK/
IPR models, Model.LinkFile is used to read in the PK model parameters and
Model.ParmFile is used to read the PD or IPR parameters, and possibly
lower/upper bounds. This method should not be used for NCA models. See
the Special file formats on page 502 for the required format of these
ASCII files.
See Also DoseUnit, ParmFile
Example Model.LinkFile = c:\linkdata.dat
Load Method
Applies To Data, Graph, Model, Text, WinNonlin
Description Loads a file into the system using the current file name.
Syntax objectname.Load
Remarks When using graph objects, the Load method only works for file type PCO.
When used with the WinNonlin object, this method is used to load work-
spaces. When used with the Data Object associated with a PKS study, load-
ing the Data Object as file type PKS with the file name pointing to a PKS
file will load the study with or without a scenario, depending upon the con-
tents of the PKS file. The scenario name is captured from the PKS file
pointed to by the Data Object Filename property.
See Also Filename, FileType, Save
Example MyGraph.Load
LoadTemplate Method
Applies To Graph
WinNonlin
Users Guide
674
E
M
Description Loads a template on the current graph.
Syntax objectname.LoadTemplate = string
See Also SaveTemplate
Example MyGraph.LoadTemplate c:\winnonln\temps\xy.gtp
LoadTemplate (continued) Method
MaintenanceDose Property
Applies To Toolbox
Description Specifies value for maintenance dose
Syntax Toolbox.MaintenanceDose=number
Example Toolbox.MaintenanceDose=11
Missing Property
Applies To Data
Description Specifies the alphanumeric string that is used to determine what values in a
data file are to be set to missing with a gray background.
Syntax objectname.Missing = string
Remarks If this value is not specified, the missing value that was last used in the sys-
tem will be used when using the Load method.
See Also ConseqDelim, Delimiter, Headers
Example MYDATA.Missing = .
MoveFirst MovePrevious MoveNext MoveLast Methods
Applies To Graph
Description In a group of graphs created with a sort variable this method selects which
graph is active, or displayed.
Scripting Commands
M
675
E
Syntax objectname.MoveFirst
objectname.MovePrevious
objectname.MoveNext
objectname.MoveLast
See Also SortLevel
Example MyGraph.MoveFirst
MoveFirst MovePrevious MoveNext MoveLast (continued) Methods
MsgBox Method
Applies To WinNonlin
Description Provides a message within a script file.
Syntax WinNonlin.MsgBox = string
Remarks When MsgBox is used in a script, a message box will be displayed during
the run of the script. The script will pause until the user clears the message
box from the screen.
Example WinNonlin.MsgBox = Script complete
MultiGraph Method
Applies To Graph
Description Changes the visible graph type in multigraphs.
Syntax objectname.MultiGraph = Graph Name
Where the available Graph Names are:
Modeling: X vs. Observed Y and Predicted Y, Observed Y vs. Weighted
Predicted Y*, Weighted Predicted Y vs. Weighted Residual Y*, X vs.
Weighted Residual Y*, Partial Derivatives
NCA: X vs. Observed Y Predicted Y
* Not created when performing Simulations
Example MyGraph.MultiGraph = X vs. Observed Y and Pre-
dicted Y
WinNonlin
Users Guide
676
E
MultiGrid Method
Applies To Data
Description Selects which sub-grid in a multigrid is active, or displayed.
Syntax objectname.MultiGrid = Grid Name
where the available Grid Names are:
Modeling: Initial Parameters, Minimization Process, Final Parameters, Dos-
ing, Correlation Matrix, Eigenvalues, Condition Numbers, Variance-Covari-
ance Matrix, Summary Table, Diagnostics, Differential Equations, Partial
Derivatives, Predicted Data, Secondary Parameters, User Settings, History
NCA: Final Parameters, Dosing, Summary Table, Partial Areas, User Set-
tings, History
Linear Mixed Effects: Diagnostics, Sequential Tests, Partial Tests, Final
Fixed Parameters, Final Variance Parameters, Parameter Key, Contrasts,
Contrast Coefficients, Estimates, Estimates Coefficients, Least Squares,
Means, LSM Coefficients, LSM Differences, Residuals, User Settings, Ini-
tial Variance Parameters, Iteration History, History
Average Bioequivalence (Crossover Studies): Average Bioequivalence,
Ratios Test, Diagnostics, Sequential Tests, Partial Tests, Final Fixed Parame-
ters, Final Variance Parameters, Parameter Key, Least Squares Means, LSM
Differences, Residuals, User Settings, Initial Variance Parameters, Iteration
History, History
Population/Individual Bioequivalence: User Settings, Pop./Individual
Bioeq., Ratios Test
Average Bioequivalence (Parallel Studies): Average Bioequivalence,
Diagnostics, Sequential Tests, Partial Tests, Final Fixed Parameters, Final
Variance Parameters, Parameter Key, Least Squares Means, LSM Differ-
ences, Residuals, User Settings, Initial Variance Parameters, Iteration His-
tory, History
ANOVA: ANOVA commands call the LinMix or Bioequivalence engine and
their workbook output. Therefore, use the worksheet names for those, above.
Scripting Commands
N
677
E
N
Remarks This method generates an error in the script log for data objects that are not
multigrids. When sorting a Multigrid, use this command to select the appro-
priate Multigird before specifying the SortVars, SortVar( ), and Sort com-
mands. If the .Multigrid method is used on a data set that is currently
showing the history, the .TAB value will automatically be set to Data (i.e.,
the data will be toggled into view for that object).
MultiGrid (continued) Method
Npoints Property
Applies To Toolbox
Description Number of output data points
Syntax Toolbox.Npoints=number
Remarks Value must be 2 or greater
Example Toolbox.Npoints=100
NumData Property
Applies To Table, Plot, Merge
Description Indicates the number of data sets to be used with an engine.
Syntax engine.NumData = integer
Remarks When used with Merge, NumData must be 2. When used with Table or Plot,
NumData must be 1 or 2.
See Also InData( )
Example Table.NumData = 1
NumTerms Property
Applies To Toolbox
Description Number of exponential terms in the unit impulse response
Syntax Toolbox.NumTerms=number
Remarks Range is 1 to 9
WinNonlin
Users Guide
678
E
O
Example Toolbox.NumTerms=4
NumTerms (continued) Property
Operation Property
Applies To Data
Description Specifies search operator.
Syntax Objectname.Operation = {<> | < | > | <= | >= | = }
Remarks Use with Exclude, Include, Remove, and Replace.
Example
MYDATA.SearchArea="CONC"
MYDATA.Find="3"
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.With="Missing"
MYDATA.Replace
OutData Property
Applies To ANOVA, Desc, PK, Table, Merge
Description Specifies the name of the output data object that will be generated by the
Run method of any WinNonlin engine.
Syntax engine.OutData = string
Remarks engine.OutData = specifies a Null alias, so NO output will be generated.
Example PK.OutData = MYDATA
OutGraph Property
Applies To Plot, PK
Description Creates a graph object during the run of an engine.
Syntax engine.OutGraph = string
Remarks engine.OutGraph = specifies a Null alias, so NO graph output will be gen-
erated.
Scripting Commands
P
679
E
P
Example Plot.OutGraph = MyGraph
OutGraph (continued) Property
OutText Property
Applies To ANOVA, LinMix, Bioeq, PK, Desc Stats (Box and Whiskers plot)
Description Specifies the name of the text object that is to be created, when Run is
invoked for a WinNonlin engine that supports text output.
Syntax engine.OutText = string
Remarks engine.OutText= specifies a Null alias, so NO text output will be gener-
ated.
Example PK.OutText = MYTEXT
PageFooter Property
Applies To Table
Description Allows the specification of a footer for a scripted table.
Syntax Table.PageFooter = string
Remarks A single footer may be specified for a scripted table using this command. A
footer specified using this command will override any footers specified in a
definition file, if both are used in a single run.
This command accepts a quote delimited string up to 255 characters.
See Also PageHeader, DefinitionFile
Example Table.PageFooter=This is my Footnote
PageHeader Property
Applies To Table
Description Allows the specification of a title for a scripted table.
Syntax Table.PageHeader = string
WinNonlin
Users Guide
680
E
Remarks A single title may be specified for a scripted table using this command. A
title specified using this command will override any titles specified in a defi-
nition file, if both are used in a single run.
This command accepts a quote delimited string up to 255 characters.
See Also PageFooter, DefinitionFile
Example Table.PageHeader=This is my Title
PageHeader (continued) Property
ParmFile Method
Applies To Model
Description Loads an ASCII data file containing the model parameter and boundaries
information.
Syntax Model.ParmFile = string
Remarks When using developer (SCI) pre-compiled or ASCII PK models or User-
ASCII models, Model.ParmFile is used to read in the model parameters, and
possibly lower/upper bounds. However, when using SCI PK/PD or PK/IPR
models, Model.LinkFile is used to read in the PK model parameters and
Model.ParmFile is used to read the PD or IPR parameters, and possibly
lower/upper bounds. This method should not be used for NCA models. See
the Special file formats on page 502 for the required format of these
ASCII files.
See Also DoseUnit, LinkFile
Example Model.ParmFile = c:\parmdata.dat
PartFile Method
Applies To Model
Description Loads an ASCII data file containing specification of time ranges for the
computation of partial areas.
This only applies to NCA models.
Syntax Model.PartFile = string
Remarks This method should not be used for non-NCA models. See Special file for-
mats on page 502 for the required format of these ASCII files.
See Also DoseUnit, LamzFile
Scripting Commands
P
681
E
Example Model.PartFile = c:\partdata.dat
PartFile (continued) Method
Paste Method
Applies To Data
Description Pastes a range of data selected with the Cut or Copy property to a data set.
Syntax Objectname.Paste
Remarks Use with the Cut or Copy method.
Example
MYDATA.Filename = <file name>
MYDATA.StartCol=A
MYDATA.StartRow=1
MYDATA.EndCol=J
MYDATA.EndRow=10
MYDATA.Cut
MYDATA.StartRow=5
MYDATA.StartCol=A
MYDATA.Paste
Applicable
Properties
StartCol, StartRow, EndCol, EndRow
Percentiles Property
Applies To Desc
Description When Percentiles is set to True, percentile calculations will be included
when doing descriptive statistics.
Syntax Desc.Percentiles = {True | False}
Remarks The default is False.
See Also Confidence, Interval
Example Desc.Percentiles = True
Print Method
Applies To Data, Graph, Model, Text
Description Prints the specified object.
WinNonlin
Users Guide
682
E
Syntax objectname.Print
Remarks If the method is used on a multigrid data object, only the current data grid
will be printed. If the history of a data object is visible, the history will be
printed rather than the data.
See Also PrintAll
Example MyData.Print
Print (continued) Method
PrintAll Method
Applies To WinNonlin
Description Prints all open windows or data grids, including all worksheets of open
workbooks.
Syntax WinNonlin.PrintAll
See Also Print, PrintData, PrintGraph, PrintModel, PrintText
Example WinNonlin.PrintAll
PrintData Property
Applies To WinNonlin
Description When using the PrintAll command, setting PrintData to False causes Data
windows not to be printed.
Syntax WinNonlin.PrintData = {True | False}
Remarks The default is True.
See Also PrintAll, PrintGraph, PrintModel, PrintText
Example WinNonlin.PrintData=False
PrintGraph Property
Applies To WinNonlin
Description When using the PrintAll command, setting PrintGraph to False causes Graph
windows not to be printed.
Syntax WinNonlin.PrintGraph = {True | False}
Scripting Commands
P
683
E
Remarks The default is True.
See Also PrintAll, PrintModel, PrintText, PrintData
Example WinNonlin.PrintGraph=False
PrintGraph (continued) Property
PrintModel Property
Applies To WinNonlin
Description When using the PrintAll command, setting PrintModel to False causes the
Model window not to be printed.
Syntax WinNonlin.PrintModel = {True | False}
Remarks The default is True.
See Also PrintAll, PrintText, PrintData, PrintGraph
Example WinNonlin.PrintModel=False
PrintMulti Property
Applies To Chart
Description Turns on printing multiple charts per page.
Syntax Chartobject.PrintMulti=True/False
See Also PrintMultiAcross, PrintMultiDown, PrintAll
PrintMultiAcross Property
Applies To Chart
Description Sets the number of charts printed across the page.
Syntax Chartobject.PrintMultiAcross=n
See Also PrintMulti, PrintMultiDown
PrintMultiDown Property
Applies To Chart
Description Sets the number of charts printed down the page.
WinNonlin
Users Guide
684
E
Q
R
Syntax Chartobject.PrintMultiDown=n
See Also PrintMulti, PrintMultiAcross
PrintText Property
Applies To WinNonlin
Description When using the PrintAll command, setting PrintText to False causes Text
windows not to be printed.
Syntax WinNonlin.PrintText = {True | False}
Remarks The default is True.
See Also PrintAll, PrintModel, PrintData, PrintGraph
Example WinNonlin.PrintText=False
PrintMultiDown (continued) Property
RegVar( ) Property
Applies To Table
Description Defines the Regular variable that composes the body of the table.
Syntax Table.RegVar(Variable no.) = string
Remarks Applies to all table templates.
For Table 8 only one Regular variable may be specified. For Tables 9 and 10,
the Regular variables are the variables to be used from Data Set 2.
See Also CrossVar( ), IDVar( ), GroupVar( )
Example
Table.RegVar(1) = Tmax
Table.RegVar(2) = Cmax
Table.RegVar(3) = AUClast
RegVars Property
Applies To Table
Scripting Commands
R
685
E
Description Defines the number of Regular variables for a table.
Syntax Table.RegVars = integer
Remarks Applies to all table templates.
For Table 8 only one Regular variable may be specified. For Tables 9 and 10,
the Regular variables are the variables to be used from Data Set 2.
See Also RegVar( ), CrossVars, IDVars, GroupVars
Example Table.RegVars = 3
RegVars (continued) Property
Remove Method
Applies To Data
Description Removes a row based on search criteria.
Syntax objectname.Remove
See Also Find, Tolerance, SearchArea, Operation, CaseSensitive
Example
MYDATA.SearchArea="TIME"
MYDATA.Find="3"
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.Remove
RemoveCol Method
Applies To Data
Description Removes a specified column from a grid.
Syntax Objectname.RemoveCol
See Also Column, CaseSensitive
Example
MYDATA.Column="a"
MYDATA.RemoveCol
RemoveRow Method
Applies To Data
WinNonlin
Users Guide
686
E
Description Removes a range of rows from a grid.
Syntax objectname.RemoveRow
Example
MYDATA.StartRow=1
MYDATA.EndRow=18
MYDATA.RemoveRow
Applicable
Properties
StartRow, EndRow
RemoveRow (continued) Method
RenameCol Method
Applies To Data
Description Renames a column.
Syntax objectname.RenameCol
See Also Column, With, CaseSensitive
Example
MYDATA.Column=a
MYDATA.With=Subject
MYDATA.RenameCol
Replace Method
Applies To Data
Description Replaces data specified by the Find property with data specified by the With
property.
Syntax objectname.Replace
See Also Find, With, Tolerance, SearchArea, Operation, CaseSensitive
Example
MYDATA.SearchArea="CONC"
MYDATA.Find="3"
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.With="Missing"
MYDATA.Replace
Scripting Commands
R
687
E
Response Property
Applies To Toolbox
Description Specifies column for response data
Syntax Toolbox.Response=column name
Example
Toolbox.Response=Response
Run Method
Applies To ANOVA, LinMix, Bioeq, Desc, Plot, PK, Trans, Table, Merge
Description Invokes the specified engine with its currently defined properties.
Syntax engine.Run
Remarks Be sure to name all possible output objects prior to using the Run method.
Example Desc.Run
RunWordExport Method
Applies To PK
Description Invokes the PK engine with its currently defined properties. RunWordExport
will also launch Word (if not already running), create a new document, and
populate the document with the output from the PK engine.
Syntax PK.RunWordExport
Remarks This method can also be used with the WordExportFilename property to
have Word automatically save the output file when modeling is complete.
Microsoft Word must be installed on the same machine as WinNonlin to use
this feature.
See Also Run, WordExportFilename
Example
Set MyModel = Model
MyModel.Filename = bg1.cmd
MyModel.FileType = ASCII
MyModel.Load
PK.WordExportFilename = bg1.doc
PK.RunWordExport
WinNonlin
Users Guide
688
E
S
SameErrCol( ) Property
Applies To Plot
Description This property determines if the same column is to be used for both up and
down error bars.
Syntax Plot.SameErrCol(Data Set no.) = {True | False}
Remarks This property must contain a value even if there is only one data source.
The default for this property is False. If set to True, then the column defined
by UpErr( ) is used for the error data.
See Also UpErr( ), DnErr( )
Example Plot.SameErrCol(1) = True
Save Method
Applies To Data, Graph, Model, Text, WinNonlin
Description Saves a file to disk using the current file name.
Syntax objectname.Save
Remarks When working with graph objects, if the FileType is anything other than
PCO, to Save is equivalent to export.
Saving Workspaces: Saving a workspace requires that all WinNonlin objects
be previously saved to disk files first. The Model object, if one exists, must
be saved as a PMO file. Lastly, all multigrid data sets must be saved as PWO's.
Saving PKS: Saving a PKS workspace requires that the save operation be
performed on the study workbook data object being saved as a file of type
PKS. The PKS file contains all information necessary to save the workspace.
See Also Filename, FileType, Load
Example MyGraph.Save
SaveAll Method
Applies To Graph
Description Saves all individual graphs of a multipart graph to a file.
Syntax objectname.SaveAll
Scripting Commands
S
689
E
Example
MYOUTGRAPH.SaveAllPrefix="graf"
MYoutgraph.filetype="BMP"
MYOUTGRAPH.SaveAll
SaveAll (continued) Method
SaveAllPrefix Property
Applies To Graph
Description Specifies file name prefix for saving multipart graphs.
Syntax objectname.SaveAllPrefix = string
Remarks Use with SaveAll.
This prefix must be between 1 to 4 characters in length.
Example
rema Save all plots as separate .WMF files
MYOUTGRAPH.SaveAllPrefix="plot"
MYOUTGRAPH.filetype="wmf"
MYOUTGRAPH.SaveAll
SaveTemplate Method
Applies To Graph
Description Saves the current graph settings to a file, as a template.
Syntax objectname.SaveTemplate = string
See Also LoadTemplate
Example MyGraph.SaveTemplate c:\winnonln\temps\xy.gtp
SearchArea Property
Applies To Data
Description Specifies where search operation should focus.
Syntax objectname.SearchArea = string
Remarks Valid entries are a column name or the entire data set. It is not possible to
search a Current Selection using the Scripting Language.
Use with Exclude, Include, Remove and Replace.
WinNonlin
Users Guide
690
E
Example
MYDATA.SearchArea="CONC"
MYDATA.Find="3"
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.With="Missing"
MYDATA.Replace
SearchArea (continued) Property
Sequence Property
Applies To Toolbox
Description Specifies input data set column for sequence data
Syntax Toolbox.Sequence=column name
Example Toolbox.Sequence=Sequence
ShowUnits Property
Applies To Plot
Description When ShowUnits is set to True, if any units are defined by XUnits or
YUnits, they will appear in the respective axis title following the text of the
axis title.
Syntax Plot.ShowUnits={True|False}
Remarks The default value for this property is True.
See Also XUnits, YUnits
Example Plot.ShowUnits=False
Smoothing Property
Applies To Toolbox
Syntax Toolbox.Smoothing={Automatic|None|User}
Example Toolbox.Smoothing=Automtic
Scripting Commands
S
691
E
Sort Method
Applies To Data
Description Sorts a data set using the specified sortkeys.
Syntax objectname.Sort
See Also SortVar( ), SortVars
SortLevel Method
Applies To Graph
Description Allows navigation among plots containing sort keys by going directly to a
specified sort level.
Syntax objectname.SortLevel = string
Remarks If there is more than one sort key, the string given for SortLevel must contain
a value for each key in order, and be separated by a single space.
See Also MoveFirst, MovePrevious, MoveNext, MoveLast
Example MyGraph.SortLevel = SubjA Cap
SortVar( ) Property
Applies To Data, Desc
Description Defines the sort keys to be used by the specified engine.
Syntax Data.SortVar(Variable no.) = string
This property must be specified after the property SortVars.
See Also SortVar( , ), SortVars( ), GroupVar( )
Example
Data.SortVar(1) = Form
Data.SortVar(2) = Time
SortVar( , ) Property
Applies To Plot, Merge
Description Defines the sort keys to be used by the specified engine.
WinNonlin
Users Guide
692
E
Syntax Engine.SortVar(Data Set no., Sort Var. no.) = string
This property must be specified after the property SortVars or SortVars( ).
Remarks When using the Plot engine, there must be two values given even if there is
only one data source and/or one sort key. When using the Desc engine, there
must be a value even if there is only one sort key.
See Also SortVars( ), GroupVar( )
SortVar( , ) (continued) Property
SortVars Property
Applies To Data, Desc, Merge
Description Defines the number of sort keys to be used by the specified object or engine.
Syntax engine.SortVars = integer
or
objectname.SortVars = integer
Remarks When working with the Merge engine, even though there are two data
sources, the number of SortVars must be the same for each. Therefore Sort-
Vars is used, and not SortVars( ).
See Also SortVars( ), SortVar( ), GroupVars( )
Examples
Desc.SortVars = 1
or
Merge.SortVars = 2
SortVars( ) Property
Applies To Plot
Description Defines the number of sort keys to be used by the Plot engine.
Syntax Plot.SortVars(Data Set no.) = integer
Remarks There must be a value even if there is only one data source.
See Also SortVars, SortVar( ), GroupVars( )
Example Plot.SortVars(1) = 2
Scripting Commands
S
693
E
SourceCol Property
Applies To Trans
Description Defines the source column for transformations.
Syntax Trans.SourceCol = string
See Also DestCol
Example Trans.SourceCol = Conc
Stacked Property
Applies To Toolbox
Description Selects whether treatment data is in separate columns or stacked in the same
column in the input data set
Syntax Toolbox.stacked={True|False}
Remarks True=stacked; False=separate
Example Toolbox.stacked=True
StartCol Property
Applies To Data
Description Specifies the first column in a range.
Syntax Objectname.StartCol = string| <number>
Remarks Use with the RemoveRow, Cut and Copy methods or the Font and FontSize
properties. StartCol must be less than or equal to EndCol. The value for
StartCol can be a string identifying the column name or a number identifying
the column position.
See Also StartRow, EndRow, EndCol
Examples
MyData.StartRow = 1
MyData.StartCol = Time
MyData.EndRow = 15
MyData.EndCol = Time
MyData.Copy
MyData.StartRow = 1
MyData.StartCol = 1
MyData.EndRow = 15
MyData.EndCol = 3
MyData.Copy
WinNonlin
Users Guide
694
E
StartRow Property
Applies To Data
Description Specifies first row in a range.
Syntax objectname.StartRow = <number>
Remarks Use with RemoveRow, Cut and Copy.
StartRow must be less than or equal to EndRow. StartRow and EndRow
must both be specified, unless StartRow is 1. If StartRow is 1 and End-
Row is not specified, all rows will be selected.
Example
MYDATA.StartRow=1
MYDATA.EndRow=18
MYDATA.RemoveRow
Stats Property
Applies To Table
Description To generate descriptive statistics in the Table engine.
Syntax Table.Stats = {True|False}
Remarks Applies to Table no. 1, 3, 4, 6, 7, 8, 9, 10.
This selection causes all of the available statistics to be printed.
Example Table.Stats = True
Subject Property
Applies To Toolbox
Description Specifies input data set column for subject
Syntax Toolbox.Subject=column name
Example Toolbox.Subject=Subject
SummaryVar( ) Property
Applies To Desc
Description Specifies a variable to be used as the summary column when doing descrip-
tive statistics.
Scripting Commands
T
695
E
T
Syntax Desc.SummaryVar(Data Set no.) = string
See Also SummaryVars
Example Desc.SummaryVar(1) = Conc
SummaryVar( ) (continued) Property
SummaryVars Property
Applies To Desc
Description Specifies the number of summary variables that will be used when doing
descriptive statistics.
Syntax Desc.SummaryVars = integer
See Also SummaryVar( )
Example Desc.SummaryVars = 1
Tab Property
Applies To Data
Description Activates the Data or History tab of a data object.
Syntax objectname.Tab = {Data | History}
Remarks If the MultiGrid method is used on a data set that is currently showing the
history, the .TAB value will automatically be set to Datathat is, the data will
be toggled into view for that object.
TableNum Property
Applies To Table
Description Identifies a table template number.
Syntax Table.TableNum = integer
Remarks Tables may be specified in a Script file either using Scripting Language
commands, including TableNum, to specify the details of the table, or using
a Table Definition file.
See Also DefinitionFile
WinNonlin
Users Guide
696
E
Example Table.TableNum = 2
Tau Property
Applies To Toolbox
Description Specifies value for Tau
Syntax Toolbox.Tau=number
Example Toolbox.Tau=1
TerminalLower Property
Applies To Toolbox
Description Lower range for terminal phase
Syntax Toolbox.TerminalLower=number
Example Toolbox.TerminalLower=1
TerminalPhase Property
Applies To Toolbox
Description Use terminal phase
Syntax Toolbox.TerminalPhase={1|0}
Remarks 1=True; 0=False
Example Toolbox.TerminalPhase=1
TerminalUpper Property
Applies To Toolbox
Description Upper range for terminal phase
Syntax Toolbox.TerminalUpper=number
Example Toolbox.TerminalUpper=5
TableNum (continued) Property
Scripting Commands
T
697
E
TileHorizontal Property
Applies To WinNonlin
Description Causes the open objects to be tiled horizontally.
Syntax WinNonlin.TileHorizontal
See Also TileVertical and Cascade
Example WinNonlin.tilehorizontal
TileVertical Property
Applies To WinNonlin
Description Causes the open objects to be tiled vertically.
Syntax WinNonlin.TileVertical
See Also TileHorizontal and Cascade
Example WinNonlin.tilevertical
TimeCol Property
Applies To Toolbox
Description Specifies input data set column for Time
Syntax Toolbox.TimeCol=column name
Example Toolbox.TimeCol=Time
TimeRepeat Property
Applies To Toolbox
Description Repeat dosing every n time units
Syntax Toolbox.TimeRepeat=number
Example Toolbox.TimeRepeat=5
Title Property
Applies To Plot
WinNonlin
Users Guide
698
E
Description Defines the string to be displayed in the title of the plot.
Syntax Plot.Title=string
See Also XTitle, YTitle, Legend( )
Example
Plot.Title = My Plot Title
Title (continued) Property
TitleFont Property
Applies To Graph
Description Sets the font for the chart title
Syntax ObjectName.TitleFont=string
See Also TitleFontSize
Example MyGraph.TitleFont = Arial
TitleFontSize Property
Applies To Graph
Description Sets the font size for the chart title
Syntax ObjectName.TitleFontSize=<number>
See Also TitleFont
Example MyGraph.TitleFontSize=12
Tolerance Property
Applies To Data
Description Specifies tolerance range for numeric data searches.
Syntax objectname.Tolerance = number
Remarks Use with Exclude, Include, Remove and Replace.
Scripting Commands
U
699
E
U
Example
MYDATA.SearchArea="CONC"
MYDATA.Find="3"
MYDATA.Operation="="
MYDATA.Tolerance="0"
MYDATA.CaseSensitive=False
MYDATA.With="Missing"
MYDATA.Replace
TreatmentA Property
Applies To Toolbox
Description Specifies input data set column to be used for first treatment
Syntax Toolbox.TreatmentA=column name
Example Toolbox.TreatmentA=Treatment1
TreatmentB Property
Applies To Toolbox
Description Specifies input data set column to be used for second treatment
Syntax Toolbox.TreatmentB=column name
Example Toolbox.TreatmentB=Treatment2
Uniform Property
Applies To Graph
Description Specifies that plots created with a Sort variable should have uniform axes
across levels.
Syntax
Objectname.Uniform = {True | False}
Example
MYOUTGRAPH.UNIFORM=True
Tolerance (continued) Property
Unit Property
Applies To Data Object
WinNonlin
Users Guide
700
E
Description Assigns a unit to a column. Used in conjunction with the Column property.
Example
MyData.Column=Concentration
MyData.Unit=ng/ml
Unit (continued) Property
Unload Method
Applies To Plot
Description Specifies that plots created with a Sort variable should have uniform axes
across levels.
Syntax Objectname.Uniform = {True | False}
Remarks Unload should be applied to any object that will not be referenced any
longer in a script.
Using the Unload method on the WinNonlin object causes the entire applica-
tion to be unloaded. To leave the system interactive after running a script, do
not use the Unload method on the WinNonlin object.
See Also Load
Example MyModel.Unload
UpErr( ) Property
Applies To Plot
Description Defines the column to be used for the up error data.
Syntax Plot.UpErr(Data Set no.) = string
Remarks This property must contain a value even if there is only one data source.
If the SameErrCol( ) property is set to True, then the UpErr( ) property is
used for both up and down error.
See Also DnErr( ), SameErrCol( )
Examples
Plot.UpErr(1) = Maximum
Plot.UpErr(1) = SE
Scripting Commands
V
701
E
V
W
Weight Property
Applies To Desc
Description Specified the column to be used for doing weighted descriptive statistics.
Syntax Desc.Weight = string
Remarks If a weight variable is not specified, uniform weighting will be used.
Example Desc.Weight = Weight
WindowState Method
Applies To Data, Graph, Model, Text, WinNonlin
Description Sets the window state of the specified object.
Syntax objectname.WindowState = {Minimized | Maximized | Normal}
Remarks Using this property on the WinNonlin object allows the user to run a script
with the application minimized.
Example WinNonlin.WindowState = Minimized
With Property
Applies To Data
Description Specifies replacement data.
Syntax Objectname.With = string
Remarks Use with RenameCol and Replace.
Example
MYDATA.Column=a
MYDATA.With=Subject
MYDATA.RenameCol
WordExportFilename Property
Applies To PK
WinNonlin
Users Guide
702
E
X
Description Sets the file name to be used in Word when using the Word export method.
Syntax PK.WordExportFilename = string
Remarks This property is used only with the RunWordExport method. If WordExport-
Filename is not specified when using RunWordExport, the output document
will still be created but not saved in Word.
Microsoft Word must be installed on the same machine as WinNonlin.
See Also RunWordExport
Example
Set MyModel = Model
MyModel.Filename = bg1.cmd
MyModel.FileType = ASCII
MyModel.Load
PK.WordExportFilename = bg1.doc
PK.RunWordExport
WordExportFilename (continued) Property
WorkingDir Property
Applies To WinNonlin
Description Changes working file directory.
Syntax WorkingDir = string
Remarks This property sets the Working directory in which WinNonlin will load and
save files. This is particularly useful for making script files portable, as it
removes the need to specify absolute paths for data files used in the script--
i.e., files can be referred to by name alone, if they are located in the directory
set by the workingDir command.
Example WorkingDir = C:\Newdir
XLabelsFont Property
Applies To Graph
Description Sets the font for the X axis labels on the chart
Syntax ObjectName.XLabelsFont = string
See Also XLabelsFontSize
Scripting Commands
X
703
E
Example MyGraph.XLabelsFont = Arial
XLabelsFontSize Property
Applies To Graph
Description Sets the font size for the X axis labels on the chart
Syntax ObjectName.XLabelsFontSize = <number>
See Also XLabelsFont
Example MyGraph.XLabelsFontSize = 12
XTitle Property
Applies To Plot
Description Defines the string to be displayed in the x-axis title of the plot.
Syntax Plot.XTitle=string
See Also Title, YTitle, Legend( )
Example Plot.XTitle = Time
XLabelsFont (continued) Property
XTitleFont Property
Applies To Graph
Description Sets the font for the X axis title on the chart.
Syntax ObjectName.XTitleFont=string
See Also XTitleFontSize
Example MyGraph.XTitleFont = Arial
XTitleFontSize Property
Applies To Graph
Description Sets the font size for the X axis title on the chart
Syntax ObjectName.XTitleFontSize = <number>
WinNonlin
Users Guide
704
E
See Also XTitleFont
Example MyGraph.XTitleFontSize = 12
XUnits Property
Applies To Graph
Description Defines the units to be displayed in the x-axis title of the plot. The units por-
tion of the x-axis title will appear in parenthesis after the x-axis title.
Syntax ObjectName.Xunits=string
See Also YUnits
Example MyGraph.XUnits = hr
XUnits Property
Applies To Plot
Description Defines the units to be displayed in the x-axis title of the plot. The units por-
tion of the x-axis title will appear in parenthesis after the x-axis title.
Syntax Plot.XUnits=string
See Also ShowUnits, YUnits
Example Plot.XUnits = hr
XVar( ) Property
Applies To Plot
Description Defines the X variable column for a plot.
Syntax Plot.XVar(Data Set no.) = string
Remarks This property must contain a value even if there is only one data source.
Example Plot.XVar(1) = Time
XTitleFontSize (continued) Property
Scripting Commands
Y
705
E
Y
YLabelsFont Property
Applies To Graph
Description Sets the font for the Y axis labels on the chart
Syntax ObjectName.YLabelsFont=string
See Also YLabelsFontSize
Example MyGraph.YLabelsFont = Arial
YLabelsFontSize Property
Applies To Graph
Description Sets the font size for the Y axis labels on the chart
Syntax ObjectName.YLabelsFontSize=<number>
See Also YLabelsFont
Example MyGraph.YLabelsFontSize=12
YTitle Property
Applies To Plot
Description Defines the string to be displayed in the y-axis title of the plot.
Syntax
Plot.YTitle=string
See Also Title, XTitle, Legend( )
Example Plot.YTitle = Concentration
YTitleFont Property
Applies To Graph
Description Sets the font for the Y axis title on the chart
Syntax ObjectName.YTitleFont=string
See Also YTitleFontSize
Example MyGraph.YTitleFont = Arial
WinNonlin
Users Guide
706
E
YTitleFontSize Property
Applies To Graph
Description Sets the font size for the Y axis title on the chart
Syntax ObjectName.YTitleFontSize = <number>
See Also YTitleFont
Example MyGraph.YTitleFontSize = 12
YUnits Property
Applies To Graph
Description Defines the units to be displayed in the y-axis title of the plot. The units por-
tion of the y-axis title will appear in parenthesis after the y-axis title.
Syntax ObjectName.YUnits=string
See Also XUnits
Example MyGraph.YUnits = mg/ml
YUnits Property
Applies To Plot
Description Defines the units to be displayed in the y-axis title of the plot. The units por-
tion of the y-axis title will appear in parenthesis after the y-axis title.
Syntax Plot.YUnits=string
See Also ShowUnits, XUnits
Example Plot.YUnits = mg/ml
YVar Property
Applies To Plot
Description Defines the Y variable column for a plot.
Syntax Plot.YVar(Data Set no.) = string
Remarks This property must contain a value even if there is only one data source.
Example Plot.YVar(1) = Concentration
707
Appendix F
Warnings and Error
Messages
There are six sources of error messages in WinNonlin. Each has a unique set
of error message numbers, as follows:
Compartmental modeling
When modeling is run, error messages and warnings are written to the text
output. If an error occurs that does not prevent completion of modeling, it will
be written to the text output (if the user requested text output). If an error
occurs that prevents completion of modeling, text output will be created,
whether or not the user requests it; errors and warnings will be written there.
Note: To locate error messages, search for the word ERROR in the text output.
10001 Invalid statement. Program terminated.
Source Message numbers
Microsoft Visual Basic & OCX's
a
a. See Microsofts documentation for information on error
messages from Visual Basic and the Windows OCX's.
1-9999
Compartmental modeling 10000-10999
LinMix and Bioequivalence wizards 11000-11999
Table Wizard 12000-12999
Descriptive statistics 13000-13999
Noncompartmental analysis 14000-14999
Scripting language 19000-19999
WinNonlin
Users Guide
708
F
The preceding statement contains a syntax error (e.g. C = A+ *B).
10002 Unmatched parenthesis. Program terminated.
The preceding statement contains an extra left parenthesis.
10003 Improper statement found when evaluating model. Program terminated.
This is an unusual error. If it occurs, please bring it to the attention of Phar-
sight customer support.
10004 Missing END statement. Program terminated.
An END statement was missing for one or more of the following labeled
groups of commands: TRANSFORM, COMMANDS, TEMPORARY,
STARTING, DIFFERENTIAL, FNUMBER, SECONDARY.
10005 Invalid number. Program terminated.
The previous equation contains an illegal number (constant).
10006 Model too complex. Rerun with larger model size (SIZE command). Program
terminated.
The model was too complex for the default memory settings. Try the model
again after increasing the model size (via the SIZE command, or the Model
size option on the PK Settings tab, in the Model Options dialog box).
10007 Invalid variable name or character. Program terminated.
The previous equation contains an invalid character. (i.e., not A-Z, 0-9, +, -, /,
*, **, (), &)
10010 Model too complex. Rerun with larger model size (SIZE command). Program
terminated.
Workspace is not large enough to accommodate the model. The maximum
number of variables and operators has been exceeded (2000). To help allevi-
ate this problem, assign expressions to temporary variables (in the TEMP sec-
tion) before using them to define the model.
10011 Unmatched parenthesis. Program terminated.
There was an unmatched or missing right parenthesis, or too many arguments
were encountered in a subscribed variable or function (e.g. DZ(1,1) or ABS
(A,B)).
10012 Invalid function number. Program terminated.
An invalid FUNCTION number was assigned. Function numbers must be
integers, greater or equal to 1, and less than or equal to the number of func-
tions in the NFUNCTIONS command.
Warnings and Error Messages
Compartmental modeling
709
F
10013 Invalid group identifier. Program terminated.
An invalid label was assigned to a group of commands (e.g. STRT in place of
START).
10014 Missing argument in function or array. Program terminated.
An argument was missing for a function (e.g., MAX(A) instead of
MAX(A,B))
10015 Model section does not exist. Check to see if NSEC > 0 but no secondary
parameters are defined, or if the FUNCTION block(s) is missing. Program
terminated.
A labeled section does not exist. For example, an NSEC command was speci-
fied, but the secondary parameters were never defined.
10017 Equation too complicated. Program terminated.
At least one of the equations was too complicated to evaluate. Split it up into
two or more parts using temporary variables.
10018 No IF corresponding to ENDIF. Program terminated.
An ENDIF statement was encountered without a matching IF statement.
10019 Missing ENDIF statement. Program terminated.
An ENDIF statement is missing.
10020 Undefined (GOTO) label. Program terminated.
A label was referenced (e.g. with a GOTO) which was never defined. Either
the label is missing entirely, or is missing the ending colon :.
10021 Invalid (GOTO) label name. Program terminated.
The label name is invalid. Change the label to a valid name.
10022 Model too complex. Rerun with larger model size (SIZE command). Program
terminated.
The maximum number of temporary variables and labels (100) has been
exceeded.
10023 No matching IF.. THEN.. for an ELSE statement. Program terminated.
An ELSE statement was encountered without corresponding IF - THEN state-
ments.
10024 IF statements nested too deeply. Program terminated.
IF statements can only be nested as deep as 10 levels.
10025 Cannot branch out of program section. Program terminated.
WinNonlin
Users Guide
710
F
An attempt was made to branch from one block of statements (TEMP, FUNC,
etc.) to a labeled section in another block of statements using a GOTO. This is
not supported.
10026 Duplicate label name. Program terminated.
A duplicate label name was encountered. Change the label to a new name.
10027 Invalid array subscript. Check to see if subscript exceeded array bound. Pro-
gram terminated.
An invalid array access was attempted. The model has gone outside allowable
limits when accessing some variable which is an array (e.g. DTA (11)).
10028 Invalid statement encountered when evaluating model. Program terminated.
An invalid branching occurred during execution. Check to see that the model
is specified correctly.
10029 Invalid statement encountered when evaluating model. Program terminated.
An invalid comparison occurred during execution. Check to see that the
model is specified correctly.
10030 Operation attempted using A missing VALUE. Program terminated.
10031 Attempt to divide by zero. Program terminated.
10033 Invalid argument for LOGE(X). Program terminated.
The argument for loge(x) was invalid. Perhaps X was undefined, or 0 or a
negative number.
10034 Invalid argument for LOG10(X). Program terminated.
The argument for log10(x) was invalid. Perhaps X was undefined, or 0 or a
negative number.
10035 Invalid argument for SQRT(X). Program terminated.
The argument for SQRT(x) was invalid. Perhaps X was undefined or a nega-
tive number.
10036 Invalid argument for ATAN2(X,Y). Program terminated.
The argument for ATAN2(x,y) was invalid. Perhaps either X or Y was unde-
fined or a negative number, or perhaps only one argument was given.
10037 Problem exceeds available resources. Program terminated.
Notify Pharsight technical support for assistance at support@pharsight.com.
10050 DO statement missing a NEXT statement. Program terminated.
Warnings and Error Messages
Compartmental modeling
711
F
A NEXT statement must end each DO loop. Check all DO statements for cor-
responding NEXT statements.
10051 Too many nested DO statements. Program terminated.
DO statements may only be nested 10 deep.
10052 Invalid DO statement. Program terminated.
Check the arguments and syntax of any DO statements.
10053 Maximum model size is 64. Program terminated.
Please check the model specification for problems.
10054 Maximum length of DO statement is 788 characters. Program terminated.
10055 Maximum number of DO statements is 999. Program terminated.
10056 NEXT statement missing corresponding DO. Program terminated.
A NEXT statement ends a DO loop. Check all NEXT statements for corre-
sponding DO statements.
10057 String length exceeds 256. Program terminated.
No input record may exceed 256 characters in length.
10058 Invalid lag function argument. Program terminated.
The argument for lag(x) was invalid. X must be the column number of a
defined variable.
10101 The number of data observations, NOBS, was not defined.
The number of data observations to be input (NOBS) was not defined.
10102 A DATA command was not encountered.
Missing DATA command.
10103 The number of parameters to be estimated, NPARM, was not given.
No NPARAMETERS command was encountered.
10104 The initial estimates of the parameters, INIT, were not given.
No INITIAL command was encountered.
10105 CONV = 0 is only supported for integrated functions (NDER=0).
Turning off of convergence checks is only supported for integrated equations.
10106 The number of parameter values, NPARM, must be specified prior to INIT,
LOWER, OR UPPER
NPARAMETERS must precede INITIAL, LOWER and UPPER commands.
WinNonlin
Users Guide
712
F
10107 Error converting units for next value. Using default units.
The preferred units were inconsistent with the default units or were not
acceptable units.
10108 The number of data observations, NOBS, must be specified prior to the DATA
command.
The number of observations to be input (NOBS), must precede DATA.
10109 Error encountered when reading initial parameter values.
The program was unable to read NPARM numbers on the INITIAL command.
Either fewer than NPARM initial estimates were given, or one of the numbers
was not carefully defined (e.g. 1.2 - E-3).
10110 Error encountered when reading the number of NOBS for each function.
The program was unable to read NFUN numbers on the NOBS command.
10111 The number of functions must be greater than 0.
The specified number of functions must be between 1 and 10.
10112 The number of parameters to be estimated must be greater than 0. Program
terminated.
The specified number of parameters must be between 1 and 10.
10113 The number of derivatives must be greater than 0. Program terminated.
If the system includes differential equations, the number of differential equa-
tions in the system must be between 1 and 10.
10114 The specified method for estimating the residual sum of squares must be 1, 2
or 3. Program defaulting to method 2, execution continuing.
The specified METHOD must be 1, 2 or 3. Method 1: Nelder-Mead, Method
2: Hartley's and Levenberg's modification of the Gauss-Newton Algorithm
(default), Method 3: Hartley's Modification of the Gauss-Newton Algorithm.
10115 The maximum number of iterations must be greater than or equal to zero. Pro-
gram defaulting to 50, execution continuing.
An invalid value was assigned to maximum number of ITERATIONS.
10116 The number of variables in the input file must be greater than 0.
A maximum of 10 variables (columns) can be read in from a data file.
10117 The column numbers corresponding to X and Y must be greater than 0 and
must be less than or equal to NVAR.
Warnings and Error Messages
Compartmental modeling
713
F
The column numbers associated with X and Y (XNUMBER, YNUMBER)
must be between 1 and 10.
10118 The number of rows in the plots must be between 10 and 50. PRogram
defaulting to 50, execution continuing.
An invalid value was entered.
10119 The number of columns in the plots must be between 10 AND 100. Program
defaulting to 100, execution continuing.
An invalid value was entered.
10120 The specified convergence criterion must be greater than or equal to 0. Pro-
gram defaulting to 1.E-4, Execution continuing.
An invalid value was assigned to the CONVERGENCE command.
10121 The increment for estimating partial derivatives must be between 0 AND 0.1.
Program defaulting to 0.001, execution continuing.
The increment used for estimating the partial derivatives DINC must be
between 0.0 and 0.1.
10122 The variable names for X and Y cannot be equal.
X and Y cannot be assigned to the same column in the input data file.
10123 The variable number corresponding to weight must be greater than 0.
If weights are to be read in from the data file, they must have an assigned col-
umn number greater than one.
10124 Error encountered when trying to read a number on the preceding command.
An error was encountered when trying to read the (first) number from the pre-
ceding command. Either the program was expecting a number to be specified
and none was given, or the number was not correctly defined (e.g. 1.2 - E-3).
10125 Error on data file
An error was encountered when reading the data file. There are several ways
this can happen: a. Fewer than NOBS observations were on the data file.
b. Fewer than NVAR numbers were on one or more rows on the data file.
c. One or more illegal numbers (e.g. 1.2 - E-3).
10126 Error encountered when reading in the upper or lower parameter limits. Exe-
cution continuing without limits on the parameter space.
An error was encountered when reading the lower (or upper) parameter limits.
Either fewer than NPARAMETERS numbers were on the card or one or more
invalid numbers were specified (e.g. 1.2 - E-3).
WinNonlin
Users Guide
714
F
10127 If lower (or upper) limits are specified then upper (or lower) limits must also
be specified. Execution continuing without limits on the parameter space.
If LOWER limits are specified, then UPPER limits must also be specified
(and vice-versa).
10128 An improper call was made to the numerical integration routine. Check your
input and model. Program terminated.
An error was encountered when trying to numerically integrate a system of
differential equations. This can usually be attributed to an improperly defined
model. Check to see that the model was correctly specified.
10129 Too much relative accuracy was requested for this problem. Relative error
and-or absolute error tolerances were reset. Check your model for possible
singularities. Execution continuing.
The program is having difficulty obtaining the necessary precision when inte-
grating a system of differential equations. Check the model for possible singu-
larities.
10130 The program is having to work very hard to obtain the desired accuracy. Make
sure your model is correct. Execution continuing
A very large number of function evaluations are having to be made to obtain
the desired precision. Check to see that the model was correctly specified.
10131 The number of constants must be greater than 0.
If CONSTANTS are used, the number of user input constants must be
between 1 and 500.
10132 The number of constants must be specified before assigning them values.
The NCON command must appear prior to the CONSTANTS command.
10133 An error was encountered when reading the values assigned to the constants.
An error was encountered when trying to read the NCON values assigned to
constants. Either fewer than NCON values were specified, or one of the val-
ues was not correctly defined (e.g. 1.2 - E-3).
10134 Parameter estimate for <parameterName> is at or near boundary.
10135 An initial parameter estimate is outside of the specified upper and lower lim-
its. Parameter limits ignored - Execution continuing.
One or more of the initial parameter estimates is outside the specified upper
and lower limits.
10136 An error was encountered when reading constant names. Program terminated.
Warnings and Error Messages
Compartmental modeling
715
F
10137 The referenced library contains a model statement without a model number.
Program terminated.
Each MODEL statement in a WinNonlin library must also have a correspond-
ing model number (e.g. MODEL 7).
10138 A convergence failure occurred during a singular value decomposition. Check
the model for possible singularities. Program terminated.
Check to make sure that the model has been correctly defined.
10139 NCON was specified but the constants were not input.
An NCONSTANTS command was encountered but the constants were never
defined (CONSTANTS).
10140 NSEC must be specified prior to the SNAME command.
The NSECONDARY command must precede the SNAMES command.
10142 NSEC must be greater than 0.
If secondary parameters are specified, the number of secondary parameters
must be between 1 and 50.
10143 An error was encountered when reading parameter, secondary, data or unit
names. Program continuing with default names.
An error was encountered reading the parameter or secondary parameter
names. Make sure that the number of input names matches NPARAMETERS
(or NSECONDARY) and that each name is enclosed in single quotes.
10144 The specified model number does not exist in the specified library.
10145 The specified title number must be 1, 2, 3, 4, OR 5.
The specified TITLE number must be 1, 2, 3, 4, or 5 (e.g. TITLE 3).
10146 The specified number of plot points must be between 10 and 20000.
NPOINTS reset to default.
The specified number of points to be included in the output plot file must be
between 10 and 20000.
10147 Scale values could not be computed for the next plot. Plot deleted.
Axis scale values could not be computed for a plot. This could happen, for
example, if all values to be plotted were identical.
10148 The number of constants (NCON) is inconsistent with the number of adminis-
tered doses.
The number of constants (NCONSTANTS) is not consistent with the number
of doses given.
WinNonlin
Users Guide
716
F
10149 The WEIGHT command cannot be used when performing simulations. The
WEIGHT command was changed to REWEIGHT.
When performing simulations, since no observed data exist, it is inappropriate
to use the WEIGHT command. REWEIGHT will be used.
10150 The parameter variance-covariance matrix is singular. Program terminated.
The variance-covariance matrix for the model parameters is singular.
10151 The algorithm is unable to converge. Program terminated.
The Gauss-Newton algorithm was unable to converge. Try using different ini-
tial estimates, or try rerunning the problem using the Nelder-Mead algorithm.
10152 The residual sum of squares is zero. Convergence assumed.
10153 One or more weights became negative. Weight set to missing.
Check model definition statements to make sure WT is defined correctly.
10154 The specified library file does not exist. Program terminated.
Check for proper specification of the model file.
10155 An error was encountered when reading beta time range. Program continuing
with default estimation of time range.
These are the values for selecting the Lambda z time interval.
10156 An error was encountered when reading the missing value code. Program con-
tinuing with default missing value code.
Make sure that the missing value code is eight characters or less in length, and
surrounded by quotes.
10157 The value of FNUM is invalid. Check to make sure NVAR is correct. Program
terminated.
FNUMBER must be the number of a column on the input data set.
10161 Inadequate system resources available for this problem.
Notify Pharsight technical support for assistance at support@pharsight.com.
10162 Error encountered when reading link model PK constant values.
An error occurred when reading the parameter values for the PK model.
10163 NOBS command ignored since FNUM specified.
The function variable specified by FNUMBER will be used to determine
which observations belong to which functions.
10164 The NOBS values are inconsistent with the number of records in the data file.
Warnings and Error Messages
Compartmental modeling
717
F
The sum of the NOBSERVATIONS values is not equal to the number of
observations on the data set. It is recommended to use a function variable for
data with more than one function. See FNUMBER on page 627.
10165 The PNAME, SNAME, DNAME, CNAME, PUNIT and SUNIT values can-
not contain embedded blanks.
10166 Internal parsing file error. Please report to technical support.
Contact Pharsight Technical Support for assistance: support@pharsight.com.
10167 Command encountered when reading model statements.
Check whether the model is missing an EOM statement or any commands in
the model are not inside a block. See also Model structure on page 274.
10170 Improper use of END statement. Check to see if a compiled model was speci-
fied by user. Model statements were contained in the command file.
END statements are for use only in user models. See User Models on
page 273.
10171 The lower and upper bounds were equal for one or more model parameters.
Please modify them and rerun your model.
10172 The number of observations must be greater than the number of parameters.
10173 Error degrees of freedom less than or equal to zero. Error variance and stan-
dard errors or parameters cannot be estimated.
10174 Infusion model should not be used if end time is less than or equal to start
time. Use bolus model if start time equals end time.
10175 Models 15, 16, and 17 do not support bolus dose <= zero, IV dose <= zero, or
infusion length <= zero.
10201 Initial estimates cannot be determined for this model.
Initial estimates cannot be found for this model. If no bounds were used, try
adding bounds so that the program can grid search for initial estimates.
10202 Curve stripping is only done for single dose data.
Automatic estimation of initial estimates is available for single dose data only.
10203 An error occurred during curve stripping.
Initial estimates could not be found for the model. If no bounds were used, try
adding bounds so that the program can grid search for initial estimates.
10204 The requested number of exponentials could not be fit. Please try fitting a
simpler model.
WinNonlin
Users Guide
718
F
Initial estimates for the number of exponential terms in the specified model
could not be determined. Try fitting a less complex model, less compartments.
10205 Due to failure of the curve stripping method, a grid search will be performed.
Initial estimates could not be determined for this model via curve stripping. A
grid search will be used to obtain initial estimates.
10206 The initial estimates are outside of the lower or upper parameter limits. Exe-
cution continuing without limits on parameter space.
The initial parameter estimates are outside of the LOWER and UPPER limits.
Troubleshooting modeling problems
Occasionally when modeling, WinNonlin will terminate abnormally, or termi-
nate normally and converge to unreasonable values of the parameter esti-
mates. If these types of problems occur, apply the following steps in
determining what may have gone wrong.
Note that it is possible that a specified model and input values may be correct,
but there simply may not be enough information contained in the data to pre-
cisely estimate all of the parameters in the model. If that is the case, the only
recourse is to obtain additional data.
Check the history file associated with the PK Data Output window. Error mes-
sages may appear here as guidance in resolving the problem. If no PK Data
Output window appears, check the Text (ASCII) output for error messages.
If the model was defined by the user (i.e., not one of the models in WinNon-
lin's built-in library), carefully check the model definition statements to make
sure that there are no undefined or uninitialized variables. Also make sure that
the model has not attempted any illegal arithmetic computations such as tak-
ing the logarithm of zero or the square root of a negative number.
Carefully check the input data set and constants to make sure the values are
correct. A plot of the data can be very helpful.
Check the initial values of the parameters to see if they are reasonable. One
way to do this is to rerun the problem as a simulation. To do this, check the
Simulate check box in the Y Variable group box in the Data Variables dialog
box. Are the predicted values from the simulation reasonably close to the
observed data?
Often error messages occur because WinNonlin is having difficulty fitting the
model to the data. In addition, warning messages may also be generated to
alert the user that WinNonlin is having to work very hard to obtain the param-
eter estimates, which may indicate that the model is ill-defined. The data set
Warnings and Error Messages
LinMix and Bioequivalence wizards
719
F
may be ill-conditioned or the initial parameter estimates may be too far from
the true values. If these messages occur, try rerunning the problem and add
LOWER and UPPER constraints. If the problem recurs, try using METHOD
1 (Nelder - Mead - via the Settings tab in the Model Options dialog box).
LinMix and Bioequivalence wizards
When errors occur using the LinMix or Bioequivalence wizards a message
box will appear with the error number and a description of the error.
11001 Memory allocation error.
Insufficient memory. If other applications are running, save your work in
these applications, close them and try again. Closing other WinNonlin win-
dows would also help.
11002-11032 Internal error during calculations. Contact Pharsight Technical Support.
11050, 11051 Internal parsing error. Contact Pharsight Technical Support.
11060 Corrupted data set.
11061 Input data not rectangular.
11062 Too many levels of a classification variable.
11063 Character variables in models must be class variables.
11064 Weight variable must be numeric.
11065 The residual variance is not modeled. Try random instead of repeated.
11066 There are no degrees of freedom for residual. Try the Satterthwaite option.
11067 Dependent variable must be numeric.
11068 There are no residual degrees of freedom. No statistical tests are possible.
11069 There is no residual variance. Try a different model.
11070 Error in Satterthwaite DF. Try using Residual DF option.
11075 Error opening file.
11089 Bioequivalence statistics could not be computed for some test formulations.
11090 Asymptotic covariance matrix not computed. Information matrix is deemed
singular.
11091 Newton's algorithm converged with modified Hessian. Output is suspect.
11092 Failed to converge in allocated number of iterations. Output is suspect.
11093 Starting estimates supplied by user are invalid. Using method of moments.
WinNonlin
Users Guide
720
F
11094 Negative final variance component. Consider omitting this VC structure.
11095 Negative final variance parameter. Consider FA0 structure instead of UN.
11096 Negative final block term for CS. Consider omitting random model for this
structure.
11097 Negative final variance parameter for TOEP structure.
11098 Negative final variance parameter for AR structure.
11099 Negative final standard deviation for ARH/CSH structure.
11101 More than 2 treatment formulations not allowed for population/individual
bioequivalence.
11102 More than 10 periods not allowed for population/individual bioequivalence.
11103 More than 200 subjects not allowed for population/individual bioequivalence.
11104 More than 10 sequences not allowed for population/individual bioequiva-
lence.
11105 Only 1 treatment formulation is not allowed for population/individual
bioequivalence.
11106 Only 1 period is not allowed for population/individual bioequivalence.
11107 Fewer than 2 sequences had complete design. Program terminating.
11108 Missing data for dependent variable causing an incomplete design.
11109 Ln-transform requested for data that is zero or negative causing an incomplete
design.
11121 Subject <name> had incomplete design and was discarded.
11122 Sequence < > had less than 2 complete subjects and was discarded.
11201 The column ColName contains alphanumeric value(s) that are greater than
maxsize in length. We suggest creating a new variable with re-coded values
that are less than or equal to this maximum length. Do you want to continue
with shortened values?
Alpha variables are limited to a length of 128 characters.
11206 There is an error on the following tab(s): tab name(s).
This error occurs when there is an error on one of the tabs. Possibly the model
is missing, or the dependent variable is missing.
11207 Failed to create model as specified in the model file.
11208 Unable to find any DATA command in command filename.
Warnings and Error Messages
Table Wizard
721
F
This error occurs when the user loads a model command file from the tool bar
and this file does not contain any valid DATA statement.
11210 Unable to find file command filename
This error occurs when the specified command file does not exist.
11211 File data filename not found
This error occurs when the data file referenced by the data statement in the
command file is not found.
11212 Second delimiter in filename for DATA statement not found.
11214 Variable name too long for LinMix, variable will be temporarily truncated for
use by LinMix. Maximum variable name length is 256 characters.
11215 There are greater than 256 variables in your data set. The LinMix module has
a limit of using no more than 256 variables. Please decrease the number of
variables on the data set then rerun the LinMix module.
Table Wizard
When errors occur with the Table Wizard a message box will appear with the
error number and a description of the error.
12999 Memory allocation error
Insufficient memory. If other applications are running, save your work in
these applications, close them and try again. Closing other WinNonlin win-
dows would also help.
Descriptive statistics
When errors occur in the Descriptive Statistics module a message box will
appear with the error number and a description of the error.
13000 Floating Point error
13999 Memory allocation error
Insufficient memory. If other applications are running, save your work in
these applications, close them and try again. Closing other WinNonlin win-
dows would also help.
WinNonlin
Users Guide
722
F
Noncompartmental analysis
Error messages
14001 Memory allocation error. Insufficient random access memory. If other appli-
cations are running, save work, close the applications and try again. Closing
other WinNonlin windows may also help.
14002 Error opening file. Contact Pharsight Technical Support.
14021 All concentration values are zero.
14022 Only 1 non-zero concentration value found, and it was at dosing time.
14024 All volume values are zero. No grid output for this subject.
14050 Internal parsing error. Contact Pharsight Technical Support.
14061 No data in steady state dosing interval; program terminating.
14062 Duplicate time values on data file. Option: use Descriptive Statistics to com-
pute mean data and perform NCA on the means.
14064 Invalid urine data: lower time >= upper time, or negative volume or concen-
tration.
Warnings
14501 Incompatible units for partial AUCs and summary AUCs; using default units.
14502 Incompatible units for summary table AUMC values; using default units.
14503 Incompatible units for summary table Amount values; using default units.
14504 Incompatible units for final parameter <default parameter name>; using
default units.
14511 MRT parameters are adjusted for length of infusion.
14512 Adjusting for infusion has caused negative MRTlast value.
14513 Adjusting for infusion has caused negative MRTinf(obs) value.
14514 Adjusting for infusion has caused negative MRTinf(pred) value.
14515 Therapeutic window calculations cannot be done for negative data.
14520 Only one non-missing observation. All final parameters are set to missing.
14521 All concentration values are zero.
14522 Only 1 non-zero concentration value found, and it was at dosing time.
Warnings and Error Messages
Scripting language
723
F
14524 All volume values are zero. All final parameters are set to missing.
14523 Less than two non-missing observations. No grid output for this subject.
14530 Lambda_z could not be estimated. No parameters could be extrapolated to
infinity.
14531 AUC_TAU could not be estimated. Steady state PK parameters could not be
estimated.
14532 The value at dosing time could not be determined by log-linear regression of
the first two measurements, and was set to the first observed measurement.
You may also try using a constant infusion model.
Scripting language
Errors that are generated when using the Scripting Language are written to the
data log file. Please consult this log for guidance in resolving problems with
script files. If no errors exist, this log file will not be created.
19999 Memory allocation error
Insufficient memory. If other applications are running, save your work in
these applications, close them and try again. Closing other WinNonlin win-
dows would also help.
WinNonlin
Users Guide
724
F
725
Appendix G
Visual Basic Automation
Reference
WinNonlin automation properties, methods and
variables
Chart module
Instancing: MultiUse
AxisLabelsFont Property
Returns or sets the font for the axis labels.
Example: object.AxisLabelsFont(AxisIdX) = Arial
See Also: AxisLabelsFontSize Property, AxisTitleFont Property
Applies To: Chart object
Axi sLabel sFont Si ze Pr opert y
Returns or sets the font size for the axis labels.
Example: object.AxisLabelsFontSize(AxisIdX) = 10
See Also: AxisLabelsFont Property, AxisTitleFontSize Property
Applies To: Chart object
Axi sTi t l e Pr oper t y
Returns or sets the axis title.
Example: object.AxitTitle(AxisIdX) = Time
See Also: ChartTitle Property
Parameter Type (Default) Description
nAxisID WnlAxisIDConstants This parameter determines the axis to modify.
Parameter Type (Default) Description
nAxisID WnlAxisIDConstants This parameter determines the axis to modify.
Parameter Type (Default) Description
nAxisID WnlAxisIDConstants This parameter determines the axis to modify.
WinNonlin
Users Guide
726
G
Applies To: Chart object
Axi sTi t l eFont Pr oper t y
Returns or sets the font for the axis title.
Example: object.AxisTitleFont(AxisIdX) = Arial
See Also: AxisTitleFontSize Property, AxisLabelsFont Property
Applies To: Chart object
Axi sTi t l eFont Si ze Pr oper t y
Returns or sets the font size for the axis title.
Example: object.AxisTitleFontSize(AxisIdX) = 10
See Also: AxisTitleFont Property, AxisLabelsFontSize Property
Applies To: Chart object
Axi sUni t s Pr oper t y
Returns or sets the units in the axis title.
Example: object.AxisUnits(AxisIdX) = hr
Applies To: Chart object
Capt i onPr ef i x Pr oper t y
Read-only property that returns the caption prefix of an object.
Remarks: The caption prefix precedes the object type in the object windows caption.
Example: sPrefix = object.CaptionPrefix
Applies To: Chart object, Workbook object, TextEditor object
Changed Propert y
Returns or sets the changed status of the object.
Remarks: When the value is True, a file save warning will be shown when the object
is closed.
Example: object.Changed = False
Parameter Type (Default) Description
nAxisID WnlAxisIDConstants This parameter determines the axis to modify.
Parameter Type (Default) Description
nAxisID WnlAxisIDConstants This parameter determines the axis to modify.
Parameter Type (Default) Description
nAxisID WnlAxisIDConstants This parameter determines the axis to modify.
Visual Basic Automation Reference
Chart module
727
G
Applies To: Chart object, Workbook object, TextEditor object
Char t Count ForTab Propert y
Read-only property returns the number of charts (or profiles) for the specified tab.
Example: nCharts = object.ChartCountForTab
See Also: MoveFirst Method, MoveNext Method, MovePrevious Method, MoveLast
Method, CurrentChartForTab Property
Applies To: Chart object
Chart Ti t l e Pr opert y
Returns or sets the chart title.
Example: object.ChartTitle = My Chart Title
See Also: AxisTitle Property
Applies To: Chart object
Cur r ent Char t For Tab Pr oper t y
Read-only property returns the current chart for the active tab.
Example: nChart = object.CurrentChartForTab
See Also: MoveFirst Method, MoveNext Method, MovePrevious Method, MoveLast
Method, ChartCountForTab Property
Applies To: Chart object
Edi t Copy Met hod
Copies the current chart to the clipboard.
Example: object.EditCopy
Applies To: Chart object
Fi l ename Pr oper t y
Returns or sets the file name of the object.
Example: object.filename = c:\data\myfile.pco
See Also: FileType Property
Applies To: Chart object, Workbook object, TextEditor object
Parameter Type (Default) Description
nTab Integer (0) (Optional) The tab to return the chart count for
or the active tab if nTab is zero or unspecified.
WinNonlin
Users Guide
728
G
Fi l eType Pr opert y
Returns and set the file type.
Example: object.FileType = FileFWChart
See Also: Filename Property
Applies To: Chart object, Workbook object, TextEditor object
Foot not eFont Pr opert y
Returns or sets the font for the chart footnote.
Remarks: The chart footnote is used to display sort key information.
Example: object.FootnoteFont = Arial
See Also: FootnoteFontSize Property, TitleFont Property, LegendFont Property
Applies To: Chart object
Foot not eFont Si ze Pr opert y
Returns or sets the font size for the chart footnote.
Remarks: The chart footnote is used to display sort key information.
Example: object.FootnoteFontSize = 8
See Also: FootnoteFont Property, TitleFontSize Property, LegendFontSize Property
Applies To: Chart object
FormCapt i on Propert y
Read-only property that returns the caption of the objects window.
Example: sCaption = object.FormCaption
Applies To: Chart object, Workbook object, TextEditor object
I D Pr opert y
Read-only property that returns the ID of the object.
Remarks: The ID property is only valid during a WinNonlin session. It is not persis-
tent.
Example: sID = object.ID
See Also: UUID Property
Applies To: Chart object, Workbook object, TextEditor object
I mage Pr oper t y
Read-only property that returns a bitmap image of the current chart.
See Also: EditCopy Property
Visual Basic Automation Reference
Chart module
729
G
Applies To: Chart object
LegendFont Pr oper t y
Returns or sets the font for the chart legend.
Example: object.LegendFont = Arial
See Also: LegendFontSize Property, TitleFont Property, FootnoteFont Property
Applies To: Chart object
LegendFont Si ze Pr oper t y
Returns or sets the font size for the legend font.
Example: object.LegendFontSize = 12
See Also: LegendFont Property, TitleFontSize Property, FootnoteFontSize Property
Applies To: Chart object
LoadTempl at e Met hod
Loads a chart template file.
Remarks: Templates store formatting options for charts, e.g., line color and markers.
Example: object.LoadTemplate studytemplate.gtp
See Also: SaveTemplate Method
Applies To: Chart object
MoveFi rst Met hod
This method moves to the first chart on the active tab.
Remarks: This method only applies to charts with sort keys.
Example: object.MoveFirst
See Also: MoveNext Method, MovePrevious Method, MoveLast Method, Sheet
Method, SortLevel Method
Applies To: Chart object
MoveLast Met hod
This method moves to the last chart on the active tab.
Remarks: This method only applies to charts with sort keys.
Example: object.MoveLast
See Also: MoveFirst Method, MoveNext Method, MovePrevious Method, Sheet
Method, SortLevel Method
Parameter Type (Default) Description
sFile String (Optional) The name of the template file.
WinNonlin
Users Guide
730
G
Applies To: Chart object
MoveNext Met hod
This method moves to the next chart on the active tab.
Remarks: This method only applies to charts with sort keys.
Example: object.MoveNext
See Also: MoveFirst Method, MovePrevious Method, MoveLast Method, Sheet
Method, SortLevel Method
Applies To: Chart object
MovePr evi ous Met hod
This method moves to the previous chart on the active tab.
Remarks: This method only applies to charts with sort keys.
Example: object.MovePrevious
See Also: MoveFirst Method, MoveNext Method, MoveLast Method, Sheet Method,
SortLevel Method
Applies To: Chart object
Name Pr oper t y
Returns or sets the name of the object.
Remarks: This value is used in various modules of the application where filename
may not be sufficient.
Example: object.Name = MyChart
Applies To: Chart object, Workbook object, TextEditor object
Pr i nt Al l Met hod
This method prints all the charts for the object.
Example: object.PrintAll
See Also: PrintOut Method, PrintMulti Property, PrintMultiAcross Property, PrinMul-
tiDown Property
Applies To: Chart object
Pr i nt Mul t i Pr oper t y
Returns or sets the PrintMulti property.
Remarks: When set to WnlYes, the PrintAll method will print multiple charts per
page.
Example: object.PrintMulti = WnlYes
Visual Basic Automation Reference
Chart module
731
G
See Also: PrintAll Method, PrintMultiAcross Property, PrinMultiDown Property
Applies To: Chart object
Pr i nt Mul t i Acr oss Pr oper t y
Returns or sets the number of charts to print across the page.
Example: object.PrintMultiAcross = 2
See Also: PrintAll Method, PrintMulti Property, PrinMultiDown Property
Applies To: Chart object
Pr i nt Mul t i Down Pr oper t y
Returns or sets the number of charts to print down the page.
Example: object.PrintMultiDown = 3
See Also: PrintAll Method, PrintMulti Property, PrinMultiAcross Property
Applies To: Chart object
Pr i nt Out Met hod
This method prints the active chart for the object.
Example: object.PrintOut
See Also: PrintAll Method
Applies To: Chart object, Workbook object, TextEditor object
ReadOnl y Pr opert y
Returns or sets the read-only status the object.
Example: object.ReadOnly = True
Applies To: Chart object, Workbook object, TextEditor object
Save Met hod
Saves the object to file.
Example: object.Save
Applies To: Chart object, Workbook object, TextEditor object
SaveAl l Char t s Met hod
Saves all the charts for the object.
Remarks: This method uses the SaveAllPrefix property when saving the files and
appends a number to the prefix.
Example: object.SaveAllCharts
WinNonlin
Users Guide
732
G
See Also: SaveAllPrefix Property
Applies To: Chart object
SaveAl l Pr ef i x Pr oper t y
The is the text that will prefix all the file names when a call to the SaveAllCharts
method is made.
Remarks: A series of numbers will be used after the prefix to identify different files.
Example: object.SaveAllPrefix = NCA_OUT
See Also: SaveAllCharts Method
Applies To: Chart object
SaveTempl at e Met hod
Saves a chart template file.
Remarks: Templates store formatting options for charts, such as line color and mark-
ers.
Example: object.SaveTemplate settings.gtp
See Also: LoadTemplate Method
Applies To: Chart object
Sheet Met hod
Changes the active sheet (or tab) based on the sheet name.
Remarks: If the sheet name is not found, then the active sheet is not changed.
Example: object.Sheet Observed vs. Predicted
See Also: MoveFirst Method, MoveNext Method, MovePrevious Method, MoveLast
Method, SortLevel Method
Applies To: Chart object, Workbook object
Sor t Level Met hod
Moves to the chart of the specified profile.
Remarks: This method only applies to charts with sort keys.
Example: object.SortLevel SubjectA
Parameter Type (Default) Description
sFile String (Optional) Name of the template file.
Parameter Type (Default) Description
sSheetName String (Optional) The name of the sheet (or tab) to activate.
Parameter Type (Default) Description
sKey String (Optional) The name of the sort profile to find.
Visual Basic Automation Reference
Chart module
733
G
See Also: MoveFirst Method, MoveNext Method, MovePrevious Method, MoveLast
Method, Sheet Method
Applies To: Chart object
Sour ce Pr oper t y
Read-only property that returns the source object.
Applies To: Chart object
Tag Pr oper t y
Returns or sets a tag value for an object.
Remarks: can be used to give an object a unique identifying value.
Example: object.Tag = Input chart
Applies To: Chart object, Workbook object, TextEditor object
Ti t l eFont Propert y
Returns or sets the font for the chart title.
Example: object.TitleFont = Arial
See Also: TitleFontSize Property, FootnoteFont Property, LegendFont Property
Applies To: Chart object
Ti t l eFont Si ze Pr oper t y
Returns or sets the font size for the chart title.
Example: object.TitleFontSize = 14
See Also: TitleFont Property, FootnoteFontSize Property, LegendFontSize Property
Applies To: Chart object
Uni f or m Pr oper t y
Returns or sets the uniform axis scaling of the object.
Remarks: When set to WnlYes, the axis for each chart will have the same scale. This
property only applies to chart with sort keys.
Example: object.Uniform(nAxisIdX) = WnlYes
Applies To: Chart object
UUI D Pr opert y
Read-only property to get the UUID for the object.
Parameter Type (Default) Description
nAxisID VtChAxisId (Optional) The axis to modify.
WinNonlin
Users Guide
734
G
Remarks: This property is persistent when the object is saved in the proprietary for-
mat.
Example: sUUID = object.UUID
See Also: ID Property
Applies To: Chart object, Workbook object, TextEditor object
Wi ndowSt at e Pr oper t y
Returns or sets the window state of the object.
Example: object.WindowState = WindowStateConstantsMinimized
Applies To: Chart object, Workbook object, TextEditor object
Charts module
Count Property
Returns a count of items in the collection.
Returns: Returns the number of items in the collection.
Applies To: Charts object, Workbooks object, TextEditors object, Variables object
Item Property
Returns a specific member of the collection object either by position or by key.
Returns: Returns a Chart object.
Applies To: Charts object, Workbooks object, TextEditors object, Variables object
Crossover module
Instancing: MultiUse
InBook Property
Returns or sets a reference to the input workbook.
Example: Set object.InBook = MyBook
See Also: OutBook Property
Parameter Type Description
Index Variant An expression that specifies the position of a member of the col-
lection. If a numeric expression, index must be a number from 1
to the value of the collections Count property. If a string expres-
sion, index must correspond to the key argument specified when
the member referred to was added to the collection.
Visual Basic Automation Reference
Crossover module
735
G
Applies To: Crossover object, Deconvolution object, DescStats object, LinMix object,
Plot object, Semicomartmental object, Superposition object, Table object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook Property
Applies To: Crossover object, Deconvolution object, DescStats object, LinMix object,
Merge object, Pk object, Plot object, Semicomartmental object, Superposition object,
Table object
ResponseVar Property
Returns or sets the response variable.
Remarks: This variable should only be set when TreatmentData = TreatDataStacked
Example: object.ResponseVar.Name = Response
See Also: SequenceVar Property
Applies To: Crossover object
Run Method
The Run method runs the crossover analysis based on the current settings.
Example: object.Run
Applies To: Crossover object
SequenceVar Property
Returns or sets the sequence variable.
Example: object.SequenceVar.Name = Seq
See Also: ResponseVar Property
Applies To: Crossover object
SortVars Property
Returns or sets the sort variables.
Example: object.SortVars.AddEx Sort1, , Subject, ,
Sort, 1
See Also: TimeVar Property, ConcVar Property
Applies To: Crossover object, Deconvolution object, DescStats object, Plot object,
Semicompartmental object, Superposition object
WinNonlin
Users Guide
736
G
SubjectVar Property
Returns or sets the subject variable.
Example: object.SubjectVar.Name = Subject
Applies To: Crossover object
TreatmentAVar Property
Returns or sets the treatment A variable.
Remarks: This variable should only be set when TreatmentData = TreatDataSeparate
Example: object.TreatmentAVar.Name = TreatA
See Also: TreatmentBVar Property
Applies To: Crossover object
TreatmentBVar Property
Returns or sets the treatment B variable.
Remarks: This variable should only be set when TreatmentData = TreatDataSeparate
Example: object.TreatmentBVar.Name = TreatB
See Also: TreatmentAVar Property
Applies To: Crossover object
TreatmentData Property
Returns or sets if input data is stacked or in separate columns
Example: object.TreatmentData = TreatDataSeparate
Applies To: Crossover object
TreatmentVar Property
Returns or sets the treatment variable.
Remarks: This variable should only be set when TreatmentData = TreatDataStacked
Example: object.TreatmentVar.Name = TreatA
See Also: TreatmentVar Property
Applies To: Crossover object
Deconvolution module
Instancing: MultiUse
Visual Basic Automation Reference
Deconvolution module
737
G
Al phaTer m Pr oper t y
Returns or sets the Alpha value.
Remarks: The Index must be between 1 and the value of NumTerms.
Example: object.AlphaTerm(1) = 1.5
See Also: NumTerms Property, ATerm Property
Applies To: Deconvolution object
ATer m Pr oper t y
Returns or sets the A value.
Remarks: The Index must be between 1 and the value of NumTerms.
Example: object.ATerm(1) = 1.5
See Also: NumTerms Property, AlphaTerm Property
Applies To: Deconvolution object
Bol us Pr oper t y
Returns or sets whether the program will constrain the derivative of the estimated
input rate to be zero at the initial time.
Example: object.Bolus = WnlNo
Applies To: Deconvolution object
ConcVar Pr oper t y
Returns or sets the concentration variable.
Example: object.ConcVar.Name = Conc
See Also: SortVars Property, TimeVar Property
Applies To: Deconvolution object
Del t a Pr oper t y
Returns or sets the smoothing parameter.
Remarks: This value is only used when Smoothing is set to SmoothingUser.
Example: object.Smoothing = 5
See Also: Smoothing Property
Applies To: Deconvolution object
Parameter Type (Default) Description
Index Integer The Alpha value to set.
Parameter Type (Default) Description
Index Integer The A value to set.
WinNonlin
Users Guide
738
G
DoseUni t s Pr oper t y
Returns or sets the dose units.
Example: object.DoseUnits = mg
Applies To: Deconvolution object
InBook Property
Returns or sets a reference to the input workbook.
Example: Set object.InBook = MyBook
See Also: OutBook Property, OutChart Property
Applies To: Deconvolution object, Crossover object, DescStats object, LinMix object,
Plot object, Semicomartmental object, Superposition object, Table object
I nput Lag Pr oper t y
Returns or sets whether the program will constrain the estimated input rate to be zero
at the initial time.
Example: object.InputLag = WnlYes
Applies To: Deconvolution object
NumPoi nt s Pr oper t y
Returns or sets the number of output data points.
Remarks: The default value is 101. The maximum value is 1001.
Example: object.NumPoints = 500
Applies To: Deconvolution object
NumTer ms Pr oper t y
Returns or sets the number of exponential terms in the unit impulse response.
Remarks: The number of terms must be between 1 and 9.
Example: object.NumTerms = 3
See Also: ATerm Property, AlphaTerm Property
Applies To: Deconvolution object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook Property, OutChart Property
Visual Basic Automation Reference
Deconvolution module
739
G
Applies To: Deconvolution object, Crossover object, DescStats object, LinMix object,
Merge object, Pk object, Plot object, Semicomartmental object, Superposition object,
Table object
Out Char t Pr oper t y
Read-only property with a reference to the output chart.
Remarks: the value of this property is Nothing until the engine is run.
Example: Set MyOutChart = object.OutChart
See Also: InBook Property, OutBook Property
Applies To: Deconvolution object, Pk object, Plot object, Semicompartmental object,
Superposition object
Out put Fr om Pr opert y
Returns or sets the start time for output.
Remarks: This property is only used when OutputRange is set to OutRangeUser.
Example: object.OutputFrom = 6
See Also: OutputRange Property, OutputTo Property
Applies To: Deconvolution object
Out put Range Pr oper t y
Returns or sets the range of output values.
Remarks: If set to OutRangeZeroToLast then the range of output is from zero to the
last time point from the input data set. If set to OutRangeUser, then the range must be
defined by the OutputFrom and OutputTo properties.
Example: object.OutputRange = OutRangeZeroToLast
See Also: OutputFrom Property, OutputTo Property
Applies To: Deconvolution object
Out put To Pr oper t y
Returns or sets the end time for output.
Remarks: This property is only used when OutputRange is set to OutRangeUser.
Example: object.OutputTo = 24
See Also: OutputRange Property, OutputFrom Property
Applies To: Deconvolution object
Run Method
The Run method runs the deconvolution engine based on the current settings.
WinNonlin
Users Guide
740
G
Remarks: The InBook, TimeVar and ConcVar properties must be set before the Run
method is called. The Run method sets the OutBook and OutChart properties.
Example: object.Run
Applies To: Deconvolution object
Smoot hi ng Propert y
Returns or sets the type of smoothing to use.
Remarks: If set SmoothingNone the input function is just the piecewise linear precur-
sor function. If set to SmoothingUser the user can set the value of the dispersion
parameter. If set to SmoothingAutomatic the program finds the optimal value for the
dispersion parameter gamma.
Example: object.Smoothing = SmoothingAutomatic
See Also: Delta Property
Applies To: Deconvolution object
SortVars Property
Returns or sets the sort variables.
Example: object.SortVars.AddEx Sort1, , Subject, ,
Sort, 1
See Also: TimeVar Property, ConcVar Property
Applies To: Deconvolution object, Crossover object, DescStats object, Plot object,
Semicompartmental object, Superposition object
Ti meVar Pr oper t y
Returns or sets the time variable.
Example: object.TimeVar.Name = Time
See Also: SortVars Property, ConcVar Property
Applies To: Deconvolution object
DescStats module
Instancing: MultiUse
BoxWhiskerPlot Property
Returns or sets if a box and whiskers plot is generated with the output.
Remarks: The box and whiskers plot is generated in a separate text window.
Example: object.BoxWhiskerPlot = True
Applies To: DescStats object
Visual Basic Automation Reference
DescStats module
741
G
Confidence Property
Returns or sets if a confidence interval is calculated.
Example: object.confidence = WnlYes
Applies To: DescStats object
ConfidenceValue Property
Returns or sets the confidence value.
Remarks: This property is only used if the value of Confidence is True.
Example: object.ConfidenceValue = 90
Applies To: DescStats object
InBook Property
Returns or set a reference to the input workbook.
Example: Set object.InBook = MyBook
See Also: OutBook Property, OutText Property
Applies To: DescStats object, Crossover object, Deconvolution object, LinMix object,
Plot object, Semicomartmental object, Superposition object, Table object
MultiSheet Property
Returns or sets if summary statistics for each variable are on one output worksheet or
a separate worksheet for each summary variable.
Remarks: If set to True, the output will be on multiple sheets. If all are shown on one
worksheet, any units associated with the variables will be dropped. If the summary
statistics are shown on separate worksheets, the units can be displayed.
Example: object.MultiSheet = True
Applies To: DescStats object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook Property, OutText Property
Applies To: DescStats object, Crossover object, Deconvolution object, LinMix object,
Merge object, Pk object, Plot object, Semicomartmental object, Superposition object,
Table object
WinNonlin
Users Guide
742
G
OutText Property
Read-only property with a reference to the output text editor.
Remarks: The value of this property is Nothing until the engine is run. This text win-
dow contains the box and whiskers plot if BoxWhiskerPlot is True.
Example: Set MyOutText = object.OutText
See Also: InBook Property, OutBook Property
Applies To: DescStats object, Crossover object, Deconvolution object, LinMix object,
Merge object, Pk object, Plot object, Semicomartmental object, Superposition object,
Table object
Percentiles Property
Returns or sets if percentiles are included in the output.
Example: object.Percentiles = WnlYes
Applies To: DescStats object
Run Method
The Run method runs the descriptive statistics engine based on the current settings.
Remarks: The InBook and SummaryVars properties must be set before the Run
method is called. The Run method sets the OutBook and optionally the OutText prop-
erties.
Example: object.Run
Applies To: DescStats object, Crossover object, Deconvolution object, LinMix object,
Merge object, Pk object, Plot object, Semicompartmental object, Superposition object
SortVars Property
Returns or sets the sort variables.
Example: object.SortVars.AddEx Sort1, , Subject, ,
Sort, 1
See Also: SummaryVars Property, WeightVar Property
Applies To: DescStats object, Crossover object, Deconvolution object, Plot object,
Semicompartmental object, Superposition object
SummaryVars Property
Returns or sets the summary variables.
Example: object.SummaryVars.AddEx Summary1, , Conc, ,
Summary, 1
See Also: SortVars Property, WeightVar Property
Visual Basic Automation Reference
LinMix module
743
G
Applies To: DescStats object, Crossover object, Deconvolution object, Plot object,
Semicompartmental object, Superposition object
WeightVar Property
Returns or sets the weight variable.
Example: object.WeightVar.Name = Weight
See Also: SortVars Property, SummaryVars Property
Applies To: DescStats object
LinMix module
Instancing: GlobalMultiUse
Filename Property
Returns or sets the name of the LinMix command file.
Remarks: The file must be a valid LML or ANV file.
Example: object.filename = c:\data\project.lml
Applies To: LinMix object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook Property, OutText Property
Applies To: LinMix object, Crossover object, Deconvolution object, DescStats object,
Merge object, Pk object, Plot object, Semicomartmental object, Superposition object,
Table object
OutText Property
Read-only property with a reference to the output text editor.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutText = object.OutText
See Also: InBook Property, OutBook Property
Applies To: LinMix object, Crossover object, Deconvolution object, DescStats object,
Merge object, Pk object, Plot object, Semicomartmental object, Superposition object,
Table object
WinNonlin
Users Guide
744
G
Run Method
The Run method runs the LinMix engine based on the current settings.
Remarks: The InBook and Filename properties must be set before the Run method is
called. The Run method sets the OutBook and optionaly the OutText properties.
Example: object.Run
Applies To: LinMix object, Crossover object, Deconvolution object, DescStats object,
Merge object, Pk object, Plot object, Semicompartmental object, Superposition object
Merge module
Instancing: MultiUse
CarryAlong Property
Returns or sets if data is carried along for like sort keys.
Remarks: When set to WnlYes, and one data set has more observations for a given
level of the Sort Variable(s), the last value for that level of the Sort Variables in the
other data set will be carried down to all observations for that level of the Sort vari-
ables in the new data set.
Example: object.CarryAlong = WnlYes
Applies To: Merge object
InBook1 Property
Returns or sets a reference to one of the input workbooks.
Example: Set object.InBook1 = MyBook1
See Also: InBook2 Property, OutBook Property
Applies To: Merge object
InBook2 Property
Returns or sets a reference to one of the input workbooks.
Example: Set object.InBook2 = MyBook2
See Also: InBook1 Property, OutBook Property
Applies To: Merge object
IncludeVars1 Property
Returns or sets the include variables for input workbook 1.
Example: object.IncludeVars1.AddEx Include1, , Conc, ,
IncludeVar, 1
See Also: SortVars1 Property, SortVars2 Property, IncludeVars2 Property
Visual Basic Automation Reference
Merge module
745
G
Applies To: Merge object
IncludeVars2 Property
Returns or sets the include variables for input workbook 2.
Example: object.IncludeVars2.AddEx Include1, , Conc, ,
IncludeVar, 1
See Also: SortVars1 Property, SortVars2 Property, IncludeVars1 Property
Applies To: Merge object
Missing Property
Returns or sets the missing value used in the output workbook.
Example: object.Missing = .
Applies To: Merge object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook1 Property, InBook2 Property
Applies To: Merge object, Crossover object, Deconvolution object, DescStats Prop-
erty, LinMix object, Pk object, Plot object, Semicomartmental object, Superposition
object, Table object
Run Method
The Run method performs the merge based on the current settings.
Remarks: The Run method sets the OutBook property.
Example: object.Run
Applies To: Merge object, Crossover object, Deconvolution object, DesStats object,
LinMix object, Pk object, Plot object, Semicompartmental object, Superposition
object
SortVars1 Property
Returns or sets the sort variables for input workbook 1.
Example: object.SortVars1.AddEx Sort1, , Subject, ,
Sort, 1
See Also: SortVars2 Property, IncludeVars1 Property, IncludeVars2 Property
Applies To: Merge object
WinNonlin
Users Guide
746
G
SortVars2 Property
Returns or sets the sort variables for input workbook 2.
Example: object.SortVars2.AddEx Sort1, , Subject, ,
Sort, 1
See Also: SortVars1 Property, IncludeVars1 Property, IncludeVars2 Property
Applies To: Merge object
Model module
Instancing: MultiUse
Changed Property
Returns or sets the changed status of the object.
Remarks: When the value is True, a file save warning will be shown when the object
is closed.
Example: object.Changed = False
Applies To: Model object, Workbook object, Chart object, TextEditor object
ID Property
Read-only property that returns the ID of the object.
Remarks: The ID property is only valid during a WinNonlin session. It is not persis-
tent.
Example: sID = object.ID
See Also: UUID Property
Applies To: Model object, Workbook object, Chart object, TextEditor object
LoadDoseFile Method
Loads an ASCII data file containing model dosing information.
Example: object.LoadDoseFile c:\data\dosefile.dat
See Also: LoadLambdazFile method, LoadLinkFile method, LoadNamesFile method,
LoadParamFile method, LoadPartialAreasFile method, LoadUnitsFile method
Applies To: Model object
Parameter Type (Default) Description
sFile String The name of the file to load.
Visual Basic Automation Reference
Model module
747
G
LoadLambdazFile Method
Loads an ASCII data file containing Lambda_z information for NCA models.
Example: object.LoadLambdazFile c:\data\lzfile.dat
See Also: LoadDoseFile method, LoadLinkFile method, LoadNamesFile method,
LoadParamFile method, LoadPartialAreasFile method, LoadUnitsFile method
Applies To: Model object
LoadLinkFile Method
Loads an ASCII data file containing model parameters information for PK/PD and
IPR models.
Example: object.LoadLinkFile c:\data\linkfile.dat
See Also: LoadDoseFile method, LoadLambdazFile method LoadNamesFile method,
LoadParamFile method, LoadPartialAreasFile method, LoadUnitsFile method
Applies To: Model object
LoadNamesFile Method
Loads an ASCII data file containing the preferred parameter names for NCA models.
Example: object.LoadNamesFile c:\data\namefile.dat
See Also: LoadDoseFile method, LoadLambdazFile method, LoadLinkFile method,
LoadParamFile method, LoadPartialAreasFile method, LoadUnitsFile method
Applies To: Model object
LoadParamFile Method
Loads an ASCII data file containing the model parameter and boundaries informa-
tion.
Example: object.LoadParamFile c:\data\parmfile.dat
See Also: LoadDoseFile method, LoadLambdazFile method, LoadLinkFile method,
LoadNamesFile method, LoadPartialAreasFile method, LoadUnitsFile method
Applies To: Model object
Parameter Type (Default) Description
sFile String The name of the file to load.
Parameter Type (Default) Description
sFile String The name of the file to load.
Parameter Type (Default) Description
sFile String The name of the file to load.
Parameter Type (Default) Description
sFile String The name of the file to load.
WinNonlin
Users Guide
748
G
LoadPartialAreasFile Method
Loads an ASCII data file containing specification of time ranges for the computation
of partial areas.
Example: object.LoadPartialsAreasFile c:\data\part-
file.dat
See Also: LoadDoseFile method, LoadLambdazFile method, LoadLinkFile method,
LoadNamesFile method, LoadParamFile method, LoadUnitsFile method
Applies To: Model object
LoadUnitsFile Method
Loads an ASCII data file containing the units information.
Example: object.LoadUnitsFile c:\data\unitfile.dat
See Also: LoadDoseFile method, LoadLambdazFile method, LoadLinkFile method,
LoadNamesFile method, LoadParamFile method, LoadPartialAreasFile method
Applies To: Model object
ModelWindow Property
Read-only property that returns a reference to the text editor containing the model
representation.
Example: Set ModelTextEditor = object.ModelWindow
Applies To: Model object
ModelWorkbook Property
Read-only property that returns a reference to the source workbook for the model.
Example: Set SourceBook = object.ModelWorkbook
Applies To: Model object
Name Property
Returns or sets the name of the object.
Remarks: This value is used in various modules of the application where filename
may not be sufficient.
Example: object.Name = MyModel
Applies To: Model object, Workbook object, Chart object, TextEditor object
Parameter Type (Default) Description
sFile String The name of the file to load.
Parameter Type (Default) Description
sFile String The name of the file to load.
Visual Basic Automation Reference
PK module
749
G
Source Property
Read-only property that returns the source object.
Applies To: Model object
Tag Property
Returns or sets a tag value for an object.
Remarks: This property can be used to give an object a unique identifying value.
Example: object.Tag = Model 13"
Applies To: Model object, Workbook object, Chart object, TextEditor object
UUID Property
Read-only property to get the UUID for the object.
Remarks: This property is persistent when the object is saved in the proprietary for-
mat.
Example: sUUID = object.UUID
See Also: ID Property
Applies To: Model object, Workbook object, Chart object, TextEditor object
PK module
Instancing: MultiUse
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: OutChart Property, OutText Property
Applies To: Pk object, Crossover object, Deconvolution object, DescStats object, Lin-
Mix object, Merge object, Plot object, Semicomartmental object, Superposition
object, Table object
OutChart Property
Read-only property with a reference to the output chart.
Remarks: the value of this property is Nothing until the engine is run.
Example: Set MyOutChart = object.OutChart
See Also: OutBook Property, OutText Property
WinNonlin
Users Guide
750
G
Applies To: Pk object, Deconvolution object, Plot object, Semicompartmental object,
Superposition object
OutText Property
Read-only property with a reference to the output text editor.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutText = object.OutText
See Also: OutBook Property, OutChart Property
Applies To: Pk object, Crossover object, Deconvolution object, DescStats object, Lin-
Mix object, Merge object, Plot object, Semicomartmental object, Superposition
object, Table object
Run Method
The Run method executes the appropriate modeling engine based on the active
model.
Remarks: A valid model must be loaded before this method can be called success-
fully. The Run method sets the OutBook and optionaly the OutText properties.
Example: object.Run
See Also: RunWordExport Method
Applies To: Pk object, Crossover object, Deconvolution object, DescStats object, Lin-
Mix object, Merge object, Plot object, Semicompartmental object, Superposition
object
RunWordExport Method
The RunWordExport method executes the appropriate modeling engine based on the
active model and exports the output into a Word document.
Remarks: A valid model must be loaded before this method can be called success-
fully. The Run method sets the OutBook and optionaly the OutText properties. Word
must be properly installed to execute this method.
Example: object.Run
See Also: WordExportFilename Property, Run Method
Applies To: Pk object
WordExportFilename Property
Returns or sets the file name used to save the Word document after the RunWordEx-
port method is called.
Remarks: If this property is not set, then the Word document is not saved after the
RunWordExport method.
Visual Basic Automation Reference
Plot module
751
G
Example: object.WordExportFilename =
c:\data\model3_out.doc
See Also: RunWordExport Method
Applies To: Pk object
Plot module
Instancing: MultiUse
AutoSort Property
Returns or sets the value for auto sorting.
Remarks: When set to WnlYes, the plot engine will automatically sort on the x vari-
able column before creating the chart.
Example: object.AutoSort = WnlYes
Applies To: Plot object
ChartType Property
Returns or sets the chart type.
Example: object.ChartType = ChartTypeScatter
Applies To: Plot object
DownVar Property
Returns or sets the variable for Down error data.
Remarks: The index will range from 1 to the number of data sets used.
Example: object.DownVar.Name = DownErr
See Also: UpVar Property
Applies To: Plot object
ErrType Property
Returns or sets the value for how to handle error data.
Remarks: If set to ErrTypeRelative, the error data is calculated as an offset to the y
data value. If set to absolute, the error data is plotted as its value.
Example: object.ErrType = ErrTypeRelative
Applies To: Plot object
Parameter Type (Default) Description
Index Integer The index to the data set for setting Down error variable.
WinNonlin
Users Guide
752
G
GroupVars Property
Returns or sets the group variables used in the chart.
Remarks: The Index will range from 1 to the number of data sets used.
Example: object.GroupVars(1).AddEx Form, , Form, ,
Group, 1
See Also: SortVars Property, XVars Property, YVars Property
Applies To: Plot object
InBook Property
Returns or sets an input workbook.
Remarks: Index must be between 1 and NumBook.
Example: object.InBook(1) = clsInBook
Applies To: Plot object
Intervals Property
Returns or sets the number of intervals used in a histogram chart.
Remarks: If set to 0, then the plot engine will set the number of intervals to the square
root of the number of data points.
Example: object.Intervals = 10
Applies To: Plot object
Legend Property
Returns or set the values used in the chart legend.
Remarks: This is only available when using multiple data sets or overlay plots.
Example: object.Legend(1) = Data Set 1
Applies To: Plot object
NumBook Property
Returns or sets the number of workbooks used to create the chart.
Remarks: The value for NumBook must be between 1 and 99.
Parameter Type (Default) Description
Index Integer The index to the data set for setting group variables.
Parameter Type (Default) Description
Index Integer The index to the workbook to set.
Parameter Type (Default) Description
Index Integer Index to the legend value to set.
Visual Basic Automation Reference
Plot module
753
G
Example: object.NumBook = 1
Applies To: Plot object
OutChart Property
Read-only property returns a reference to the output workbook.
Remarks: The value of this property is Nothing until the Run method has been called.
Example: Set clsChart = object.OutChart
Applies To: Plot object
Run Method
The Run method creates the new chart based on the current settings in the Plot engine.
Example: object.Run
Applies To: Plot object
ShowUnits Property
Returns or sets the value for showing units.
Remarks: If set to WnlYes, the units (if any) will appear on the chart when created.
Example: object.ShowUnits = WnlYes
See Also: XUnits Property, YUnits Property
Applies To: Plot object
SortVars Property
Returns or sets the sort variables used in the chart.
Remarks: The Index will range from 1 to the number of data sets used.
Example: object.SortVars(1).AddEx Subject, , Subject, ,
Sort, 1
See Also: GroupVars Property, XVars Property, YVars Property
Applies To: Plot object
Title Property
Returns or sets the chart title.
Example: object.Title = my Chart Title
See Also: XTitle Property, YTitle Property
Applies To: Plot object
Parameter Type (Default) Description
Index Integer The index to the data set for setting sort variables.
WinNonlin
Users Guide
754
G
UpVar Property
Returns or sets the variable for up error data.
Remarks: The index will range from 1 to the number of data sets used.
Example: object.UpVar.Name = UpErr
See Also: DownVar Property
Applies To: Plot object
UseGroupHeaders Property
Returns or sets whether to use group headers in the legend.
Remarks: When set to WnlYes, column headers will be used to help identify lines in
the chart. Setting this to WnlNo can help save chart space.
Example: object.UseGroupHeaders = WnlNo
Applies To: Plot object
UsePatterns Property
Returns or sets the value for whether to use patterns.
Remarks: This property only applies to bar charts and histograms. If set the WnlYes,
then patterns will be used to fill in the bars on the chart.
Example: object.UsePatters = WnlYes
Applies To: Plot object
XTitle Property
Returns or sets the x-axis title.
Example: object.XTitle = Time
See Also: Title Property, YTitle Property
Applies To: Plot object
XUnits Property
Returns or sets the value for the x-axis units.
Example: object.XUnits = hr
See Also: ShowUnits Property, YUnits Property
Applies To: Plot object
Parameter Type (Default) Description
Index Integer The index to the data set for setting up error variable.
Visual Basic Automation Reference
PrintExportAll module
755
G
XVars Property
Returns or sets the x variables used in the chart.
Remarks: The index will range from 1 to the number of data sets used.
Example: object.XVars(1).AddEx Time, , Time, , X
See Also: SortVars Property, GroupVars Property, YVars Property
Applies To: Plot object
YTitle Property
Returns or sets the y-axis title.
Example: object.YTitle = Concentration
See Also: Title Property, XTitle Property
Applies To: Plot object
YUnits Property
Returns or sets the value for the y-axis units.
Example: object.YUnits = mg
See Also: ShowUnits Property, XUnits Property
Applies To: Plot object
YVars Property
Returns or sets the y variables used in the chart.
Remarks: The index will range from 1 to the number of data sets used.
Example: object.YVars(1).AddEx Time, , Time, , Y
See Also: SortVars Property, GroupVars Property, XVars Property
Applies To: Plot object
PrintExportAll module
Instancing: MultiUse
ChartFormat Property
Returns or sets the format of charts when exported.
Parameter Type (Default) Description
Index Integer The index to the data set for setting x variables.
Parameter Type (Default) Description
Index Integer The index to the data set for setting y variables.
WinNonlin
Users Guide
756
G
Remarks: When set to ChartFormatMetafile (Default), charts are output in metafile
format. When set to ChartFormatBitmap, charts are output in bitmap format. This
option only applies to export.
Example: object.ChartFormat = ChartFormatBitmap
Applies To: PrintExportAll object
ExportAll Method
Exports all objects.
Remarks: Use IncludeWorkbooks, IncludeCharts, IncludeTextEditors and Include-
Models to select which objects to Export.
Example: object.ExportAll
See Also: PrintAll
Applies To: PrintExportAll object
FigureNum Property
Sets or returns if charts are numbered in the output.
Remarks: This option only applies to export.
Example: object.FigureNum = WnlYes
See Also: FigureNumStart Property
Applies To: PrintExportAll object
FigureNumStart Property
Returns or sets the starting figure number.
Remarks: This option only applies to export.
Example: object.FigureNumStart = 5
See Also: FigureNum Property
Applies To: PrintExportAll object
IncludeCharts Property
Returns or sets if Charts are included in print or export.
Example: object.IncludeCharts = WnlYes
See Also: IncludeWorkbooks Property, IncludeTextEditors Property, IncludeModels
Property
Applies To: PrintExportAll object
IncludeModels Property
Returns or sets if Models are included in print or export.
Visual Basic Automation Reference
PrintExportAll module
757
G
Example: object.IncludeModels = WnlYes
See Also: IncludeWorkbooks Property, IncludeCharts Property, IncludeTextEditors
Property
Applies To: PrintExportAll object
IncludeTextEditors Property
Returns or sets if TextEditors are included in print or export.
Example: object.IncludeTextEditors = WnlYes
See Also: IncludeWorkbooks Property, IncludeCharts Property, IncludeModels Prop-
erty
Applies To: PrintExportAll object
IncludeWorkbooks Property
Returns or sets if workbooks are included in print or export.
Example: object.IncludeWorkbooks = WnlYes
See Also: IncludeCharts Property, IncludeTextEditors Property, IncludeModels Prop-
erty
Applies To: PrintExportAll object
LockOutput Property
Returns or sets if the output is locked after export.
Remarks: This option only applies to export.
Example: object.LockOutput = WnlYes
Applies To: PrintExportAll object
LogCharts Property
Returns or sets if log charts are output.
Remarks: If set to WnlYes, then chart with a log y-axis is output for every chart in
addition to the chart in linear scale.
Example: object.LogCharts = WnlYes
Applies To: PrintExportAll object
MultipleChartsPerPage Property
Returns or sets if multiple charts per page are output.
Remarks: Use MultipleChartsPerPageDown and MultipleChartsPerPageAcross to set
the number of charts output per page.
WinNonlin
Users Guide
758
G
Example: object.MultipleChartsPerPage = WnlYes :
object.MultipleChartsPerPageDown = 3 : object.Multiple-
ChartsPerPageAcross = 2
See Also: MultipleChartsPerPageDown Property, MultipleChartsPerPageAcross
Property
Applies To: PrintExportAll object
MultipleChartsPerPageAcross Property
Returns or set the number of columns of charts per page to output.
Remarks: The minimum value is 1 and the maximum value is 8.
Example: object.MultipleChartsPerPage = WnlYes :
object.MultipleChartsPerPageDown = 3 : object.Multiple-
ChartsPerPageAcross = 2
See Also: MultipleChartsPerPage Property, MultipleChartsPerPageDown Property
Applies To: PrintExportAll object
MultipleChartsPerPageDown Property
Returns or set the number of rows of charts per page to output.
Remarks: The minimum value is 1 and the maximum value is 8.
Example: object.MultipleChartsPerPage = WnlYes :
object.MultipleChartsPerPageDown = 3 : object.Multiple-
ChartsPerPageAcross = 2
See Also: MultipleChartsPerPage Property, MultipleChartsPerPageAcross Property
Applies To: PrintExportAll object
Orientation Property
Returns or sets the page orientation.
Example: object.Orientation = OrientationPortrait
Applies To: PrintExportAll object
PreserveTableFormats Property
Returns or sets if formatting is preserved for tables.
Remarks: When set to WnlYes, formatting is preserved for workbooks that are the
output of the table generator. This significantly slows down the export. This option
only applies to export.
Example: object.PreserveTableFormats = WnlNo
Applies To: PrintExportAll object
Visual Basic Automation Reference
Rule module
759
G
PrintAll Method
Prints all objects.
Remarks: Use IncludeWorkbooks, IncludeCharts, IncludeTextEditors and Include-
Models to select which objects to print.
Example: object.PrintAll
See Also: ExportAll
Applies To: PrintExportAll object
SourceLine Property
Returns or sets if a source line is included in the export.
Remarks: This option only applies to export.
Example: object.SourceLine = WnlYes
Applies To: PrintExportAll object
TableNum Property
Sets or returns if tables are numbered in the output.
Remarks: This option only applies to export.
Example: object.TableNum = WnlYes
See Also: TableNumStart Property
Applies To: PrintExportAll object
TableNumStart Property
Returns or sets the starting table number.
Remarks: This option only applies to export.
Example: object.TableNumStart = 5
See Also: TableNum Property
Applies To: PrintExportAll object
Rule module
Instancing: MultiUse
curRuleState Property (Public Variable)
GetValue Method
No description.
Parameter Type (Default) Description
dv WnlRuleType
WinNonlin
Users Guide
760
G
Applies To: Rule object
IsUnConditional Method
Applies To: Rule object
LetValue Method
No description.
Applies To: Rule object
Name Property (Public Variable)
NonNumericCode Property (Public Variable)
Semicompartmental module
Instancing: MultiUse
ConcVar Property
Returns or sets the concentration variable.
Example: object.ConcVar.Name = "Conc"
See Also: SortVars Property, TimeVar Property, EffectVar Property
Applies To: Semicompartmental object
EffectVar Property
Returns or sets the effect variable.
Example: object.EffectVar.Name = "Effect"
See Also: SortVars Property, TimeVar Property, ConcVar Property
Applies To: Semicompartmental object
InBook Property
Returns or set a reference to the input workbook.
Example: Set object.InBook = MyBook
LLOQ Variant
Parameter Type (Default) Description
vNewValue String
dv WnlRuleType
Visual Basic Automation Reference
Semicompartmental module
761
G
See Also: OutBook Property, OutChart Property
Applies To: Semicompartmental object, Crossover object, Deconvolution object,
DescStats object, LinMix object, Plot object, Superposition object, Table object
Keo Property
Returns or sets the Keo value.
Remarks: A Keo value is required. If a given Keo value produces unwanted results,
the operation must be rerun with a different Keo value specified. In addition, the Keo
value applies to all sort keys.
Example: object.Keo = 1.5
Applies To: Semicompartmental object
Method Property
Returns or sets the computational method.
Remarks: The default is log/linear: linear to t-max and then logarithmic. The other
two options are completely linear or completely logarithmic.
Example: object.Method = ToolboxMethodLinear
Applies To: Semicompartmental object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook Property, OutChart Property
Applies To: Semicompartmental object, Crossover object, Deconvolution object,
DescStats object, LinMix object, Merge object, Pk object, Plot object, Superposition
object, Table object
OutChart Property
Read-only property with a reference to the output chart.
Remarks: the value of this property is Nothing until the engine is run.
Example: Set MyOutChart = object.OutChart
See Also: InBook Property, OutBook Property
Applies To: Semicompartmental object, Deconvolution object, Pk object, Plot object,
Superposition object
Run Method
The Run method runs the semicompartmental engine based on the current settings.
WinNonlin
Users Guide
762
G
Remarks: The InBook, TimeVar, ConcVar and Keo properties must be set before the
Run method is called. The Run method sets the OutBook and OutChart properties.
Example: object.Run
Applies To: Semicompartmental object, Crossover object, Deconvolution object,
DescSats object, LinMix object, Merge object, Pk object, Plot object, Superposition
object
SortVars Property
Returns or sets the sort variables.
Example: object.SortVars.AddEx "Sort1", , "Subject", ,
Sort, 1
See Also: TimeVar Property, ConcVar Property, EffectVar Property
Applies To: Semicompartmental object, Crossover object, Deconvolution object,
DescStats object, Plot object, Superposition object
TimeVar Property
Returns or sets the time variable.
Example: object.TimeVar.Name = "Hour"
See Also: SortVars Property, ConcVar Property, EffectVar Property
Applies To: Semicompartmental object
StatusCodes module
Instancing: MultiUse
bLLOQDefined Property (Public Variable)
CarryAlongs Property
Applies To: StatusCodes object
ConcCol Property
Applies To: StatusCodes object
InBook Property
Applies To: StatusCodes object
LLOQCol Property
Applies To: StatusCodes object
Visual Basic Automation Reference
Superposition module
763
G
OutBook Property
Applies To: StatusCodes object
RSets Property
Applies To: StatusCodes object
RuleSets Property
Applies To: StatusCodes object
RuleSetsDest Property
Applies To: StatusCodes object
Run Method
No description.
Applies To: StatusCodes object
RuSet Property
Applies To: StatusCodes object
SortKeys Property
Applies To: StatusCodes object
StatusCol Property
Applies To: StatusCodes object
TimeCol Property
Applies To: StatusCodes object
Superposition module
Instancing: MultiUse
Parameter Type (Default) Description
sMetaData String ("") (Optional)
oInBook Workbook (Nothing) (Optional)
WinNonlin
Users Guide
764
G
ConcVar Property
Returns or sets the concentration variable.
Example: object.ConcVar.Name = "Conc"
See Also: SortVars Property, TimeVar Property
Applies To: Superposition object, Deconvolution object, Semicompartmental object
DisplayDose Property
Returns or sets the display dose.
Remarks: If set to zero, then steady state will be used for the display dose.
Example: object.DisplayDose = 2
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, NumDoses Property, DoseTime Property, Dose Property, TimeRepeat Prop-
erty, RangeStart Property, RangeStop Property
Applies To: Superposition object
Dose Property
Returns or sets a dose value.
Example: object.Dose(1) = 10
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, DisplayDose Property, NumDoses Property, DoseTime Property, TimeRe-
peat Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
DoseTime Property
Returns or sets a dosing time value.
Example: object.DoseTime(1) = 0
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, DisplayDose Property, NumDoses Property, Dose Property, TimeRepeat
Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
Parameter Type (Default) Description
Index Integer The dosing time value to return or set. The Index value
must be between 1 and the value of NumDoses.
Parameter Type (Default) Description
Index Integer The dosing time value to return or set. The Index value
must be between 1 and the value of NumDoses.
Visual Basic Automation Reference
Superposition module
765
G
DosingType Property
Returns or sets the type of dosing schedule to use.
Example: object.DosingType = DosingTypeRegular
See Also: InitialDose Property, MaintenanceDose Property, Tau Property, Display-
Dose Property, NumDoses Property, DoseTime Property, Dose Property, TimeRepeat
Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
InBook Property
Returns or set a reference to the input workbook.
Example: Set object.InBook = MyBook
See Also: OutBook Property, OutChart Property
Applies To: Superposition object, Crossover object, Deconvolution object, DescStats
object, LinMix object, Plot object, Semicompartmental object, Table object
InitialDose Property
Returns or sets the initial dose.
Remarks: The initial dose may be a loading dose or a regular dose.
Example: object.InitialDose = 15
See Also: DosingType Property, MaintenanceDose Property, Tau Property, Display-
Dose Property, NumDoses Property, DoseTime Property, Dose Property, TimeRepeat
Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
LoadDoseFile Method
Loads an ASCII data file containing dosing information.
Example: object.LoadDoseFile "c:\data\dosefile.dat"
Applies To: Superposition object
MaintenanceDose Property
Returns or sets the maintenance dose.
Example: object.MaintenanceDose = 5
See Also: DosingType Property, InitialDose Property, Tau Property, DisplayDose
Property, NumDoses Property, DoseTime Property, Dose Property, TimeRepeat Prop-
erty, RangeStart Property, RangeStop Property
Applies To: Superposition object
Parameter Type (Default) Description
sFile String The name of the file to load.
WinNonlin
Users Guide
766
G
Method Property
Returns or sets the computational method.
Remarks: The default is linear.
Example: object.Method = ToolboxMethodLinear
Applies To: Superposition object
NumDoses Property
Returns or sets the number of doses.
Example: object.NumDoses = 5
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, DisplayDose Property, DoseTime Property, Dose Property, TimeRepeat
Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
NumPoints Property
Returns or sets the number of output data points.
Remarks: The default is 100.
Example: object.NumPoints = 500
Applies To: Superposition object
OutBook Property
Read-only property with a reference to the output workbook.
Remarks: The value of this property is Nothing until the engine is run.
Example: Set MyOutBook = object.OutBook
See Also: InBook Property, OutChart Property
Applies To: Superposition object, Crossover object, Deconvolution object, DescStats
object, LinMix object, Merge object, Pk object, Plot object, Semicompartmental
object, Table object
OutChart Property
Read-only property with a reference to the output chart.
Remarks: the value of this property is Nothing until the engine is run.
Example: Set MyOutChart = object.OutChart
See Also: InBook Property, OutBook Property
Applies To: Superposition object, Deconvolution object, Pk object, Plot object, Semi-
compartmental object
Visual Basic Automation Reference
Superposition module
767
G
RangeStart Property
Returns or sets the lower time value of the output range.
Example: object.RangeStart = 12
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, DisplayDose Property, NumDoses Property, DoseTime Property, Dose
Property, TimeRepeat Property, RangeStop Property
Applies To: Superposition object
RangeStop Property
Returns or sets the upper time value of the output range.
Example: object.RangeStop = 24
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, DisplayDose Property, NumDoses Property, DoseTime Property, Dose
Property, TimeRepeat Property, RangeStart Property
Applies To: Superposition object
Run Method
The Run method runs the nonparametric superposition engine based on the current
settings.
Remarks: The Run method sets the OutBook and OutChart properties.
Example: object.Run
Applies To: Superposition object, Crossover object, Deconvolution object, DescSats
object, LinMix object, Merge object, Pk object, Plot object, Semicompartmental
object
SortVars Property
Returns or sets the sort variables.
Example: object.SortVars.AddEx "Sort1", , "Subject", ,
Sort, 1
See Also: TimeVar Property, ConcVar Property
Applies To: Superposition object, Crossover object, Deconvolution object, DescStats
object, Plot object, Semicompartmental object
Tau Property
Returns or sets the (assumed equal) dosing interval for steady-state data.
Example: object.Tau = 1.5
WinNonlin
Users Guide
768
G
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property,
DisplayDose Property, NumDoses Property, DoseTime Property, Dose Property, Tim-
eRepeat Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
TermLower Property
Returns or sets the lower value of the terminal phase.
Remarks: This property is only used when TermPhase property is WnlYes.
Example: object.TermLower = 12
See Also: TermPhase Property, TermUpper Property
Applies To: Superposition object
TermPhase Property
Returns or sets if the user defined terminal phase should be used.
Example: object.TermPhase = WnlYes
See Also: TermLower Property, TermUpper Property
Applies To: Superposition object
TermUpper Property
Returns or sets the upper value of the terminal phase.
Remarks: This property is only used when the TermPhase property is WnlYes.
Example: object.TermUpper = 24
See Also: TermPhase Property, TermLower Property
Applies To: Superposition object
TimeRepeat Property
Returns or sets the time value where dosing repeats.
Example: object.TimeRepeat = 24
See Also: DosingType Property, InitialDose Property, MaintenanceDose Property, Tau
Property, DisplayDose Property, NumDoses Property, DoseTime Property, Dose
Property, RangeStart Property, RangeStop Property
Applies To: Superposition object
TimeVar Property
Returns or sets the time variable.
Example: object.TimeVar.Name = "Hour"
See Also: SortVars Property, ConcVar Property
Visual Basic Automation Reference
Table module
769
G
Applies To: Superposition object, Semicompartmental object
Table module
Instancing: MultiUse
AggregateVar Property
Applies To: Table object
CrossVars Property
Applies To: Table object
DataOnly Property
Applies To: Table object
DefinitionFile Property
Applies To: Table object
DescStats Property
Applies To: Table object
GroupVarBreak Property
No description.
Applies To: Table object
GroupVars Property
Applies To: Table object
IDVars Property
Applies To: Table object
Parameter Type (Default) Description
Index Integer
WinNonlin
Users Guide
770
G
InBook Property
No description.
Applies To: Table object
JoinCrossVars Property
Applies To: Table object
JoinGroupVars Property
Applies To: Table object
JoinIDVars Property
Applies To: Table object
NumBook Property
Applies To: Table object
OutBook Property
Applies To: Table object
PageFooter Property
Applies To: Table object
PageHeader Property
Applies To: Table object
RegVars Property
Applies To: Table object
Run Method
Applies To: Table object
ShowUnits Property
Applies To: Table object
Parameter Type (Default) Description
Index Integer
Visual Basic Automation Reference
TextEditor module
771
G
TableNum Property
Applies To: Table object
UnitsFormat Property
Applies To: Table object
TextEditor module
Instancing: MultiUse
BottomMargin Property
Returns or sets the bottom margin for printing.
Remarks: This property is set in twips. There are 1440 twips per inch.
Example: object.BottomMargin = 1440
See Also: TopMargin Property, LeftMargin Property, RightMargin Property, PrintOut
Method
Applies To: TextEditor object
CaptionPrefix Property
Read-only property that returns the caption prefix of an object.
Remarks: The caption prefix precedes the object type in the object windows caption.
Example: sPrefix = object.CaptionPrefix
Applies To: TextEditor object, Workbook object, Chart object
Changed Property
Returns or sets the changed status of the object.
Remarks: When the value is True, a file save warning will be shown when the object
is closed.
Example: object.Changed = False
Applies To: TextEditor object, Workbook object, Chart object
EditCopy Method
Copies the text from the object to the clipboard.
Example: object.EditCopy
See Also: EditCut Method, EditPaste Method, EditDelete Method
Applies To: TextEditor object
WinNonlin
Users Guide
772
G
EditCut Method
Cuts the text from the object and places it on the clipboard.
Example: object.EditCut
See Also: EditCopy Method, EditPaste Method, EditDelete Method
Applies To: TextEditor object
EditDelete Method
Deletes the text in the current selection.
Example: object.EditDelete
See Also: EditCut Method, EditCopy Method, EditPaste Method
Applies To: TextEditor object
EditorText Property
Returns or sets the text of a text editor.
Remarks: Setting the EditorText property replaces the entire contents of a text editor
with the new string.
Example: sText = object.EditorText
See Also: EditorTextRTF Property
Applies To: TextEditor object
EditorTextLength Property
Read-only property returns the number of characters in the text editor.
Example: lLength = object.EditorTextLength
Applies To: TextEditor object
EditorTextRTF Property
Returns or sets the text of a text editor, including all .rtf code.
Remarks: Setting the EditorTextRTF property replaces the entire contents of a text
editor with the new string.
Example: sText = object.EditorTextRTF
See Also: EditorText Property
Applies To: TextEditor object
EditPaste Method
Pastes text from the clipboard into the current selection.
Example: object.EditPaste
See Also: EditCut Method, EditCopy Method, EditDelete Method
Visual Basic Automation Reference
TextEditor module
773
G
Applies To: TextEditor object
Filename Property
Returns or sets the file name of the object.
Example: object.Filename = "c:\data\myfile.pto"
See Also: FileType Property
Applies To: TextEditor object, Workbook object, Chart object
FileType Property
Returns and set the file type.
Example: object.FileType = FileFWChart
See Also: Filename Property
Applies To: TextEditor object, Workbook object, Chart object
Find Method
Searches the text in a text editor for a specified string.
Returns: If the text searched for is found, the Find method highlights the specified
text and returns the index of the first character highlighted. If the specified text is not
found, the Find method returns 1.
Remarks: If the text searched for is found, the Find method updates the value of the
FindNextPos property to the index of the first character found plus 1.
Example: lPos = object.Find
See Also: FindString Property, FindNextPos Property
Applies To: TextEditor object
FindNextPos Property
Returns or sets the position to start the next search.
Remarks: After a successful call to the Find method, this property is updated with the
position of the found string plus 1.
Example: lPos = object.FindNextPos
See Also: FindString Property, Find Method
Applies To: TextEditor object
FindString Property
Returns or sets the string to search for.
Example: object.FindString = "transform"
See Also: FindNextPos Property, Find Method
WinNonlin
Users Guide
774
G
Applies To: TextEditor object
FormCaption Property
Read-only property that returns the caption of the objects window.
Example: sCaption = object.FormCaption
Applies To: TextEditor object, Workbook object, Chart object
ID Property
Read-only property that returns the ID of the object.
Remarks: The ID property is only valid during a WinNonlin session. It is not persis-
tent.
Example: sID = object.ID
See Also: UUID Property
Applies To: TextEditor object, Workbook object, Chart object
IsModel Property
Read-only property that determines if the object is the text window for the model.
Example: bIsModel = object.IsModel
Applies To: TextEditor object
LeftMargin Property
Returns or sets the left margin for printing.
Remarks: This property is set in twips. There are 1440 twips per inch.
Example: object.LeftMargin = 1440
See Also: TopMargin Property, BottomMargin Property, RightMargin Property, Print-
Out Method
Applies To: TextEditor object
Name Property
Returns or sets the name of the object.
Remarks: This value is used in various modules of the application where filename
may not be sufficient.
Example: object.Name = "MyText"
Applies To: TextEditor object, Workbook object, Chart object
PageHeight Property
Returns or sets the page height.
Visual Basic Automation Reference
TextEditor module
775
G
Remarks: This property is set in twips. There are 1440 twips per pixel.
Example: object.PageHeight = 11 * 1440
See Also: PageWidth Property
Applies To: TextEditor object
PageWidth Property
Returns or sets the page width.
Remarks: This property is set in twips. There are 1440 twips per pixel.
Example: object.PageWidth = 8.5 * 1440
See Also: PageHeight Property
Applies To: TextEditor object
PrintOut Method
This method prints the text object.
Example: object.PrintOut
See Also: PrintAll Method
Applies To: TextEditor object, Workbook object, Chart object
ReadOnly Property
Returns or sets the read-only status the object.
Example: object.ReadOnly = True
Applies To: TextEditor object, Workbook object, Chart object
RightMargin Property
Returns or sets the right margin for printing.
Remarks: This property is set in twips. There are 1440 twips per inch.
Example: object.RightMargin = 1440
See Also: TopMargin Property, BottomMargin Property, LeftMargin Property, Print-
Out Method
Applies To: TextEditor object
Save Method
This method prints the text object.
Example: object.PrintOut
Applies To: TextEditor object, Workbook object, Chart object
WinNonlin
Users Guide
776
G
SelectAll Method
Selects all the text in the window.
Example: object.SelectAll
See Also: SelectionStart Property, SelectionLength Property, SelectionText Property,
SelectionTextRTF Property
Applies To: TextEditor object
SelectionLength Property
Returns or sets the number of characters selected.
Remarks: Setting SelectionLength less than 0 causes a run-time error.
Example: object.SelectionLength = object.EditorTextLength
See Also: SelectAll Method, SelectionStart Property, SelectionLength Property,
SelectionText Property, SelectionTextRTF Property
Applies To: TextEditor object
SelectionStart Property
Returns or sets the starting point of text selected; indicates the position of the inser-
tion point if no text is selected.
Remarks: Setting SelectionStart greater than the text length sets the property to the
existing text length; changing SelectionStart changes the selection to an insertion
point and sets SelelectionLength to 0.
Example: object.SelectionStart = 0
See Also: SelectAll Method, SelectionStart Property, SelectionLength Property,
SelectionText Property, SelectionTextRTF Property
Applies To: TextEditor object
SelectionText Property
Returns or sets the string containing the currently selected text; consists of a zero-
length string ("") if no characters are selected.
Remarks: Setting SelectionText to a new value sets SelectionLength to 0 and replaces
the selected text with the new string.
Example: object.SelectionText = "new text"
See Also: SelectAll Method, SelectionStart Property, SelectionLength Property,
SelectionText Property, SelectionTextRTF Property
Applies To: TextEditor object
SelectionTextRTF Property
Returns or sets the text (in .rtf format) in the current selection of a text editor.
Visual Basic Automation Reference
TextEditor module
777
G
Remarks: Setting the SelectionTextRTF property replaces any selected text in the text
editor with the new string. This property returns a zero-length string ("") if no text is
selected in the control.
Example: object.SelectionTextRTF = "new text"
See Also: SelectAll Method, SelectionStart Property, SelectionLength Property,
SelectionText Property, SelectionTextRTF Property
Applies To: TextEditor object
Source Property
Read-only property that returns the source object.
Applies To: TextEditor object
Tag Property
Returns or sets a tag value for an object.
Remarks: This property can be used to give an object a unique identifying value.
Example: object.Tag = "Input text"
Applies To: TextEditor object, Workbook object, Chart object
TopMargin Property
Returns or sets the top margin for printing.
Remarks: This property is set in twips. There are 1440 twips per inch.
Example: object.TopMargin = 1440
See Also: BottomMargin Property, LeftMargin Property, RightMargin Property, Print-
Out Method
Applies To: TextEditor object
UUID Property
Read-only property to get the UUID for the object.
Remarks: This property is persistent when the object is saved in the proprietary for-
mat.
Example: sUUID = object.UUID
See Also: ID Property
Applies To: TextEditor object, Workbook object, Chart object
WindowState Property
Returns or sets the window state of the object.
Example: object.WindowState = WindowStateConstantsMinimized
WinNonlin
Users Guide
778
G
Applies To: TextEditor object, Workbook object, Chart object
TextEditors module
Instancing: PublicNotCreatable
Count Property
Returns a count of items in the collection.
Returns: Returns the number of items in the colelction.
Applies To: TextEditors object, Workbooks object, Charts object, Variables object
Item Property
Returns a specific member of the collection object either by position or by key.
Returns: Returns a TextEditor object.
Applies To: TextEditors object, Workbooks object, Charts object, Variables object
Variable module
Instancing: MultiUse
Column Property
Returns or sets the column of the variable.
Example: object.Column = 3
See Also: Name Property
Applies To: Variable object
DataType Property
Returns or sets the data type of the variable.
Example: object.DataType = Character
Applies To: Variable object
Parameter Type (Default) Description
Index Variant An expression that specifies the position of a member of
the collection. If a numeric expression, index must be a
number from 1 to the value of the collections Count
property. If a string expression, index must correspond
to the key argument specified when the member
referred to was added to the collection.
Visual Basic Automation Reference
Variable module
779
G
ID Property
Returns or sets the variable ID.
Remarks: This property is not used by WinNonlin 4.
Applies To: Variable object
key Property
Read-only property that returns the variable key.
Applies To: Variable object
Mapping Property
Returns or sets the variable mapping.
Applies To: Variable object
Name Property
Returns or sets the name of the variable.
Remarks: This will generally match the name of the column in the workbook.
Example: object.Name = "Subject"
See Also: Column Property
Applies To: Variable object
SortIndex Property
Returns or sets the sort index of the variable.
Example: object.SortIndex = 1
See Also: SortOrder Property
Applies To: Variable object
SortOrder Property
Returns or sets the sorting order of the variable.
Remarks: When set to SortAscending, the variable is sorted in ascending order. When
set to SortDescending, the variable is sorted in descending order.
Example: object.SortOrder = SortAscending
See Also: SortIndex Property
Applies To: Variable object
VarType Property
Returns or sets the varaible type.
WinNonlin
Users Guide
780
G
Example: object.VarType = Sort
Applies To: Variable object
Variables module
Instancing: MultiUse
Add Method
This method adds a variable object to the variables collection.
Returns: Returns a reference to the variable just added to the collection. Returns
Nothing if object is not added.
Example: object.Add clsVar, "Sort1"
See Also: AddEx Method
Applies To: Variables object
AddEx Method
This method creates a variable object based on the parameter values and adds it to the
variables collection.
Parameter Type (Default) Description
objVar Variable The variable object to add to the collection.
sKey String ("") (Optional) A unique string expression that specifies a
key string that can be used, instead of a positional
index, to access a member of the collection.
vBefore Variant (Optional) An expression that specifies a relative
position in the collection. The member to be added is
placed in the collection before the member identified
by the before argument.
vAfter Variant (Optional) An expression that specifies a relative
position in the collection. The member to be added is
placed in the collection after the member identified
by the after argument.
Parameter Type (Default) Description
sKey String (Optional) A unique string expression that specifies
a key string that can be used, instead of a posi-
tional index, to access a member of the collection.
lID Long (Optional) Unused in WinNonlin 4.
sName String (Optional) The name of the variable. This generally
corresponds to the column name.
Visual Basic Automation Reference
Variables module
781
G
Returns: Returns a reference to the variable just added to the collection. Returns
Nothing if object is not added.
Remarks: Not all properties of the variable object are used by all engines.
Example: object.Add "Sort1", , "Subject", , Sort, 1, SortA-
scending
See Also: Add Method
Applies To: Variables object
Count Method
Returns the number of items in a collection.
Returns: The number of items in the collection.
Example: lCount = object.Count
Applies To: Variables object, Workbooks object, Charts object, TextEditors object
Exists Method
Returns if a specified item exists in the collection.
Returns: True if item exist, False otherwise.
Example: bRet = object.Exists("Sort1")
Applies To: Variables object
lCol Long (Optional) The column number of the variable.
(Most engines in WinNonlin will use the column
name and this value will be ignored.)
nVarType WnlVarType (Optional) The type of variable.
nSortIndex Integer (Optional) The sort index of the variable if the type
is a sorting variable.
nSor-
tOrder
WnlSortOrder (Optional) The sort order of the variable if the type
is a sorting variable.
nDataType WnlDataType (Optional) The data type of the variable.
sMapping String (Optional) Unused in WinNonlin 4.
Parameter Type (Default) Description
nVarType WnlVarType
(All)
(Optional) If specified, then the count property only
returns a count for variables of the specified type.
Parameter Type (Default) Description
sKey String (Optional) Specifies the item in the collection to search for.
Parameter Type (Default) Description
WinNonlin
Users Guide
782
G
Item Method
Returns a specific member of a collection either by position or by key.
Returns: Returns a variable object from the collection.
Example: Set MyVar = object.Item(1)
Applies To: Variables object, Workbooks object, Charts object, TextEditors object
ItemsByType Method
Returns a collection of variables based on the variable type specified.
Returns: A variables collection.
Applies To: Variables object
Remove Method
Removes a member of the collection.
Example: object.Remove 1
See Also: RemoveAll Method
Applies To: Variables object
Parameter Type (Default) Description
vKey Variant (Optional) An expression that specifies the position of a
member of the collection. If a numeric expression, index
must be a number from 1 to the value of the collections
Count property. If a string expression, index must corre-
spond to the key argument specified when the member
referred to was added to the collection.
Parameter Type (Default) Description
nVarType WnlVarType (Optional) The variable type to return.
Parameter Type
(Default)
Description
vKey Variant (Optional) An expression that specifies the position of a
member of the collection. If a numeric expression, index
must be a number from 1 to the value of the collections
Count property. If a string expression, index must corre-
spond to the key argument specified when the member
referred to was added to the collection.
Visual Basic Automation Reference
Wnl4 module
783
G
RemoveAll Method
Removes all members of the collection.
Example: object.RemoveAll
See Also: Remove Method
Applies To: Variables object
Wnl4 module
Instancing: MultiUse
Copyright Property
Read-only property returns the copyright information for the application.
Applies To: Wnl4 object
Description Property
Read-only property returns the description of the application.
Applies To: Wnl4 object
Version Property
Read-only property that returns the version of the application.
Applies To: Wnl4 object
Workspace Property
Read-only property that returns a reference to the workspace object.
Remarks: Getting a reference to the workspace object is the first step to automating
WinNonlin. All other objects in the system are created by the workspace object.
Example: Dim objApp As WinNonlin4.Wnl4 : Dim objWorkspace
As WinNonlin4.Workspace : Dim clsBook As Workbook : Set
objApp = New WinNonlin4.Wnl4 : Set objWorkspace =
Wnl4.Workspace : Set objApp = Nothing : objWork-
space.OpenWorkbook clsBook, "c:\data\mydata.pwo", FileFW-
Book : REM rest of code...
Applies To: Wnl4 object
Parameter Type (Default) Description
nVarType WnlVarType
(All)
(Optional) If specified, then only variables of the
specified type will be removed from the collection.
WinNonlin
Users Guide
784
G
Workbook module
Instancing: MultiUse
ActiveCol Property
Returns or sets the active Col of the workbook.
Example: object.ActiveCol = 5
See Also: GetActiveCell Method, SetActiveCell Method, ActiveRow Property
Applies To: Workbook object
ActiveRow Property
Returns or sets the active row of the workbook.
Example: object.ActiveRow = 5
See Also: GetActiveCell Method, SetActiveCell Method, ActiveCol Property
Applies To: Workbook object
ActiveSheet Property
Returns or sets the active sheet in the workbook.
Remarks: If the sheet is not found, the active sheet does not change.
Example: object.Sheet = "History"
See Also: NumSheets Property, SheetName Property
Applies To: Workbook object, Chart object
Append Method
This method appends a file to the object.
Example: object.Append
See Also: AppendFileName Property, AppendFileType Property, AppendSheet Prop-
erty
Applies To: Workbook object
AppendFileName Property
Returns or sets the file name for appending to an object.
Example: object.AppendFileName = "append.dat"
See Also: Append Method, AppendFileType Property, AppendSheet Property
Applies To: Workbook object
Visual Basic Automation Reference
Workbook module
785
G
AppendFileType Property
Returns or sets the file type of the file to be appended.
Example: object.AppendFileType = FileASCIIDATA
See Also: Append Method, AppendFileName Property, AppendSheet Property
Applies To: Workbook object
AppendSheet Property
Returns or sets the sheet to be appended to.
Example: object.AppendSheet = 1
See Also: Append Method, AppendFileName Property, AppendFileType Property
Applies To: Workbook object
AutoFileOptions Property
Returns or sets if the application should use automatic file options.
Remarks: If set to WnlYes, the application will scan the first few rows of a data file to
try and determine if headers exist and the delimiter. This only applies to ASCII data
files.
Example: object.AutoFileOptions = WnlYes
See Also: Headers Property, Delimiter Property
Applies To: Workbook object
CaptionPrefix Property
Read-only property that returns the caption prefix of an object.
Remarks: The caption prefix precedes the object type in the object windows caption.
Example: sPrefix = object.CaptionPrefix
Applies To: Workbook object, Chart object, TextEditor object
CellFormula Property
Returns or sets the cell formula of the active cell.
Example: object.CellFormula = "A1+1"
See Also: CellFormulaRC Property
Applies To: Workbook object
CellFormulaRC Property
Returns or sets the cell formula for a specific cell.
Parameter Type (Default) Description
lRow Long The cell row.
WinNonlin
Users Guide
786
G
Remarks: When setting the formula, it is not necessary to preceed the formula with
the equals sign.
Example: sFormula = object.CellFormulaRC(10,5)
See Also: CellFormula Property
Applies To: Workbook object
CellValue Property
Returns or sets the cell value of the active cell.
Example: object.CellValue = "Missing"
See Also: CellValueRC Property
Applies To: Workbook object
CellValueRC Property
Returns or sets the cell value for a specific cell.
Example: dValue = object.CellValueRC(10,5)
See Also: CellValue Property
Applies To: Workbook object
Changed Property
Returns or sets the changed status of the object.
Remarks: When the value is True, a file save warning will be shown when the object
is closed.
Example: object.Changed = False
Applies To: Workbook object, Chart object, TextEditor object
Clip Property
Returns or sets data in the workbook based on the current selection.
Remarks: The string used by the clip property should be tab delimited for columns
and carriage return delimited for rows.
Example: sText = object.Clip
See Also: Selection Property
Applies To: Workbook object
lCol Long The cell column.
Parameter Type (Default) Description
lRow Long The cell row.
lCol Long The cell column.
Parameter Type (Default) Description
Visual Basic Automation Reference
Workbook module
787
G
ColName Property
Returns or sets a colum name.
Example: object.ColName = "Subject"
See Also: ColUnit Property
Applies To: Workbook object
ColUnit Property
Returns or sets the units for the column.
Example: sUnits = object.ColUnit(5)
See Also: ColName Property
Applies To: Workbook object
ConsecutiveDelimiters Property
Returns or sets if the application should skip consecutive delimiters on files.
Remarks: If set to WnlYes, the application will ignore consecutive delimiters when
reading files. This is helpful when reading files delimited by a variable amount of
spaces. This only applies to ASCII data files.
Example: object.ConsecutiveDelimiters = WnlNo
See Also: AutoFileOptions Property, Headers Property, Delimiter Property
Applies To: Workbook object
ConvertUnits Method
Converts the units for a specified column.
Remarks: The ConvertUnits operation changes the values in the data column as a
result of the conversion. If there are no units in the column specified then the column
is assigned the new units with no conversion.
Parameter Type (Default) Description
lCol Long The column index.
Parameter Type (Default) Description
iIndex Integer The column index.
Parameter Type (Default) Description
lCol Long The column to convert units.
sNewUnits String The units to convert to.
dMoleWt Double (DMISS-
ING)
(Optional) The molecular weight of a compound
(weight per mole specified in grams). It therefore is the
conversion factor needed to convert between grams
and moles.
WinNonlin
Users Guide
788
G
Example: object.ConvertUnits(3, "hr")
See Also: ColUnit Property
Applies To: Workbook object
Delimiter Property
Returns or sets the file delimiter.
Remarks: This option only applies to ASCII data files.
Example: object.Delimiter = ","
See Also: AutoFileOptions Property, Headers Property, ConsecutiveDelimiters Prop-
erty
Applies To: Workbook object
EditCopy Method
Copies the current selection and places it on the Windows Clipboard.
Example: object.EditCopy
See Also: EditCut Method, EditPaste Method, EditPasteValues Method, EditDelete
Method
Applies To: Workbook object
EditCut Method
Cuts the current selection and places it on the Windows Clipboard.
Example: object.EditCut
See Also: EditCopy Method, EditPaste Method, EditPasteValues Method, EditDelete
Method
Applies To: Workbook object
EditDelete Method
Deletes the current selection.
Example: object.EditDelete
See Also: EditCut Method, EditCopy Method, EditPaste Method, EditPasteValues
Method
Applies To: Workbook object
EditPaste Method
Pastes the contents of the clipboard to the current location.
Parameter Type (Default) Description
nShift F1ShiftTypeConstants (Optional)
Visual Basic Automation Reference
Workbook module
789
G
Example: object.EditPaste
See Also: EditCut Method, EditCopy Method, EditPasteValues Method, EditDelete
Method
Applies To: Workbook object
EditPasteValues Method
Pastes the contents of the clipboard to the current location.
Remarks: If the data in the clipboard represents formulas, then the resulting value is
placed in the workbook, not the formula.
Example: object.EditPasteValues
See Also: EditCut Method, EditCopy Method, EditPaste Method, EditDelete Method
Applies To: Workbook object
ExcludeSel Method
Excludes the current selection.
Remarks: Excluding cells in the workbook will prevent the data from being used in
any analysis.
Example: object.ExcludeSel
See Also: IncludeSel Method
Applies To: Workbook object
Filename Property
Returns or sets the file name of the object.
Example: object.Filename = "c:\data\myfile.pwo"
See Also: FileType Property, AutoFileOptions Property, Headers Property, Delimiter
Property, ConsecutiveDelimiters Property
Applies To: Workbook object, Chart object, TextEditor object
FileType Property
Returns and set the file type.
Example: object.FileType = FileFWBook
See Also: Filename Property, AutoFileOptions Property, Headers Property, Delimiter
Property, ConsecutiveDelimiters Property
Applies To: Workbook object, Chart object, TextEditor object
FormCaption Property
Read-only property that returns the caption of the objects window.
WinNonlin
Users Guide
790
G
Example: sCaption = object.FormCaption
Applies To: Workbook object, Workbook Object, TextEditor object
GetActiveCell Method
Method returns the active row and column of the workbook.
Remarks: This method is not compatible with VBScript. Use the ActiveRow and
ActiveCol properties instead.
Example: object.GetActiveCell lRow, lCol
See Also: SetActiveCell Method, ActiveRow Property, ActiveCol Property
Applies To: Workbook object
GetColNum Method
This method returns the column number for a specified column.
Applies To: Workbook object
GetLastRowCol Method
This method returns the last row and last column of the workbook containing data.
Remarks: This method is not compatible with VBScript. Use the LastRow and Last-
Col properties instead.
Example: object.GetLastRowCol(lRows, lCols)
See Also: LastRow Property, LastCol Property
Applies To: Workbook object
Headers Property
Returns or sets if the application should look for headers on the data file.
Remarks: If set to WnlYes, the first row of the file will be used as headers in the
workbook. This only applies to ASCII data files.
Parameter Type (Default) Description
lRow Long (Optional) Variable to return the active row.
lCol Long (Optional) Variable to return the active column.
Parameter Type (Default) Description
sCol String (Optional)
Parameter Type (Default) Description
lLastRow Long (Optional) This parameter is set to the last row of the
workbook.
lLastCol Long (Optional) This parameter is set to the last column of
the workbook.
Visual Basic Automation Reference
Workbook module
791
G
Example: object.Headers = WnlYes
See Also: AutoFileOptions Property, Delimiter Property, ConsecutiveDelimiters
Property
Applies To: Workbook object
ID Property
Read-only property that returns the ID of the object.
Remarks: The ID property is only valid during a WinNonlin session. It is not persis-
tent.
Example: sID = object.ID
See Also: UUID Property
Applies To: Workbook object, Chart Object, TextEditor object
IncludeSel Method
Include the current selection.
Remarks: If any cells in the current selection are excluded, calling this method will
include them.
Example: object.IncludeSel
See Also: ExcludeSel Method
Applies To: Workbook object
InsertCol Method
This function inserts a column in the workbook.
Returns: Returns true if successful, false otherwise.
Remarks: The column is inserted at the current row position in the workbook.
Example: bRet = Object.InsertCol("NewCol")
See Also: RemoveCol Function, InsertRow Function
Applies To: Workbook object
InsertRow Method
This function inserts a row in the workbook.
Returns: Returns true if successful, false otherwise.
Remarks: The rows are inserted at the current position in the workbook.
Parameter Type (Default) Description
sColName String (Optional) The name of the new column.
Parameter Type (Default) Description
lRowsToAdd Long (1) (Optional) The number of rows to insert in the workbook
WinNonlin
Users Guide
792
G
Example: bRet = object.InsertRow(5)
See Also: RemoveRow Function, InsertCol Function
Applies To: Workbook object
IsExcluded Property
Read-only property that determines if the active cell is excluded.
Returns: True if active cell is excluded, false otherwise.
Example: bIsExcluded = object.IsExcluded
See Also: IsExcludedRC Property
Applies To: Workbook object
IsExcludedRC Property
Read-only property that determines if the specified cell is excluded.
Returns: True is the cell is excluded, false otherwise.
Example: bIsExcluded = object.IsExcluded(5, 10)
See Also: IsExcluded Property
Applies To: Workbook object
IsMissingVal Property
Read-only property that determines if the active cell is missing.
Returns: True if the active cell is missing, false otherwise.
Example: bIsMissing = object.IsMissingVal
See Also: IsMissingValRC Property
Applies To: Workbook object
IsMissingValRC Property
Read-only property that determines if the specified cell is missing.
Returns: True if the active cell is missing, false otherwise.
Example: bIsMissing = object.IsMissingValRC(5, 5)
See Also: IsMissingVal Property
Parameter Type (Default) Description
lRow Long (Optional) The row to check for exclusion.
lCol Long (Optional) The column to check for exclusion.
Parameter Type (Default) Description
lRow Long (Optional) The row to check for missing.
lCol Long (Optional) the column to check for missing.
Visual Basic Automation Reference
Workbook module
793
G
Applies To: Workbook object
LastCol Property
Read-only property returns the last column of the workbook containing data.
Example: lLastCol = object.LastCol
See Also: GetLastRowCol Method, LastRow Property
Applies To: Workbook object
LastRow Property
Read-only property returns the last row of the workbook containing data.
Example: lLastRow = object.LastRow
See Also: GetLastRowCol Method, LastRow Property
Applies To: Workbook object
LastRowForCol Method
This method returns the last row for a specified column that contains data.
Returns: Returns the last row for a specified column that contains data.
Example: lLastRow = object.LastRowForCol(2)
See Also: LastRow Property
Applies To: Workbook object
Missing Property
Returns or sets the missing value for the workbook.
Remarks: Missing values will appears in the workbook with gray backgrounds.
Example: object.Missing = "Miss"
Applies To: Workbook object
Name Property
Returns or sets the name of the object.
Remarks: This value is used in various modules of the application where filename
may not be sufficient.
Example: object.Name = "MyData"
Applies To: Workbook object, Chart object, TextEditor object
Parameter Type (Default) Description
lCol Long (Optional) The column to return the last row for.
WinNonlin
Users Guide
794
G
numSheets Property
Read-only property returns the number of sheets in the workbook.
Example: lNumSheets = object.NumSheets
See Also: ActiveSheet Property, SheetName Property
Applies To: Workbook object
NumSortKeys Property
Returns or sets the number of sort keys for the active sheet.
Remarks: The number of sort keys must be between 0 and 256.
Example: object.NumSortKeys = 2 : object.SortKey(1) = 1 :
object.SortKey(2) = 2
See Also: NumSortKeysEx Property, SortKey Property, SortKeyEx Property
Applies To: Workbook object
NumSortKeysEx Property
Returns or sets the number of sort keys for a specific sheet.
Remarks: The number of sort keys must be between 0 and 256.
Example: object.NumSortKeysEx(1) = 2 : object.SortKeyEx(1,
1) = 1 : object.SortKeyEx(1, 2) = 2
See Also: NumSortKeys Property, SortKeyEx Property, SortKey Property
Applies To: Workbook object
PrintAll Method
Prints the entire workbook.
Remarks: This method prints all the sheets in the workbook, not just the active sheet.
Example: object.PrintAll
See Also: PrintOut Method
Applies To: Workbook object
PrintOut Method
Prints the active worksheet.
Example: object.PrintOut
See Also: PrintAll Method
Applies To: Workbook object, Chart Object, TextEditor Object
Parameter Type (Default) Description
lSheet Long (Optional) The sheet to set the number of sort keys.
Visual Basic Automation Reference
Workbook module
795
G
ReadOnly Property
Returns or sets the read-only status the object.
Example: object.ReadOnly = True
Applies To: Workbook object, Chart object, TextEditor object
ResetExclusions Method
This method resets the exclusions set in the active worksheet.
Remarks: After calling this method all data will be included in analysis. This does not
affect missing data.
Example: object.ResetExclusions
See Also: IncludeSel Method, ExcludeSel Method, SearchInclude Method, SearchEx-
clude Method
Applies To: Workbook object
Save Method
Saves the object to file.
Example: object.Save
Applies To: Workbook object, Chart object, TextEditor object
Search Method
The Search method searches the worksheet for a specified value based on the current
search settings.
Returns: Returns 1 if value is found, 0 otherwise.
Remarks: If the search value is found, the active cell is changed to the cell where the
value was found.
Example: nRet = object.Search()
See Also: SearchReplaceAll Method, SearchExclude Method, SearchInclude Method,
SearchArea Property, SearchCaseSensitive Property, SearchCompare Property,
SearchReplaceValue Property, SearchRowMode Property, SearchTolerance Property,
SearchValue Property
Applies To: Workbook object
SearchArea Property
Returns or sets the area to search.
Remarks: When SearchArea is SearchAreaCol, the active column is used. When
SearchArea is SearchAreaSel, the active selection is used.
Example: object.SearchArea = SearchAreaAll
WinNonlin
Users Guide
796
G
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchCaseSensitive Property, SearchCompare Property,
SearchReplaceValue Property, SearchRowMode Property, SearchTolerance Property,
SearchValue Property
Applies To: Workbook object
SearchCaseSensitive Property
Returns or sets if searched are case sensitive.
Remarks: If true then searches are case sensitive, otherwise searches are not case sen-
sitive.
Example: object.SearchCaseSensitive = True
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchArea Property, SearchCompare Property, SearchRe-
placeValue Property, SearchRowMode Property, SearchTolerance Property, Search-
Value Property
Applies To: Workbook object
SearchCompare Property
Returns or sets the search comparison.
Remarks: This only applies to searches where the SearchValue is numeric.
Example: object.SearchCompare = SearchCompareEQ
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchArea Property, SearchCaseSensitive Property,
SearchReplaceValue Property, SearchRowMode Property, SearchTolerance Property,
SearchValue Property
Applies To: Workbook object
SearchExclude Method
The SearchExclude method searches the worksheet for a specified value and excludes
it based on the current search settings.
Returns: Returns the number of values excluded.
Remarks: When used with row mode (SearchRowMode = True), each row where the
search value is found will be excluded.
Example: lExcluded = object.SearchExclude()
See Also: Search Method, SearchNext Method, SearchReplaceAll Method, SearchIn-
clude Method, SearchArea Property, SearchCaseSensitive Property, SearchCompare
Property, SearchReplaceValue Property, SearchRowMode Property, SearchTolerance
Property, SearchValue Property
Applies To: Workbook object
Visual Basic Automation Reference
Workbook module
797
G
SearchInclude Method
The SearchInclude method searches the worksheet for a specified value and includes
it based on the current search settings.
Returns: Returns the number of values included.
Remarks: When used with row mode (SearchRowMode = True), each row where the
search value is found will be included.
Example: lIncluded = object.SearchInclude()
See Also: Search Method, SearchNext Method, SearchReplaceAll Method, SearchEx-
clude Method, SearchArea Property, SearchCaseSensitive Property, SearchCompare
Property, SearchReplaceValue Property, SearchRowMode Property, SearchTolerance
Property, SearchValue Property
Applies To: Workbook object
SearchReplaceAll Method
The SearchReplaceAll method searches the worksheet for a specified value and
replaces it with another value based on the current search settings.
Returns: Returns the number of values replaced.
Remarks: When used with row mode (SearchRowMode = True), each row where the
search value is found will be removed. In this case the SearchReplaceValue is
ignored.
Example: lReplacements = object.SearchReplaceAll()
See Also: Search Method, SearchNext Method, SearchExclude Method, SearchIn-
clude Method, SearchArea Property, SearchCaseSensitive Property, SearchCompare
Property, SearchReplaceValue Property, SearchRowMode Property, SearchTolerance
Property, SearchValue Property
Applies To: Workbook object
SearchReplaceValue Property
Returns or sets the replace value.
Example: object.SearchReplaceValue = "Capsule"
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchArea Property, SearchCaseSensitive Property, Search-
Compare Property, SearchRowMode Property, SearchTolerance Property, Search-
Value Property
Applies To: Workbook object
SearchRowMode Property
Returns or sets the if the search operates on the row where the search value is found.
WinNonlin
Users Guide
798
G
Remarks: This option only applies to SearchReplaceAll, SearchInclude and
SearchExclude operations. When SearchReplaceAll is used with row mode, each row
where the search value is found will be removed. When SearchInclude or SearchEx-
clude is used with row mode, each row where the search value is found will be
included or excluded.
Example: object.SearchRowMode = True
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchArea Property, SearchCaseSensitive Property, Search-
Compare Property, SearchReplaceValue Property, SearchTolerance Property, Search-
Value Property
Applies To: Workbook object
SearchTolerance Property
Returns or sets the tolerance value for the search.
Remarks: This only applies to searches where the SearchValue is numeric. Set
SearchTolerance to 0 to turn of searches with tolerance.
Example: object.SearchTolerance = 1.5
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchArea Property, SearchCaseSensitive Property, Search-
Compare Property, SearchReplaceValue Property, SearchRowMode Property, Search-
Value Property
Applies To: Workbook object
SearchValue Property
Returns or sets the value to search for.
Example: object.SearchValue = "Tablet"
See Also: Search Method, SearchReplaceAll Method, SearchExclude Method,
SearchInclude Method, SearchArea Property, SearchCaseSensitive Property, Search-
Compare Property, SearchReplaceValue Property, SearchRowMode Property, Search-
Tolerance Property
Applies To: Workbook object
Selection Property
Returns or sets the selection.
Remarks: The selection is set based on a reference. Default column names (A-IV) are
used for the column reference.
Example: object.Selection = "A1:B5" Selects column 1 to
column 2 and row 1 to row 5
See Also: SelStartRow Property, SelStartCol Property, SelEndRow Property, SelEnd-
Col Property
Visual Basic Automation Reference
Workbook module
799
G
Applies To: Workbook object
SelEndCol Property
Returns or sets the end column of a selection.
Example: object.SelEndCol = 5
See Also: Selection Property, SelStartRow Property, SelStartCol Property, SelEnd-
Row Property
Applies To: Workbook object
SelEndRow Property
Returns or sets the end row of a selection.
Example: object.SelEndRow = 5
See Also: Selection Property, SelStartRow Property, SelStartCol Property, SelEndCol
Property
Applies To: Workbook object
SelStartCol Property
Returns or sets the start column of a selection.
Example: object.SelStartCol = 1
See Also: Selection Property, SelStartRow Property, SelEndRow Property, SelEndCol
Property
Applies To: Workbook object
SelStartRow Property
Returns or sets the start row of a selection.
Example: object.SelStartRow = 1
See Also: Selection Property, SelStartCol Property, SelEndRow Property, SelEndCol
Property
Applies To: Workbook object
SetActiveCell Method
Method sets the active row and column of the workbook.
Example: object.SetActiveCell 10, 1
See Also: GetActiveCell Method, ActiveRow Property, ActiveCol Property
Parameter Type (Default) Description
lRow Long (Optional) The row to set.
lCol Long (Optional) the column to set.
WinNonlin
Users Guide
800
G
Applies To: Workbook object
SheetName Property
Returns or sets the sheet name of the specified sheet.
Example: object.SheetName(1) = "Input"
See Also: Sheet Method
Applies To: Workbook object
ShowUnits Property
Returns or sets is units are displayed in the column headers.
Remarks: If set to WnlYes, then units will appear in the second line of the column
header, otherwise the column header will be one line and not show units.
Example: object.ShowUnits = WnlNo
Applies To: Workbook object
Sort Method
This function sorts the workbook.
Returns: True if successful, false otherwise.
Remarks: If the function parameters are ommitted, the entire working is sorted.
Example: object.Sort
See Also: Sorted Property, NumKeys Property, SortKey Property, NumKeysEx Prop-
erty, SortKeyEx Property
Applies To: Workbook object
Parameter Type (Default) Description
nSheet Integer (Optional) The index of the sheet to change.
Parameter Type
(Default)
Description
lR1 Long (1) (Optional) Starting row of the range to be sorted.
lC1 Long (1) (Optional) Starting column of the range to be sorted.
lR2 Long (0) (Optional) Ending row of the range to be sorted.
lC2 Long (0) (Optional) Ending column of the range to be sorted.
bSortBy-
Row
Boolean
(True)
(Optional) Specifies how data is sorted. If True, data is sorted
by rows; if False, data is sorted by columns.
vKeys Variant (Optional) Identifies the key or keys to use to sort the data. This
argument can be a single integer or an array of integers.
Visual Basic Automation Reference
Workbook module
801
G
Sorted Property
Read-only property returns if the sheet is sorted.
Example: bSorted = object.Sorted
See Also: Sort Method
Applies To: Workbook object
SortKey Property
Returns or sets a specific sort key for the active sheet.
Example: object.NumSortKeys = 2 : object.SortKey(1) = 1 :
object.SortKey(2) = 2
See Also: NumSortKeys Property, NumSortKeysEx Property, SortKeyEx Property
Applies To: Workbook object
SortKeyEx Property
Returns or sets a specific sort key for a specific sheet.
Example: object.NumSortKeysEx(1) = 2 : object.SortKeyEx(1,
1) = 1 : object.SortKeyEx(1, 2) = 2
See Also: NumSortKeysEx Property, NumSortKeys Property, SortKey Property
Applies To: Workbook object
Source Property
Read-only property that returns the source object.
Applies To: Workbook object
Tag Property
Returns or sets a tag value for an object.
Remarks: This property can be used to give an object a unique identifying value.
Example: object.Tag = "Input workbook"
Applies To: Workbook object, Chart object, TextEditor object
Parameter Type (Default) Description
nIndex Integer (Optional) The sort key to set. The value must be
between 1 and NumSortKeys.
Parameter Type (Default) Description
lSheet Long (Optional) The sheet to set the number of sort keys.
nIndex Integer (Optional) The sort key to set. The value must be
between 1 and NumSortKeys.
WinNonlin
Users Guide
802
G
Transform Method
Performs a transformation on a column in a workbook.
Example: object.Transform TransformAdd, 5, "Time",
"TimePlus5"
See Also: CellFormula Property, CellFormulaRC Property
Applies To: Workbook object
UseFormats Property
Returns or sets if formats should be used when saving files.
Example: object.UseFormats = WnlNo
Applies To: Workbook object
UUID Property
Read-only property to get the UUID for the object.
Remarks: This property is persistent when the object is saved in the proprietary for-
mat.
Example: sUUID = object.UUID
See Also: ID Property
Applies To: Workbook object, Chart object, TextEditor object
WindowState Property
Returns or sets the window state of the object.
Example: object.WindowState = WindowStateConstantsMinimized
Applies To: Workbook object, Chart object, TextEditor object
Workbooks module
Instancing: PublicNotCreatable
Parameter Type (Default) Description
nFunction WnlTransformConstants (Optional)
vExtra Variant (Optional)
sSourceCol String (Optional)
sDestCol String (Optional)
nDestArea WnlTransformDestConstants (TransformDestAppend) (Optional)
bUseFormula Boolean (False) (Optional)
Visual Basic Automation Reference
Workspace module
803
G
Count Property
Returns a count of items in the collection.
Returns: Returns the number of items in the colelction.
Applies To: Workbooks object, Charts object, TextEditors object, Variables object
Item Property
Returns a specific member of the collection object either by position or by key.
Returns: Returns a Workbook object.
Applies To: Workbooks object, Charts object, TextEditors object, Variables object
Workspace module
Instancing: PublicNotCreatable
ActiveChart Property
Read-only property that returns a reference to the active chart object.
Example: object.ActiveChart.Filename = "mychart.pco"
See Also: ActiveWorkbook Property, ActiveTextEditor Property, ActiveModel Prop-
erty
Applies To: Workspace object
ActiveFormType Property
Read-only property that returns the type of the active object.
Example: nType = object.ActiveFormType
Applies To: Workspace object
ActiveModel Property
Read-only property that returns a reference to the active model object.
Example: object.ActiveModel.Filename = "mymodel.pmo"
See Also: ActiveWorkbook, ActiveChart, ActiveTextEditor
Applies To: Workspace object
Parameter Type Description
Index Variant An expression that specifies the position of a member of the col-
lection. If a numeric expression, index must be a number from 1
to the value of the collections Count property. If a string expres-
sion, index must correspond to the key argument specified when
the member referred to was added to the collection.
WinNonlin
Users Guide
804
G
ActiveTextEditor Property
Read-only property that returns a reference to the active text editor object.
Example: object.ActiveTextEditor.Filename = "mytext.pto"
See Also: ActiveWorkbook Property, ActiveChart Property, ActiveModel Property
Applies To: Workspace object
ActiveWorkbook Property
Read-only property that returns a reference to the active workbook object.
Example: object.ActiveWorkbook.Filename = "mydata.pwo"
See Also: ActiveChart Property, ActiveTextEditor Property, ActiveModel Property
Applies To: Workspace object
Arrange Method
This method arranges the objects in the MDI parent.
Example: object.Arrange ArrangeTileHorizontal
Applies To: Workspace object
Changed Property
Returns or sets the changed status of the object.
Example: object.Changed = False
Applies To: Workspace object
Chart Property
Read-only property that returns a reference to a chart object.
Remarks: The index can be an integer or string value. Valid integer values are 1 to the
ChartCount. Valid strings are the ID values of the charts.
Example: Set MyChart = object.Chart(1)
See Also: Workbook Property, TextEditor Property, Model Property
Applies To: Workspace object
ChartCount Property
Read-only property that returns the number of charts in the workspace.
Parameter Type (Default) Description
nValue WnlArrangeConstants The type of arrange to perform.
Parameter Type (Default) Description
Index Variant Index to the chart collection.
Visual Basic Automation Reference
Workspace module
805
G
Example: nCharts = object.ChartCount
See Also: WorkbookCout Property, TextEditorCount Property, ModelCount Property
Applies To: Workspace object
Charts Property
Read-only property that returns a reference to the Chart collection.
Example: Set ChartsCollection = object.Charts
See Also: Workbooks Property, TextEditors Property
Applies To: Workspace object
CloseAll Method
This methods closes all the objects in the workspace.
Example: object.CloseAll
Applies To: Workspace object
CloseChart Method
This method closes a chart.
Example: object.CloseChart(clsMyChart)
See Also: CloseWorkbook Method, CloseTextEditor Method, CloseModel Method
Applies To: Workspace object
CloseModel Method
This method closes a model.
Example: object.CloseModel(clsMyModel)
See Also: CloseWorkbook Method, CloseChart Method, CloseTextEditor Method
Applies To: Workspace object
CloseTextEditor Method
This method closes a text editor.
Example: object.CloseTextEditor(clsMyTextEditor)
Parameter Type (Default) Description
clsChart Chart The book to close.
Parameter Type (Default) Description
clsModel Model The book to close.
Parameter Type (Default) Description
clsText TextEditor Item to close.
WinNonlin
Users Guide
806
G
See Also: CloseWorkbook Method, CloseChart Method, CloseModel Method
Applies To: Workspace object
CloseWorkbook Method
This method closes a workbook.
Example: object.CloseWorkbook(clsMyBook)
See Also: CloseChart Method, CloseTextEditor Method, CloseModel Method
Applies To: Workspace object
Filename Property
Returns or sets the name of the workspace.
Example: object.Filename = "project.wsp"
See Also: Load Method, Save Method
Applies To: Workspace object
Load Method
Loads a workspace.
Remarks: If sNewFile is ommitted, then the Filename property is used.
Example: object.Load
See Also: NewWorkspace Method, Save Method, CloseWorkspace Method
Applies To: Workspace object
Model Property
Read-only property that returns a reference to a model object.
Example: Set MyModel = object.Model
See Also: Workbook Property, Chart Property, TextEditor Property
Applies To: Workspace object
ModelCount Property
Read-only property that returns the number of models in the workspace.
Example: nModels = object.ModelCount
Parameter Type (Default) Description
clsBook Workbook The book to close.
Parameter Type Description
sNewFile String ("") (Optional) If set, the Filename property will be changed and
this will be the new file name for the workspace.
Visual Basic Automation Reference
Workspace module
807
G
See Also: WorkbookCout Property, ChartCount Property, TextEditorCount Property
Applies To: Workspace object
NewChart Method
This method creates a new chart object.
Returns: Returns a reference to the new chart. The return value will be Nothing if the
method fails.
Example: Set MyChart = object.NewChart()
See Also: NewWorkbook Method, NewTextEditor Method, NewModel Method
Applies To: Workspace object
NewModel Method
This method closes the current model.
Returns: Returns a reference to the new model. The return value will be Nothing if
the method fails.
Remarks: In this version of WinNonlin, NewModel functions the same as Close-
Model. The return value will always be Nothing.
Example: Set MyModel = object.NewModel()
See Also: NewWorkbook Method, NewChart Method, NewTextEditor Method
Applies To: Workspace object
NewTextEditor Method
This method creates a new text editor object.
Returns: Returns a reference to the new text window. The return value will be Noth-
ing if the method fails.
Example: Set MyTextEditor = object.NewTextEditor()
See Also: NewWorkbook Method, NewChart Method, NewModel Method
Applies To: Workspace object
NewWorkbook Method
This method creates a new workbook object.
Returns: Returns a reference to the new workbook. The return value will be Nothing
if the method fails.
Remarks: The new workbook will have a history worksheet in addition to the number
of sheets specified.
Parameter Type (Default) Description
nNumSheets Integer (1) (Optional) number of worksheets in the new workbook.
WinNonlin
Users Guide
808
G
Example: Set MyBook = object.NewWorkbook(2)
See Also: NewChart Method, NewTextEditor Method, NewModel Method
Applies To: Workspace object
NewWorkspace Method
Creates a new workspace.
Remarks: The functionality of new workspace is the same as CloseWorkspace.
Example: object.NewWorkspace
See Also: Save Method, Load Method, CloseWorkspace Method
Applies To: Workspace object
OpenChart Method
This method creates a new chart and opens a file.
Returns: Returns a reference to the new chart. The return value will be Nothing if the
method fails.
Example: Set MyChart = object.Open-
Chart("c:\data\mydata.pco", FileFWChart)
See Also: OpenWorkbook Method, OpenTextEditor Method, OpenModel Method
Applies To: Workspace object
OpenModel Method
This method creates a new model and opens a file.
Returns: Returns a reference to the new model. The return value will be Nothing if
the method fails.
Example: Set MyModel = object.Open-
Model("c:\data\mymodel.pmo", FileFWModel)
See Also: OpenWorkbook Method, OpenChart Method, OpenTextEditor Method
Parameter Type (Default) Description
sFile String (Optional) The name of the file to open.
nFileType WnlFileTypeConstants (Optional) The file type.
Parameter Type (Default) Description
sFile String (Optional) The name of the file to open.
nFileType WnlFileTypeConstants (Optional) The file type.
sNewBookID Variant (Optional) The ID of the new workbook if data
is associated with the model.
sNewTextID Variant (Optional) The ID of the new text editor that
contains the representation of the model.
Visual Basic Automation Reference
Workspace module
809
G
Applies To: Workspace object
OpenTextEditor Method
This method creates a new text editor and opens a file.
Returns: Returns a reference to the new text window. The return value will be Noth-
ing if the method fails.
Example: Set MyTextEditor = object.OpenTextEdi-
tor("c:\data\mydata.pto", FileFWText)
See Also: OpenWorkbook Method, OpenChart Method, OpenModel Method
Applies To: Workspace object
OpenWorkbook Method
This method creates a new workbook and opens a file.
Returns: Returns a reference to the new workbook. The return value will be Nothing
if the method fails.
Example: Set MyBook = object.OpenWork-
book("c:\data\mydata.pwo", FileFWBook)
See Also: OpenChart Method, OpenTextEditor Method, OpenModel Method
Applies To: Workspace object
Parameter Type (Default) Description
sFile String (Optional) The name of the file to open.
nFileType WnlFileTypeConstants (Optional) The file type.
Parameter Type (Default) Description
sFile String (Optional) The name of the file to open.
nFileType WnlFileType-
Constants
(Optional) The file type.
nHeaders WnlYesNoCon-
stants (WnlNo)
(Optional) If set to WnlYes, the first row of data will
be placed in the column headers.
nConsecDelim WnlYesNoCon-
stants (WnlNo)
(Optional) If set to WnlYes, then consecutive delimit-
ers will be treated as a single delimiter. This parame-
ter only applies to ASCII data files.
sDelim String ("") (Optional) A single character representing the delim-
iter. This parameter only applies to ASCII data files.
sMissing String ("") (Optional) Missing value. Any values matching this
value will have a gray background in the workbook.
nAutoOptions WnlYesNoCon-
stants (WnlYes)
(Optional) This parameter only applies to ASCII data
files.
WinNonlin
Users Guide
810
G
RunScript Method
This method runs a legacy script file.
Remarks: used to run script files from WinNonlin 3 and earlier.
Applies To: Workspace object
Save Method
Saves the workspace to file.
Remarks: If sNewFile is ommitted, then the Filename property is used.
Example: object.Save
See Also: NewWorkspace Method, Load Method, CloseWorkspace Method
Applies To: Workspace object
ShowMsg Method
Displays a message box.
Remarks: This can be useful to pause the processing of a script or show status.
Example: object.ShowMsg("Click OK to continue...")
Applies To: Workspace object
SilentMode Property
Sets or returns whether the application is running in verbose mode.
Remarks: If set to True then all messages will be surpressed. This is helpful when
automating the application so processing does not stop.
Example: object.SilentMode = True
Applies To: Workspace object
TextEditor Property
Read-only property that returns a reference to a text editor object.
Parameter Type (Default) Description
sFile String (Optional) The name of the script to run.
Parameter Type
(Default)
Description
sNewFile String ("") (Optional) If set, the Filename property will be changed
and this will be the new file name for the workspace.
Parameter Type (Default) Description
sMsg String (Optional) The message to display.
Parameter Type (Default) Description
Index Variant (Optional) Index to the text editor collection.
Visual Basic Automation Reference
Workspace module
811
G
Remarks: The index can be an integer or string value. Valid integer values are 1 to the
TextEditorCount. Valid strings are the ID values of the text editors.
Example: Set MyText = object.TextEditor(1)
See Also: Workbook Property, Chart Property, Model Property
Applies To: Workspace object
TextEditorCount Property
Read-only property that returns the number of text editors in the workspace.
Example: nTextEditors = object.TextEditorCount
See Also: WorkbookCout Property, ChartCount Property, ModelCount Property
Applies To: Workspace object
TextEditors Property
Read-only property that returns a reference to the TextEditor collection.
Example: Set TextEditorsCollection = object.TextEditors
See Also: Workbooks Property, Charts Property
Applies To: Workspace object
UnloadApp Method
Unloads the application.
Remarks: The application will not completely unload until all references to applica-
tion objects have been set to Nothing.
Example: object.UnloadApp
Applies To: Workspace object
WindowState Property
Returns or sets the window state of the main window.
Example: object.WindowState = WindowStateConstantsMinimized
Applies To: Workspace object
Workbook Property
Read-only property that returns a reference to a workbook object.
Remarks: The index can be an integer or string value. Valid integer values are 1 to the
WorkbookCount. Valid strings are the ID values of the workbooks.
Example: Set MyBook = object.Workbook(1)
Parameter Type (Default) Description
Index Variant (Optional) Index to the workbook collection.
WinNonlin
Users Guide
812
G
See Also: Chart Property, TextEditor Property, Model Property
Applies To: Workspace object
WorkbookCount Property
Read-only property that returns the number of workbooks in the workspace.
Example: nBooks = object.WorkbookCount
See Also: ChartCout Property, TextEditorCount Property, ModelCount Property
Applies To: Workspace object
Workbooks Property
Read-only property that returns a reference to the workbook collection.
Example: Set BooksCollection = object.Workbooks
See Also: Charts Property, TextEditors Property
Applies To: Workspace object
WorkingDir Property
Returns or sets the current working directory.
Example: object.WorkingDir = "c:\examples"
Applies To: Workspace object
813
Appendix H
References
This bibliography of modeling and related references is organized under of the following
headings.
Deconvolution on page 813
Pharmacokinetics on page 814
Regression and modeling on page 815
Statistics on page 817
Bioequivalence on page 818
Deconvolution
Charter, M.K., Gull, S.F. J Pharmacokinet Biopharm 15, 645-655 (1987).
Cutler, D. J. (1978). Numerical deconvolution by least squares: use of prescribed input func-
tions. J Pharmacokinet Biopharm 6(3): 227-41.
Cutler, D. J. (1978). Numerical deconvolution by least squares: use of polynomials to repre-
sent the input function. J Pharmacokinet Biopharm 6(3): 243-63.
Daubechies, I. (1988). Orthonormal bases of compactly supported wavelets. Communications
on Pure and Applied Mathematics 41(XLI): 909-996.
Gabrielsson, Johan and Daniel Weiner. Pharmacokinetic and Pharmacodynamic Data Analy-
sis: Concepts and Applications, 3rd edition. Stockholm: Swedish Pharmaceutical Press, 2001.
Haskel, K.H., Hanson, R.J. Math. Programs 21, 98-118 (1981).
Iman, R.L., and Conover, W.J. Technometrics, 21,499-509,(1979).
WinNonlin
Users Guide
814
H
Madden, F. N., Godfrey, K. R., Chappell, M. J., Hovroka, R., and Bates, R. A Comparison of
six deconvolution techniques. J Pharmacokinet Biopharm 24: pp. 282 (1996).
Treitel, S. and L. R. Lines (1982). Linear inverse--theory and deconvolution. Geophysics
47(8): 1153-1159.
Verotta, D. (1990). Comments on two recent deconvolution methods. J Pharmacokinet Biop-
harm 18(5): 483-499.
Pharmacokinetics
Brown RD and Manno JE. ESTRIP, A BASIC computer program for obtaining initial polyex-
ponential parameter estimates. J. Pharm. Sci. 67:1687-1691 (1978).
Chan KK and Gilbaldi M. Estimation of statistical moments and steady-state volume of distri-
bution for a drug given by intravenous infusion. J. Pharm. Bioph. 10(5):551-558 (1982).
Cheng H and Jusko W. Noncompartmental determination of mean residence time and steady-
state volume of distribution during multiple dosing, J. Pharm. Sci. 80: 202 (1991).
Dayneka NL, Garg V, and Jusko W. Comparison of four basic models of indirect pharmacody-
namic responses. J. Pharmacokin. Biopharm. 21:457 (1993).
Endrenyi L (editor). Kinetic Data Analysis: Design and Analysis of Enzyme and Pharmacoki-
netic Experiments. Plenum Press, New York (1981).
Gabrielsson J and Weiner D. Pharmacokinetic and Pharmacodynamic Data Analysis: Con-
cepts and Applications, 2
nd
ed. Swedish Pharmaceutical Press, Stockholm (1997).
Gibaldi M and Perrier D. Pharmacokinetics, 2nd ed. Marcel Dekker, New York (1982).
Gouyette A. Pharmacokinetics: Statistical moment calculations. Arzneim.-Forsch/Drug Res.
33 (1):173-176 (1983).
Holford NHG and Sheiner L. Kinetics of pharmacological response. Pharmacol. Ther. 16:143
(1982).
Jusko WJ. Corticosteroid pharmacodynamics: models for a broad array of receptor-mediated
pharmacologic effects. J. Clin. Pharmacol. 30:303 (1990).
Koup JR. Direct linear plotting method for estimation of pharmacokinetic parameters. J.
Pharm. Sci. 70:1093-1094 (1981).
Kowalski, K., and Karim A. A semicompartmental modeling approach for pharmacodynamic
data assessment. Journal of Pharmacokinetics and Biopharmaceutics 23(3):307-322 (1995).
References
Regression and modeling
815
H
Metzler CM and Tong DDM. Computational problems of compartmental models with
Michaelis-Menten-type elimination. Journal of Pharmaceutical Sciences 70:733-737 (1981).
Nagashima R, OReilly RA, and Levy G. Kinetics of pharmacologic effects in man: The anti-
coagulant action of warfarin. Clin. Pharmacol. Ther. 10:22 (1969).
Wagner JG. Fundamentals of Clinical Pharmacokinetics. Drug Intelligence, Illinois (1975).
Regression and modeling
Akaike A. Posterior probabilities for choosing a regression model. Annals of the Institute of
Mathematical Statistics 30:A9-14 (1978).
Allen D and Cady F. Analyzing Experimental Data By Regression. Lifetime Learning Publica-
tions, Belmont, CA (1982).
Bard Y. Nonlinear Parameter Estimation. Academic Press, New York (1974).
Bates DM and Watts DG. Nonlinear Regression Analyses and Its Applications. John Wiley &
Sons, New York (1988).
Beck JV and Arnold KJ. Parameter Estimation in Engineering and Science. John Wiley &
Sons, New York (1977).
Belsley DA, Kuh E and Welsch RE. Regression Diagnostics. John Wiley & Sons, New York
(1980).
Corbeil, RR and Searle, SR. Restricted maximum likelihood (REML) estimation of variance
components in the mixed models, Technometrics, 18:31-38 (1976).
Cornell RG. A method for eitting linear combinations of exponentials. Biometrics 18:104-113
(1962).
Davies M and Whitting IJ. A modified form of Levenberg's correction. Chapter 12 in Numeri-
cal Methods for Non-linear Optimization. Academic Press, New York (1972).
DeLean A, Munson PJ, and Rodbard D. Simultaneous analysis of families of sigmoidal
curves: Application to bioassay, radioligand assay, and physiological dose-response curves.
Am. Journal Physiology 235(2): E97-E102 (1978).
Draper NR and Smith H. Applied Regression Analysis, 2nd ed. John Wiley & Sons, New York
(1981).
Fai, Alex Hrong-Tai and Paul L. Cornelius. Approximate f-tests of multiple degree of freedom
hypotheses in generalized least squares analysis of unbalanced split-plot experiments. J. Sta-
tistical Computing and Simulation, 554: 363-378 (1996).
WinNonlin
Users Guide
816
H
Fletcher, Roger. Practical methods of optimization, Vol. 1: Unconstrained Optimization. John
Wiley & Sons. 1980.
Foss SD. A method of exponential curve fitting by numerical integration. Biometrics 26:815-
821 (1970).
Giesbrecht, Francis G and JC Burns. Two-stage analysis based on a mixed model: Large sam-
ple asymptotic theory and small-sample simulation results. Biometrics, 41:477-486 (1985).
Gill PE, Murray W and Wright MH. Practical Optimization. Academic Press (1981).
Gomeni R and Gomeni C. AUTOMOD: A Polyalgorithm for an integrated analysis of linear
pharmacokinetic models. Comput. Biol. Med. 9:39-48 (1979).
Hartley HO. The modified Gauss-Newton method for the fitting of nonlinear regression func-
tions by least squares. Technometrics 3: 269-280 (1961).
Jennrich RI and Moore RH. Maximum likelihood estimation by means of nonlinear least
squares. Amer. Stat. Assoc. Proceedings Statistical Computing Section 57-65 (1975).
Kennedy WJ and Gentle JE. Statistical Computing. Marcel Dekker, New York (1980).
Koch, GG. The use of nonparametric methods in the statistical analysis of the two-period
change-over design. Biometrics 577-583(1972).
Kowalski, Kenneth G and Karim, Ariz. A semicompartmental modeling approach for pharma-
codynamic data assesment, Journal of Pharmacokinetics and Biopharmaceutics, 23:307-
322(1995).
Leferink JG and Maes RAA. STRIPACT, An interactive curve fit programme for pharmacoki-
netic analyses. Arzneim. Forsch. 29:1894-1898 (1978).
Longley. Journal of the American Statistical Association, 69:819-841(1967).
Nelder JA and Mead R. A simplex method for function minimization. Computing Journal 7:
308-313 (1965).
Parsons DH. Biological problems involving sums of exponential functions of time: A mathe-
matical analysis that reduces experimental time. Math. Biosci. 2:123-128 (1968).
PCNonlin. Scientific Consulting Inc., North Carolina, U.S.A.
Peck CC and Barrett BB. Nonlinear least-squares regression programs for microcomputers. J.
Pharmacokin. Biopharm. 7:537-541 (1979).
Ratkowsky DA. Nonlinear Regression Modeling. Marcel Dekker, New York (1983).
References
Statistics
817
H
Satterthwaite, F. E. An approximate distribution of estimates of variance components. Biomet-
rics Bulletin 2:110-114 (1946).
Schwarz G. Estimating the dimension of a model. Annals of Statistics 6: 461-464 (1978).
Sedman AJ and Wagner JG. CSTRIP, A FORTRAN IV Computer Program for Obtaining
Polyexponential Parameter Estimates. J. Pharm. Sci. 65:1001-1010 (1976).
Shampine LR, Watts HA and Davenport SM. Solving nonstiff ordinary differential equations -
the state of the art. SIAM Review 18: 376-411 (1976).
Sheiner,LB, Stanski, DR, Vozeh, S, Miller, RD, and Ham, J. Simultaneous modeling of phar-
macokinetics and pharmacodynamics: application to d-tubocurarine. Clin. Pharmacol. Ther.
25: 358-371(1979).
Smith MR and Nichols ST. Improved resolution in the analysis of the multicomponent expo-
nential signals. Nuclear Instrum. Meth. 205:479-483 (1983).
Tong DDM and Metzler CM. Mathematical properties of compartment models with Michae-
lis-Menten-type elimination. Mathematical Biosciences 48: 293-306 (1980).
Wald, Abraham. Tests of statistical hypotheses concerning several parameters when the num-
ber of observations is large. Transaction of the American Mathematical Society 54 (1943).
Statistics
Allen, David. private correspondence, 2001.
Clayton, D and Leslie, A. The bioavailability of erythromycin sterate versus enteric-coated
erythromycin base tken immediately before and after food. Int. Med. Res 9:470-477(1981).
Conover, WJ. Practical Nonparametric Statistics (2nd ed.), John Wiley & Sons, New York
(1980).
Dixon WJ and Massey FJ Jr. Introduction to Statistical Analysis, 3rd ed. McGraw-Hill Book
Company, New York (1969).
Koch, G. The use of non-parametric methods in the statistical analysis of the two-period
change-over design. Biometrics 577-584(1972).
Kutner, M. Hypothesis testing in linear models (Eisenhart Model 1). The American Statisti-
cian, 28(3):98-100(1974).
Searle SR. Linear Models. John Wiley & Sons, New York (1971).
WinNonlin
Users Guide
818
H
Steel RGD and Torrie JH. Principles and Procedures of Statistics; A Biometrical Approach,
2nd ed. McGraw-Hill Book Company, New York (1980).
Winer, BJ. Statistical Principles in Experimental Design, 2nd ed. McGraw-Hill Book Com-
pany, New York, et.al. (1971).
Bioequivalence
Anderson and Hauck. A new procedure for testing equivalence in comparative bioavailability
and other clinical trials. Commun. Stat. Theory Methods, 12:2663-2692(1983).
Average, Population, and Individual Approaches to Establishing Bioequivalence. FDA Guid-
ance for Industry. August 1999.
Bioavailability and Bioequivalence Studies for Orally Administered Drug ProductsGeneral
Considerations. FDA Guidance for Industry. October 2000.
Chow and Liu (2000). Design and Analysis of Bioavailablilty and Bioequivalence Studies, 2
nd
edition, Marcel Dekker, Inc.
Schuirmann, Donald. A comparison of the two one-sided tests procedure and the power
approach for assessing the equivalence of average bioavailability. J. Pharcokinet. Biop-
harm.15:657-680 (1987).
Statistical Approaches to Establishing Bioequivalence. FDA Guidance for Industry. January,
2001.
819
Index
Symbols
*.anv, 551
*.bmp, 21
*.exp, 70, 73
*.imp, 54
*.jpeg, 21
*.wmf, 21
*.wsp, 23
A
ABS, 289
Absolute error bars, 134
AggregateVar, 645
AIC. See Akaikes Information Criterion
Akaikes Information Criterion, 413
compartmental modeling, 268
LinMix, 404
Alias
PKS, 466
Alignment
table cells, 198
worksheet cells, 98
ALOG, 289
ALOG10, 289
AlphaTerms(), 645
Ampersand (&), 311
AND, 288
Anderson-Hauck Test, 428
Animal2.pwo, 525
ANOVA, 413
Aovdata.pwo, 536
APPEND, 525, 646
Append
scripting, 525
AppendFilename, 646
AppendFileType, 646
AppendSheet, 647
Area under the curve. See AUC.
ARRANGE, 647
ASCII data files, 21
ASCII models
creating, 298
examples, 291
loading user models, 300
undo, 299
ATAN, 289
ATAN2, 289
Aterms(), 647
AUC, 268
calculation formulas, 235
calculation methods, 230
compartmental modeling, 268
partial area calculations, 236
AutoFileOptions, 648
Automatic sorting, 131
Autoregressive variance, 394
AutoSort, 648
WinNonlin
Users Guide
820
Average bioequivalence, 417, 420
fixed effects, 439
recommended models, 421
setting up, 438
Axes
options, 137
uniform, 137
B
Banded no-diagonal factor analytic, 394
Banded Toeplitz variance, 394
Banded unstructured variance, 394
Bar charts, 130
BEGIN, 322
Bg1.cmd, 527
Bg1.pwo, 516
Bg1-dxg-9.pwo, 518
Bguide1.dat, 521, 530
Bioassay functions, 290
Bioequivalence, 417
average, 438
Bioequivalence Wizard, 437
classification variables, 439
command files, 445
dependent variables, 439
errors, 719
fixed effects (average), 439
fixed effects (pop./individ.), 444
general options, 443
linear model, 420
options, 443, 445
output, 446
population/individual, 444
random effects, 441
regressor variables, 439
repeated variance, 442
sort variables, 439
type, 437
variance structure, 440
weight variables, 439
Bitmaps, 21
BOLUS, 648
Borders
tables without, 203
worksheet cells, 99
Box and whiskers plots, 208
C
C++, 273
Carry along data for like sort levels, 107
CarryData, 648
CASCADE, 649
CaseSensitive, 649
Cell references, 86
Chart Designer, 129
Chart Wizard, 129
Charts, 129
automatic sorting, 131
axis options, 137
axis titles, 136
bar charts, 130
copy and paste, 184
creating, 129
error bars, 133
group variables, 133
histograms, 132
intervals, 137
legend, 136
log, 137
multiple X-Y variables, 131
overlay, 131
page setup, 182
Pharsight Chart Objects, 21
preview, 182
restore positions, 18
saving, 185
saving to graphics formats, 21
scatter plots, 130
sort key title, 136
sort variables, 133
Index
C
821
templates, 182
title, 136
uniform axes, 137
units display default, 36
use group headers, 136
X-Y variables, 130
Classical and Westlake Confidence Inter-
vals, 424
Classification variables
bioequivalence, 439
LinMix, 391
Clayton.pwo, 521, 535
Clearing
cell formats, 89
cell values, 89
units, 127
CloseAll, 649
CMT, 51
CNAMES, 307
Coefficients, 406
COLUMN, 649
COMMAND, 275, 285
Command block, 277
Command files, 309
bg1.cmd, 527
model definition, 310
nca_sort.cmd, 533
Commands, 310
APPEND, 525
BEGIN, 322
command files, 309
CONSTANTS, 317
CONVERGENCE, 319
COPY, 522
DATA, 320
DATE, 318
descriptive statistics, 533
DINCREMENT, 319
DTA( ), 321
EXCLUDE, 524
FINISH, 322
FNUMBER, 314, 320
INCLUDE, 524
INITIAL, 316
ITERATIONS, 320
LOWER, 316
MEANSQUARE, 319
MERGE, 525
METHOD, 319
modeling, 533
NCONSTANTS, 317
NFUNCTIONS, 320
NOBOUNDS, 316
NOBS, 320
NOPAGE, 319
NOPLOTS, 319
NOSCALE, 316
NPARAMETERS, 316
NPOINTS, 319
PKS example scripts, 516
plots, 526
PNAMES, 317
REMOVE, 523
REPLACE, 522
REWIEGHT, 315
SET, 521
SIMULATE, 313
SIZE, 320
SORT, 313, 321
spanning multiple lines, 311
TIME, 318
TITLE, 318
transformations, 529
units, 537
UPPER, 316
URINE, 314
WEIGHT, 315, 322
WTnumber, 315, 322
Xnumber, 313, 322
Ynumber, 313, 322
Comments, 311
comment character, 50
Comparison operators, 288
Compartmental modeling, 247
WinNonlin
Users Guide
822
See also Modeling.
Compiling
Using C++, 305
Using Fortran, 301
Compound symmetry variance, 394
CON(N), 285
ConcCol, 650
Concentration-effect models, 602
COND, 266
CONFIDENCE, 650
Confidence intervals, 208, 267
Confidence limits
Univariate, 267
Configuration
PKS, 465
Connection string, 54
CONSEQDELIM, 650
CONSTANTS, 317
Constrained optimization, 7
Contrasts
degrees of freedom, 388
LinMix, 386, 397
nonestimability, 388
Control stream, 50
CONVERGENCE, 319
Convergence criterion, 263, 414
LinMix, 410
Convolution, 349, 353
COPY, 522, 651
Copying
charts, 184
Correlation matrix, 267
COS, 289
Covariates, 391, 439
Crossover design, 342
CROSSVAR( ), 651
CROSSVARS, 652
Curve stripping, 221
Custom models. See User models.
Custom query builder, 64
Customer support, 10
licensing, 10
user feedback, 11
CUT, 652
D
DABS, 289
DATA, 320, 632
Data, 310
dependencies, 37
file type limitations, 21
file types, 19
merging, 106
out of date flag, 38
sorting, 101
transformations, 102
unlocking, 39
Data variables
compartmental modeling, 250
noncompartmental analysis, 217
DATAN, 289
DATAN2, 289
DATE, 318
DCOS, 289
DCP description, 474
Deconvolution, 348, 349, 356
Defaults
missing value indicator, 34
modeling output, 34
NCA calculation method, 34
units, 36
workbooks, 34
Defect reports, 11
DefinitionFile, 653
Degrees of freedom
LinMix contrasts, 388
LinMix versus PROC MIXED, 413
Satterthwaites approximation, 411
DeleteFiles, 653
Deleting
cells, 91
columns, 91
Index
E
823
rows, 91
worksheets, 92
DELIMITER, 653
DELTA, 654
Dependencies, 37
Dependent variables
bioequivalence, 439
LinMix, 391
NONMEM export, 51
Descriptive statistics, 207
scripting, 533
DestArea, 654
DestCol, 654
Detach, 40
Determining estimability, 373
DEXP, 289
DIFF, 285
DIFFERENTIAL, 275
Differential equations, 4
user models, 283
DINCREMENT, 319
Disable curve stripping, 221
DLOG, 289
DLOG10, 289
DMAX1, 289
DMIN1, 289
DNAMES, 280, 286
DnErr( ), 655
Do, 287
Document manager, 479
DoseFile, 655
DoseUnit, 655
Dosing
command files, 317
constants for ASCII models, 256
dose normalization, 124
noncompartmental analysis, 223
NONMEM export, 51
PKS, 464, 483
regimen, 223, 254
simulation, 456
Down variable, 134
DSIN, 289
DSQRT, 289
DTA, 321
DTA( ), 321
DTA(N), 284
DVID, 51
DZ(N), 285
E
ECOL, 656
Edit bar, 88
Eigenvalues, 268, 405
Else, 287
END, 276, 285, 292
EndCol, 656
EndRow, 656
Engines, 495
scripting language, 490
Enhancement requests, 11
EntireRow, 657
EOM, 276, 286, 292
EQ operator, 288
Error bars, 133
absolute, 134
relative, 134
Error messages, 707
bioequivalence, 719
compartmental modeling, 707
descriptive statistics, 721
LinMix, 719
noncompartmental analysis, 722
scripting, 723
tables, 721
ErrType, 657
Estimates
fixed effects, 405
LinMix, 389, 398
Examples
Examples Guide, 2
scripting, 520
WinNonlin
Users Guide
824
Excel
Excel 4.0 files, 21
files, 21
saving workbooks to Excel, 21
EXCLUDE, 524, 658
Exclude profiles with insufficient data,
226
Excluding
based on criteria, 109
selected cells, 109
EXP, 289
ExportAll, 658
Exporting, 44, 55
NONMEM, 47
ODBC, 69
SAS Transport files, 47
tables, 203
Word export, 44
Word export options, 46
EXTRA, 658
F
F, 284
File types
compatibility, 22
FileMask, 659
Files
ASCII, 21
data file limitations, 21
data files, 19
PKS files, 513
SAS Transport, 47
FileType, 660
Fill-down, 88
Final parameters
confidence intervals, 267
FIND, 660
Find, 93
FINISH, 322
Fixed effects, 375
average bioequivalence, 439
LinMix, 375, 391
parameter estimates, 405
pop./individ. bioequivalence, 444
FNUMBER, 314, 320
FONT, 661
Font format, 98
FontSize, 661
FootnoteFont, 662
FootnoteFontSize, 662
FORMAT, 97
Formatting
tables, 200
worksheet cells, 97
Formulas, 86
operators, 86
FORTRAN, 273, 301
Freezing rows and columns, 101
FUNC, 285
FUNCTION, 275, 662
Function block, 292
Function variable, 278, 279
FUNCTIONS, 307
G
Gauss-Newton algorithm, 6
Hartley modification, 5, 9
Levenberg Hartley modification, 8
Levenberg-type modification, 5
GE operator, 288
Go to, 96
GOTO, 286
Green
scenario icon, 476
Group variables
charts, 133
tables, 192, 193
GroupVar( ), 663
GroupVar( , ), 664
GroupVarBreak( ), 665
Index
H
825
GroupVars, 664
GroupVars( ), 664
GT operator, 288
H
HALT, 665
HEADERS, 665
Hessian eigenvalues, 405
Heterogeneous
autoregressive variance, 394
compound symmetry, 394
Hidden windows, 19
Histograms, 132
intervals, 137
History
"cannot be processed", 41
items logged, 41
worksheets, 40
I
ID variables, 192
IDVar( ), 666
IDVars, 666
If Then Else, 286
Import settings file
ODBC, 55
Importing
ODBC, 53
INCLUDE, 524, 666
IncludeVar( , ), 667
IncludeVars( ), 667
Including
based on criteria, 109
selected cells, 109
Increment for partial derivatives, 262
InData, 667
InData( ), 668
Indirect response models, 605, 608
parameter estimates and bounds, 609
parameters, 608
Individual bioequivalence, 418
INITIAL, 316, 633
Initial parameter estimates, 250
InitialDose, 668
InputLag, 668
Inserting
cells, 91
columns, 90
rows, 90
worksheets, 92
INTERVAL, 669
Intervals, 137
ITERATIONS, 320
Iterations, 264
history, 406
procedure, 4
Iterative reweighting, 315, 326
IV.pwo, 528
J
Join variables
merge data sets, 106
tables, 195
JoinCrossVar( , ), 669
JoinCrossVars, 669
JoinGroupVar( , ), 670
JoinGroupVars, 670
JoinIDVar( , ), 670
JoinIDVars, 671
Joint Contrasts, 387
JPEG files, 21
K
KE0, 671
L
LABEL, 286
WinNonlin
Users Guide
826
Lambda z, 218
LamzFile, 671
LE, 289
Least squares means, 4, 423
LinMix, 383, 399
Legend( ), 672
LegendFont, 672
LegendFontSize, 672
Legends, 136
Licensing
customer support, 10
Linear interpolation rule, 236
Linear Mixed Effects Modeling. See Lin-
Mix.
Linear models, 2
Linear regression, 2
minimization alrorithm, 262
Linear trapezoidal rule, 235
Link models, 602
simultaneous, 612
LinkFile, 673
LinMix, 363
Akaikes criterion, 404
classification variables, 391
coefficients, 406
compared to ANOVA, 413
compared to PROC MIXED, 413
computations, 407
contrasts, 386, 397
convergence criterion, 410
dependent variables, 391
errors, 719
estimability, 373
estimates, 389, 398
fixed effects, 375, 391
fixed effects estimates, 405
general options, 400
Hessian eigenvalues, 405
hypothesis tests, 403
initial variance parameters, 401
iteration history, 406
least squares means, 383, 399
limits and constraints, 390
linear mixed effects model, 366
LinMix Wizard, 389
Newtons algorithm, 408
non-estimable functions, 373
output, 401
output parameterization, 375
parameters, 406
partial tests, 403
predicated values, 405
random effects, 380, 395
regressor variables, 391
REML, 407
repeated effects, 378, 396
residuals, 405
Satterthwaites approximation, 411
Schwarzs criterion, 404
sequential tests, 403
singularity tolerance, 376
sort variables, 391
text output, 401
transformation of the response, 376
variance structure, 378, 393
weight variables, 392
workbook output, 402
X matrix, 368
LLOQ
use when less than LLOQ, 116
LOAD, 673
Loading
a query (ODBC), 62, 69
an export (ODBC), 75
LoadTemplate, 673
LOG10, 289
Logarithmic
axes, 137
interpolation rule, 236
transformation, 102
trapezoidal rule, 236
LOGE, 289
LOWER, 267, 316, 633
LT operator, 288
Index
M
827
M
MaintenanceDose, 674
Marking valid/invalid data, 38
Mathematical operators, 286
MAX, 289
Maximum likelihood estimates, 4
Mean square, 263
MEANSQUARE, 319
MERGE, 525
Merging, 106
scripting, 525
METHOD, 319
Method
scripting language, 490
Michaelis-Menten, 3, 609
Microsoft Excel
table export to, 204
Microsoft Visual C++, 305
Microsoft Word
export, 44
table export to, 203
MIN, 289
Minimization algorithm, 261
MISSING, 674
Missing values
data, 450
default indicator, 34
in NCA parameter estimates, 235
MODEL, 275, 293
Model definition, 310
Model options, 225, 257, 318
convergence criterion, 263
exclude profiles with insufficient data,
226
increment for partial derivatives, 262
iterations, 264
mean square, 263
minimization, 261
model size, 264
number of predicted values, 263
output, 258
output intermediate calculations, 228
PK settings, 261
title, 261
title for NCA, 230
transpose final parameter table, 231,
262
units, 264
weighting for nca, 229
Model parameters, 250
command files, 316
compartmental models, 250
Model properties
compartmental models, 249
dosing, 254
Model size, 264
Model variables
compartmental modeling, 250
noncompartmental analysis, 217
Modeling
compartmental, 247
convergence criterion, 263
data variables, 250
default output, 34
dose normalization, 124
dosing, 254
error messages, 707
initial parameter estimates, 250
iterations, 264
linear models, 2
mean square, 263
minimization alrorithm, 261
model options, 257
model settings, 249
model size, 264
NONMEM export, 47
notation and conventions, 574
number of predicted values, 263
options, 34
output dependencies, 37
output options, 258
PK settings, 261
refreshing output, 38
WinNonlin
Users Guide
828
scaling of weights, 260
scripting, 533
start, 265
stop, 265
troubleshooting, 718
units, 264
weights, 259
Models
concentration-effect, 602
creating ASCII models, 298
indirect response, 605
link, 602
loading, 247
loading ASCII models, 300
Michaelis-Menten, 609
noncompartmental, 216
pharmacokinetic, 575
Pharsight Model Objects, 20
simulatneous link, 612
types, 247
user model templates, 273
user models, 273
Modified likelihood, 414
Multiple charts per page, 183
Multiple linear regression, 3
Multiple profiles in script files, 501
Mydata.pwo, 529
N
Naming
columns, 100
worksheet, 92
NCA. See Noncompartmental analysis.
Nca_sort.cmd, 533
Ncamodel.pmo, 534
NCONSTANTS, 278, 317
NDERIVATIVES, 278, 307
Nelder-Mead, 5
Nelder-Mead simplex, 8
Nested variables, 392
Newtons Algorithm, 408
Next, 288
NFUN, 631
NFUNCTIONS, 278, 320
No Scaling of Weights, 261
NOBOUNDS, 316
NOBSERVATIONS, 279, 320, 632
No-diagonal factor analytic, 394
Noncompartmental analysis, 215
AUC formulas, 235
computational rules, 234
curve stripping, 221
data exclusions, 234
default calculation method, 34
dosing, 223
errors, 722
exclude profiles with insufficient data,
226
Lambda z, 218
missing parameter values, 235
model selection, 216
model variables, 217
output, 226
output intermediate calculations, 228
output options, 226
parameter calculations, 240
parameter names, 233
partial area computations, 236
partial areas, 221
therapeutic response window, 222
therapeutic window calculations, 237
units, 232
weighting, 229
Nonlinear model, 3
Nonlinear regression, 2, 5
methods, 8
NONMEM export, 47
CMT, 51
comment character, 50
control stream, 50
dependent variables, 51
dosing, 51
Index
O
829
DVID, 51
occations, 52
other data items, 51
problem, 50
Non-numeric data
troubleshooting, 15
Nonparametric superposition, 329
NOPAGE, 319
NOPLOTS, 319
NOSCALE, 316
NPARAMETERS, 277, 307, 316, 633
NPOINTS, 319
NSECONDARY, 279, 307
Number format, 97
Number of predicted values, 263
O
Objects
Scripting Language, 490, 494
Occasions, 52
ODBC export, 69
defining an export, 70
export defined, 55
export settings file, 70
loading a saved connection, 57
saving export settings, 73
ODBC import, 53
building a query, 58
connection string, 54
custom query builder, 64
import defined, 55
import settings file, 54
loading a saved connection, 57
save password, 61
saving queries, 61
Watson DMLIMS, 64
Operators, 288
Options, 33
bioequivalence, 443, 445
LinMix, 400
models, 34
NCA model, 225
NCA output, 226
Word export, 46
workbooks, 34
OR, 288
Oral.pwo, 529
Other data items
NONMEM export, 51
Output intermediate calculations, 228
Output titles, 230
Overlay chart, 131
P
P(N), 285
Page setup, 27
charts, 182
Parameter names
noncompartmental analysis, 233
Parameters
LinMix output, 406
Partial areas, 221
computation of, 236
Partial derivatives, 4, 7
increment, 262
Partial tests, 403
Password
PKS, 466
save ODBC password, 61
Patterns format, 99
Percentiles, 208
Performance
PKS, 480
Pharmacodynamic models, 596
Pharmacokinetic models, 4, 8, 575
Pharsight, 9
contact information, 10
customer feedback, 11
technical support, 10
Pharsight Chart Objects, 21
WinNonlin
Users Guide
830
Pharsight Knowledgebase Server. See
PKS.
Pharsight Model Objects, 20
Pharsight Text Objects, 21
Pharsight Workbook Objects, 20
PK settings, 261
PK text output, 266
PK/PD link models, 602
simultaneous, 612
PKS, 1
accessing, 463
alias, 466
configuration, 465
creating scenarios, 477
DCP description, 474
dosing, 464, 483
file format, 513
green icon, 476
load study or scenario, 475
logging on, 465
non-WinNonlin documents, 479
objects, 461
password, 466
performance, 480
red icon, 476
scenario search, 477
scenarios, 463
scripting examples, 516
server, 466
sessions, 463
study, 461
study metadata, 462
time, 462
user name, 466
using with WinNonlin, 461
PLANAR, 267
Plant2.pwo, 526
Plots, 129
scripting, 526
PNAMES, 280, 286, 295, 307, 317
Population bioequivalence, 418
Population/individual bioequivalence, 444
data requirements, 444
fixed effects, 444
Power, 428
Preferred units, 232
Previewing charts, 183
Printing, 25
page setup, 27
print all, 26
print dialog, 25
PrintMulti, 683
PrintMultiAcross, 683
PrintMultiDown, 683
PrintText, 684
Problem
NONMEM, 50
PROC MIXED, 413
Profiles.pwo, 526, 528
Programming Language, 286
PUNIT, 280, 307, 312
Q
Queries
building ODBC queries, 58
R
Random effects
bioequivalence, 441
LinMix, 380, 395
RANK, 266
Ratio tables, 449
Red
scenario icon, 476
Refresh, 38
Refresh All, 39
Regression methods, 8
Gauss-newton algorithm, 8, 9
Regressor variables
bioequivalence, 439
LinMix, 391
Index
S
831
RegVar( ), 684
RegVars, 684
Relative error bars, 134
REMARK, 311
REML, 413
LinMix, 407
Newtons algorithm, 408
REMOVE, 523, 685
RemoveCol, 685
RemoveRow, 685
RenameCol, 686
Repeated
bioequivalence, 442
Repeated effects
LinMix, 378, 396
REPLACE, 522, 686
Replace, 93
Resetting data exclusions, 111
Residuals, 268
RESPONSE, 687
Restore positions, 18
Restricted maximum likelihood
LinMix, 407
Newtons algorithm, 408
REWEIGHT, 315
Rich text files, 21
Rule sets, 114
RUN, 687
RunWordExport, 687
S
S, 268
S(N), 285
SameErrCol( ), 688
SAS Transport file
export, 47
Satterthwaites approximation, 411
SAVE, 688
Save import query, 61
SaveAll, 688
SaveAllPrefix, 689
SaveTemplate, 689
Scaling of weights, 260, 326
Scatter plots, 130
Scenarios, 463
adding non-WinNonlin documents,
479
creating, 477
search, 477
Schwarzs Bayesian Criterion (SBC), 268,
404, 413
Scripting
appending data, 525
copying and pasting data, 521
data manipulation, 521
descriptive statistics, 533
error messages, 723
examples, 520
excluding and including data, 524
loading data files, 521
merging data sets, 525
modeling, 533
PKS, 512
PKS examples, 516
plots, 526
removing a column, 524
removing a range of rows, 523
removing rows based on a value, 523
renaming a column, 522
replacing values in a worksheet, 522
script file (.PSC), 490
script file components, 498
tables, 535, 536
transformations, 529
units, 537
SDK, 75
SearchArea, 689
SECONDARY, 275, 285, 292
Secondary parameters, 269
user models, 283
Select Data for Modeling dialog, 265
Semicompartmental modeling, 335
WinNonlin
Users Guide
832
SEQUENCE, 690
Sequential tests, 403
Server
PKS, 466
SET, 521
Setting preferred units, 264
Show formulas, 34
ShowUnits, 690
Significant digits
tables, 198
Simplex algorithm, 5, 267
SIMULATE, 313
Simulation, 451
comparing dose schemes, 459
dosing, 456
model parameters, 455
Simultaneous PK/PD link models, 612
SIN, 289
Singular or near-singular equations, 6
Singular value decomposition, 6
Singularity tolerance, 376, 415
SIZE, 320
SMOOTHING, 690
SNAMES, 280, 286, 307
SORT, 101, 313, 321, 691
Sort key title, 136
Sort variables
bioequivalence, 439
charts, 133
LinMix, 391
Sorting
worksheet data, 101
SortLevel, 691
SortVar( ), 691
SortVar( , ), 691
SortVars, 692
SortVars( ), 692
SourceCol, 693
Splitting Commands, 311
SQRT, 289
STACKED, 693
Standard error, 267
STAR, 285
START, 275
StartCol, 693
StartRow, 694
STATS, 694
Status code transformations, 111
LLOQ, 116
rule sets, 114
Structure of a model, 274
Study
PKS, 461
SUBJECT, 694
Summary statistics, 207
tables, 197
SummaryVar( ), 694
SummaryVars, 695
SUNIT, 280, 307, 312
T
TAB, 695
Table Wizard, 187
cell alignment, 198
data only, 203
formatting, 200
significant digits, 198
summary statistics, 197
templates, 188
Table1.pwo, 535
Table2.pwo, 536
TableNum, 695
Tables, 187
cell alignment, 198
column alignment, 199
data only, 203
error messages, 721
export to Excel, 204
export to Word, 203
formatting, 200
group variables, 193
join variables, 195
Index
U
833
scripting, 535, 536
significant digits, 198
summary statistics, 197
templates, 188
units display default, 36
TAU, 696
Technical support, 10
licensing, 10
TEMP, 285
Templates
charts, 182
tables, 188
user models, 273
TEMPORARY, 275
Temporary variables, 280
naming, 281
TEMPORARY VARIABLES Block, 281
TerminalLower, 696
TerminalPhase, 696
TerminalUpper, 696
Tests of hypotheses, 403
Text windows
Pharsight Text Objects, 21
Therapeutic response window, 222
Therapeutic window
calculations, 237
TileHorizontal, 697
TileVertical, 697
TIME, 318
TimeCol, 697
TimeRepeat, 697
TITLE, 318, 697
Title, 230, 261
TitleFont, 698
TitleFontSize, 698
Toeplitz variance, 394
TOLERANCE, 698
TRANSFORM, 275, 285
Transform data command, 102
Transformations, 102
LinMix response, 376
scripting, 529
Transpose final parameter table, 34
compartmental modeling, 262
non-compartmental modeling, 231
Trapezoidal rule, 268
default method for NCA, 34
Troubleshooting, 718
loading tabular data, 15
Trust region, 6
Types of models, 247
U
Undo, 95
in ASCII models, 299
UNIFORM, 699
Uniform axes, 137
UNIT, 699
Units
compartmental modeling, 264
converting, 127
display, 120
entering, 126
mass, 122
noncompartmental analysis, 232
options, 36, 121
PKS, 119
preferred, 125
prefixes, 122
scripting, 537
summary statistics, 212
time, 121
volume, 122
Univariate command, 267
UNLOAD, 700
Unlocking derived data, 39
Unstructured variance, 394
Up variable, 134
UpErr( ), 700
UPPER, 267, 316, 633
URINE, 314
Use group headers, 136
WinNonlin
Users Guide
834
User models, 273
command block, 277
command files, 309
compiled, 307
creating an ASCII model, 298
differential equation block, 283
examples, 291
function block, 281
libraries, 290
loading ASCII models, 300
secondary parameters block, 283
starting values block, 282
templates, 273
temporary variables, 280
transform block, 276
WinNonlin variables, 284
User name
PKS, 466
V
Valid data, 38
Variables
charts, 130
group, 133
ID, 192
model variables, 250
model variables for NCA, 217
names, 285
sort, 133
temporary, 280
WinNonlin variables, 284
Variance
autoregressive, 394
banded no-diagonal, 394
Banded Toeplitz, 394
banded unstructured, 394
components, 394
compound symmetry, 394
heterogeneous autoregressive, 394
heterogeneous compound symmetry,
394
no-diagonal factor analytic, 394
Toeplitz, 394
unstructured, 394
Variance structure, 378, 393, 420, 440
bioequivalence, 440
LinMix, 393
types, 394
Variation inflation factor (VIF), 458
W
Warnings and errors, 707
Watson DMLIMS, 54, 64
WEIGHT, 315, 322, 701
Weight
command, 315, 322
variables (bioequivalence), 439
variables (LinMix), 392
Weighted least squares, 315, 325
Weighted summary statistics, 212
Weighting, 325
commands, 314
compartmental modeling, 259
in ASCII models, 327
iterative reweighting, 315, 326
noncompartmental analysis, 229
scaling, 326
scaling of weights, 260
weighted least squares, 325
weights from data file, 326
Windows
hiding, 19
Windows metafiles, 21
WindowState, 701
WinNonlin
defect reports, 11
enhancement requests, 11
Enterprise, 1
options, 33
Professional, 1
Index
X
835
variables in user models, 284
WinNonlin object files, 21
WinNonlin Script File, 490
WITH, 701
Word
export, 44
export options, 46
table export, 203
WordExportFilename, 701
Workbooks, 13
dependencies, 37
missing values, 34
new, 13
operators, 86
options, 34
out of date, 38
Pharsight Workbook Objects, 20
refreshing, 38
saving to Excel, 21
show formulas, 34
status codes, 111
troubleshooting, 15
unlocking, 39
WorkingDir, 702
Worksheets, 14
adding, 14
borders, 99
cell references, 86
deleting, 14
fill-down, 88
find, 93
formulas, 86
go to, 96
history, 40
merging, 106
replace, 93
sorting, 101
transformations, 102
Workspaces, 23
loading, 25
new, 24
saving, 24
WT, 285
WTnumber, 315, 322
X
X, 285
X matrix, 368
XLabelsFont, 702
XLabelsFontSize, 703
Xnumber, 313, 322
XTitle, 703
XTitleFont, 703
XTitleFontSize, 703
XUnits, 704
XVar( ), 704
Y
YLabelsFont, 705
YLabelsFontSize, 705
Ynumber, 313, 322
YTitle, 705
YTitleFont, 705
YTitleFontSize, 706
YUnits, 706
YVar, 706
Z
Z(N), 285
WinNonlin
Users Guide
836