Phoenix Ing Language Reference Guide
User Manual:
Open the PDF directly: View PDF .
Page Count: 98
Phoenix® Modeling
Language Reference
Guide
Applies to:
Phoenix WinNonlin® 8.1
Phoenix NLME™ 8.1
Phoenix Modeling Language Version 8.1
Phoenix® WinNonlin®, Phoenix NLME™, IVIVC Toolkit™, CDISC® Navigator, AutoPilot Toolkit™, Job Management System™
(JMS™), Pharsight Knowledgebase Server™ (PKS™), Trial Simulator™, Validation Suite™ copyright ©2005-2018, Certara, L.P. All
rights reserved. This software and the accompanying documentation are owned by Certara, L.P. The software and the accompanying documentation may be used only as authorized in the license agreement controlling such use. No part of this software or the accompanying documentation may be reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or
otherwise, except as expressly provided by the license agreement or with the prior written permission of Certara, L.P.
This product may contain the following software that is provided to Certara, L.P. under license: Formula One® copyright 1993-2018 OpenText Corporation. All rights reserved. Microsoft® .NET Framework copyright 2018 Microsoft Corporation. All rights reserved. Tab Pro
ActiveX 2.0.0.45 copyright 1996-2018, GrapeCity, Inc. All rights reserved. Sentinel™ RMS 8.4.0.900 copyright 2006-2018 Gemalto NV.
All rights reserved. Microsoft XML Parser version 3.0 copyright 1998-2018 Microsoft Corporation. All rights reserved. Websites Screenshot DLL 1.6 copyright 2008-2018 WebsitesScreenshot.com. All rights reserved. Certara, L.P. has agreement to use and redistribute licenses
for the following software: Syncfusion Essential Studio Enterprise 15.4.0.17 copyright 2001-2018 Syncfusion Inc. All rights reserved. Minimal Gnu for Windows (MinGW, http://mingw.org/), copyright 2004-2018 Free Software Foundation, Inc. This product may also contain the
following royalty free software: DotNetbar 1.0.0.24030 (with custom code changes) copyright 1996-2018 DevComponents LLC. All rights
reserved. Xceed zip Library 2.0.116.0 copyright 1994-2018 Xceed Software Inc. All rights reserved. IMSL® copyright 2018 Rogue Wave
Software, Inc. All rights reserved.
Information in the documentation is subject to change without notice and does not represent a commitment on the part of Certara, L.P. The
documentation contains information proprietary to Certara, L.P. and is for use by its affiliates' and designates' customers only. Use of the
information contained in the documentation for any purpose other than that for which it is intended is not authorized. NONE OF CERTARA,
L.P., 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 the documentation 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
This software and accompanying 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 agencies, 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 Certara, L.P., 100 Overlook Center, Suite 101, Princeton, New Jersey, 08540.
Trademarks
AutoPilot Toolkit, IVIVC Toolkit, Job Management System, JMS, NLME, Pharsight Knowledgebase Server, PKS, Phoenix, Trial Simulator, Validation Suite, WinNonlin are trademarks or registered trademarks of Certara, L.P. NONMEM is a registered trademark of ICON
Development Solutions. S-PLUS is a registered trademark of Insightful Corporation. 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. Sentinel RMS is a trademark of
Gemalto NV. Microsoft, MS, .NET, SQL Server Compact Edition, the Internet Explorer logo, the Office logo, Microsoft Word, Microsoft
Excel, Microsoft PowerPoint®, Windows, the Windows logo, the Windows Start logo, and the XL design (the Microsoft Excel logo) are
trademarks or registered trademarks of Microsoft Corporation. Pentium 4 and Core 2 are trademarks or registered trademarks of Intel Corporation. Adobe, Acrobat, Acrobat Reader, and the Adobe PDF logo are registered trademarks of Adobe Systems Incorporated. All other
brand or product names mentioned in this documentation are trademarks or registered trademarks of their respective companies or organizations.
Additional third party software acknowledgements
Software for Locally-Weighted Regression
The authors of this software are Cleveland, Grosse, and Shyu. Copyright © 1989, 1992 by AT&T. Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software
which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software.
This software is being provided “as is”, without any express or implied warranty. In particular, neither the authors nor AT&T make any representation or warranty or any kind concerning the merchantability of this software or its fitness for any particular purpose.
LAPACK
Copyright © 1992-2007 The University of Tennessee. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer listed in this
license in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited
to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if
advised of the possibility of such damage.
NLog
Copyright © 2004-2006 Jaroslaw Kowalski . All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Jaroslaw Kowalski nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited
to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if
advised of the possibility of such damage.
Certara, L.P.
100 Overlook Center, Suite 101, Princeton, NJ, 08540 USA
Telephone: +1.609.716.7900
www.certara.com
Contents
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Certara contact information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 2
Language Structure and Syntax . . . . . . . . . . . . . . . . . . . . . . . . . .13
Modeling project files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Data files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Model files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Column mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
General syntax conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Reserved and user-defined variable names. . . . . . . . . . . . . . . . . . . . . . . . . . 21
Modeling syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Population PK model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Closed-form models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Transit Compartment models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Action code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Math and special functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Dosing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Covariates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Modeling discontinuous events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Discrete and distributed delays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Sequence statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Group statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Sleep statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Time event switching in PML versus WinNonlin ASCII models . . . . . 47
Fixed effect parameter syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Random effect parameter syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Chapter 3
Running NLME Engines in Command Line Mode . . . . . . . . . . . .51
Requirements and installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
PML and multi-processor or multi-core computers . . . . . . . . . . . . . . . 52
Install the executables and examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
v
Phoenix Modeling Language
Reference Guide
Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Run the example models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Basic command line syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Input files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
The lognlmeflags.asc control file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Running QRPEM in command line mode. . . . . . . . . . . . . . . . . . . . . . . . . . . 58
QRPEM control flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Chapter 4
PML Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
Phenobarbital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Column mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
The model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
NONMEM control file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Theophylline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Column mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
The model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
NONMEM control file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
User-defined logistic model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Column mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
The model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
NONMEM control file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Structural parameters and QRPEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Additional examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Multinomial (ordered categorical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Time to event model (exponential) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Time to event model (Weibull). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Emax (Hill) model with exponent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
One-compartment IV bolus population PK . . . . . . . . . . . . . . . . . . . . . . 74
One-compartment IV bolus, two parallel models with common fixed effects75
One-compartment model with sequence. . . . . . . . . . . . . . . . . . . . . . . . . 75
One-compartment model with sleep statement. . . . . . . . . . . . . . . . . . . . 76
One-compartment first-order absorption model, compartment initialized with sequence76
One-compartment first-order absorption, closed-form . . . . . . . . . . . . . . 77
One-compartment first-order absorption with lag time, closed-form . . . 77
One-compartment IV bolus with time-to-event outcome and PK observations78
Appendix A Closed-Form and Matrix Exponent Computations . . . . . . . . . . .79
Closed-form computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Matrix exponent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Appendix B Blocks, Statements, and Operators . . . . . . . . . . . . . . . . . . . . . . .83
Blocks and statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Expressions and operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
vi
Table of Contents
Appendix C Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
Appendix D Supported Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Math functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
vii
Phoenix Modeling Language
Reference Guide
viii
List of Tables
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ix
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 2
Language Structure and Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Dose cycle syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 3
Running NLME Engines in Command Line Mode . . . . . . . . . . . . 51
Engine numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Input files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Chapter 4
PML Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Observed values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Appendix A Closed-Form and Matrix Exponent Computations . . . . . . . . . . . 79
Appendix B Blocks, Statements, and Operators . . . . . . . . . . . . . . . . . . . . . . . 83
Supported statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Supported operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Appendix C Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
More common reserved variable names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Appendix D Supported Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trigonometric functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hyperbolic functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exponential and logarithmic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Error and gamma functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rounding and remainder functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Floating-point manipulation functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Minimum, maximum, difference functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other functions available in math.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Classification macro/functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
91
92
93
93
93
93
94
94
94
95
95
ix
Phoenix Modeling Language
Reference Guide
Comparison macro/functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
x
Chapter 1
Introduction
Phoenix Modeling Language capabilities and Certara contact
information
Phoenix is a software platform that provides a single environment in which to perform individual and
PK and PD modeling.
Phoenix is also designed to work efficiently with other Certara software, including Pharsight Knowledgebase Server™ (PKS).
Phoenix supports model building through a graphical model-building environment, model libraries,
and a text-based modeling language with which users can describe, fit, and simulate models.
The language will support specification of input and/or output data, trial related settings such as dosing and treatment sequence, as well as flexible model definitions for PK/PD and general NLME modeling including survival analysis and modeling of categorical responses.
Phoenix will include the needed structures for seamless integration of modeling with trial simulation
and related analyses. It will draw on established practices in S-PLUS and NONMEM to make it
friendly for users familiar with those software packages.
Certara contact information
Technical Support
Consult the software documentation to address questions. If further assistance is needed, contact
Certara Support through e-mail or our web site.
E-mail: support@certara.com
Web: support.certara.com/support
For the most efficient service, e-mail a complete description of the problem, including copies of the
input data.
User Forum
Get tips and discuss Certara software with other users at:
https://support.certara.com/forums
11
1
12
Phoenix Modeling Language
Reference Guide
Chapter 2
Language Structure and Syntax
This chapter discusses the modeling language syntax and conventions in the following sections:
•
“Modeling project files” on page 14
– “Data files” on page 14
– “Model files” on page 15
– “Column mappings” on page 16
•
“General syntax conventions” on page 20
•
“Reserved and user-defined variable names” on page 21
•
“Modeling syntax” on page 21
– “Closed-form models” on page 23
– “Action code” on page 27
– “Observations” on page 29
– “Math and special functions” on page 37
– “Dosing” on page 38
– “Covariates” on page 38
– “Modeling discontinuous events” on page 39
– “Discrete and distributed delays” on page 40
– “Sequence statements” on page 44
– “Group statements” on page 46
– “Sleep statements” on page 47
– “Time event switching in PML versus WinNonlin ASCII models” on page 47
– “Fixed effect parameter syntax” on page 47
– “Random effect parameter syntax” on page 48
This manual assumes that the reader is familiar with C++ and S-PLUS syntax, conventions, and concepts.
See Appendix B on page 83 for an alphabetized list of commands and functions.
13
2
Phoenix Modeling Language
Reference Guide
Modeling project files
Most modeling projects will use three ASCII files: a data file in *.dat, *.csv or *.txt format, a
*.txt file that maps the model data columns to Phoenix model columns, and a Phoenix model file in
*.mdl or *.txt format. The *.mdl extension is used as a convention to identify PML model files.
– “Data files” on page 14
– “Model files” on page 15
– “Column mappings” on page 16
Data files
The ASCII model data files *.dat, *.csv or *.txt are used for model fitting and the data can be
delimited by a space, a comma, or a tab. The first row should identify the column names, and must be
preceded by ##. For example, the first row of the example Theophylline dataset listed below looks like
this:
## id, wt, dose, time, conc.
Only the period “.” character is an acceptable decimal separator.
Caution:
The column header line in a PML dataset must be preceded by ## or Phoenix will not recognize
the column headers.
Each subsequent row must contain data for each field. Use a period “.” to represent a null value. The
data for the first subject in the example Theophylline dataset thbates.dat are shown below.
thbates.dat
##
xid
1
1
1
1
1
1
1
1
1
1
1
wt
79.6
79.6
79.6
79.6
79.6
79.6
79.6
79.6
79.6
79.6
79.6
dose
4.02
4.02
4.02
4.02
4.02
4.02
4.02
4.02
4.02
4.02
4.02
time
0
.25
.57
1.12
2.02
3.82
5.1
7.03
9.05
12.12
24.37
yobs
.74
2.84
6.57
10.5
9.66
8.58
8.36
7.47
6.89
5.94
3.28
Dataset row limitations:
The vast majority of memory is allocated and de-allocated dynamically as needed. In most cases,
peak total memory demands for the Phoenix engines are easily accommodated within the memory
available on modern computers (typically at least one gigabyte of memory per processor). However,
there are still a number of static limits on model parameters as follows.
14
•
Maximum number of subjects = 120,000 (This limit applies to all engines except the nonparametric engine, where the maximum number of subjects is 1000.)
•
Maximum number of observations per subject = unlimited (See limit on total number of observations below.)
•
Maximum total number of observations = 480,000
Language Structure and Syntax
Modeling project files
2
•
Maximum number of thetas (fixed effects) = 1000 (This includes both fixed effects that are frozen to a user-specified value, as well as free fixed effects that are included in the likelihood optimization, which is given below as 401.)
•
Maximum number of etas (random effects) = 101 (This is also the maximum dimension of the
Omega matrix in the diagonal case. Although, if Omega has a full or partial block structure, the
maximum dimension will be less (see remarks below for free parameters).)
•
Maximum number of free parameters to be optimized = 401 (This includes both free fixed
effect, residual error model, and Omega parameters. Only non-zero Omega parameters on and
below the diagonal are counted against this limit. Thus a full block matrix with Neta random
effects will consume Neta*(Neta+1)/2 of these parameters, while a diagonal matrix will only consume Neta parameters. Omega matrices with a block diagonal structure will fall somewhere in
between as determined by the particular block structure.
•
Maximum number of QRPEM samples = no limit (Large values (e.g., > 100,000) may cause difficulties with total static + dynamic peak memory demands. Typical values of QRPEM sample size
range between 300 and 10,000 and should cause no problems.
•
Maximum number of iterations = 10,000.
•
Maximum number of covariate categories or occasions = 40.
Depending on the available memory and actual combination of model and run parameters, it is possible for very large models technically within the above static limits to require more dynamically allocated memory than is available. However, this should be an extremely rare occurrence and the
overwhelming majority of population NLME models should easily fit.
Model files
The Phoenix model file is an ASCII text file that contains the model definition statements. It must follow the general form:
mdl(variables){
statements
}
where mdl is the assigned model name. All models are called test by default, but users can rename
them. The (variables) parentheses are normally empty (), but they can contain a list of variables when the model is used in trial simulation. See “General syntax conventions” on page 20 and
“Modeling syntax” on page 21 for details of the available statements.
The model file for the Theophylline example is shown below. See “Modeling syntax” on page 21 for an
annotated example.
fm3theophx.mdl
fm1theo(){
# Theophylline model example coding
# One compartment model with first order absorption
# Single dose at time=0, explicit concentration prediction formula
covariate(dose,time)
fixef(
tvlKa = c(, 0.5,)
tvlKe = c(, -2.5,)
tvlCl = c(, -3.0,)
)
ranef(
diag(nlKa, nlCl) = c(1.0 1.0)
)
15
2
Phoenix Modeling Language
Reference Guide
stparm(
Ka = exp(tvlKa + nlKa)
Ke = exp(tvlKe)
)
V = Cl/Ke
cpred = dose
* Ka
/ (V * (Ka - Ke))
* (exp(-Ke * time) - exp(-Ka * time))
error (eps1 = c(.5))
observe(cObs = cpred + eps1)
}
This is an example model file of a well-known model, and it shows how to code an explicit closed-form
single-dose solution. Note that any text string that is initiated by '#' is treated as a comment and does
not affect model execution. Later examples show how to create models using differential equations,
which are more adaptable to multiple dosing regimens and to trial simulation.
The example above shows a style in which indentation is used consistently throughout. This makes
the model self-outlining for readability, and indicates a careful discipline, which makes errors less
likely.
Including files in the generated C code
If one or more of the following statement appears in the PML outside of the model definition:
include(“MyIncludeFile.h”)
test(){ # model definition
…
}
where MyIncludeFile.h is the name of any C-style include file (enclosed in double quotes), it
results in the following code being inserted near the top of the generated C file Model.c:
#include(“MyIncludeFile.h”)
This can be useful for purposes such as allowing access to additional functions that a user might
include in the compile-and-link step for models.
Column mappings
The column mapping file is an ASCII text file (*.txt) that contains a series of statements that define
the association between model concepts and columns in a dataset:
id(subject_id_column_name)
Example:
id(SubjectID)
says that “SubjectID” is the data column signifying the subject identifier. SubjectID is not used by
Phoenix, but the column mapping is still required. It is acceptable to map to a nonexistent column,
such as: id(zzzDummyID).
time(time_column_name)
Example:
time(T)
says that T is the data column signifying time. The time values can be either simple decimal numbers, or they can be in hh:mm[:sec] format, with an optional “AM” or “PM”. Note that 12:06AM =
16
Language Structure and Syntax
Modeling project files
2
0:06 = 0.1, and 1:30PM = 13:30 = 13.5. This formate works for hours, but it does not imply any
particular time units are being used. The AM and PM suffixes can be either lower or upper case.
Normally, time increases monotonically from one row to the next within each subject. If it does
not, an error message is generated. However, if there is a reset column, time is allowed to be
reset when that occurs. Also, if the /sort option is sent to the engine, data is automatically
sorted by subject ID and time, so data does not have to be initially ordered.
reset(reset_column_name = c(lowvalue, highvalue))
Example:
reset(RESET = c(3, 4))
says that RESET is the data column signifying a resetting of subject time. If the value in the reset
column is between three and four inclusive, time is allowed to be reset on that row. Also, all compartments in the model are reset to their initial values.
date(date_column_name[, format string [, century base]])
Examples:
date(DATE)
date(DATE, mdy)
date(DATE, mdy, 1980)
says that DATE is the data column signifying the date. The default format of the date is monthday-year with arbitrary separators. If two digit years are given, they are assumed to be between
1980-2079, which is the default.
covr(covariate_name <- column_name)
Example:
covr(W <- BW)
says that BW is the data column signifying the model covariate W. If the model contains covariate
variables, then every covariate must be mapped in this way, or else an error message is generated.
fcovr(covariate_name <- column_name)
Example:
fcovr(W <- BW)
fcovr is identical to covr, except for the handling of covariate value changes. A covariate is set
whenever it has any non-null value in a data record. Normally if a covariate such as bodyweight
(BW) is set to value BW1 at time T1, and another value BW2 is set to a subsequent time point T2,
the second value BW2 holds during the interval (T1,T2), so it is carried back in time. Similarly,
BW1 holds at time T1 and during the period extending back from T1 to T0, the closest previous
time where the covariate is set.
If fcovr is used, the first value BW1 holds during the forward interval (T1,T2), and gets reset
to BW2 at time T2. However, if the covariate is interpolated, it doesn't matter if covr or fcovr
are used, because the value is linearly interpolated.
obs(observation_variable_name <- column_name)
Example:
obs(cObs <- Conc)
says that Conc is the data column signifying the model covariate W. Use the obs mapping for all
observation types such as observe, multi, count, event, and LL.
17
2
Phoenix Modeling Language
Reference Guide
Example:
obs(cObs <- Conc, bql = BQL)
also says that the data column BQL contains the flag specifying that the observed value is less
than or equal to the value in column Conc. To use this feature, it is also necessary that the BQL
option is used in the obs statement in the model.
mdv(mdv_column_name)
Example:
mdv(MDV)
says that MDV is the data column signifying “missing data values” for any observation. If this column is present, then on any given row it specifies if there are any missing observations on that
row. If the MDV value is 0 (zero) or “.”, then the observation on that row is present, otherwise it is
missing.
dose(dosepoint_name <- column_name)
Example:
dose(A1 <- Dose)
says that Dose is the data column signifying the amount of drug administered to dosepoint A1.
Example:
dose(A1 <- Dose, Rate)
also says that data column Rate specifies the infusion rate associated with the dose. If the rate
is zero or unspecified, then the dose is a bolus. The concepts “bolus” and “infusion” are not limited to the central compartment, but can apply to a dosepoint on any compartment, including an
absorption compartment.
There are also the statements dose1 and dose2, whose syntax is identical to dose. These
match up with the dosepoint1 and dosepoint2 statements in the model. This is because
there can be more than one dosepoint with the same name, so multiple dosepoints are referred to
by sequential numbers, such as dosepoint 1 and dosepoint 2. dose can be used as a synonym
for dose1, and dosepoint can be used as a synonym for dosepoint1.
ss(ss column_name, dose_cycle_description)
Examples:
ss(SS, 10 bolus(A1) 24 dt)
ss(SS, Dose bolus(A1) II dt)
ss(SS, 10 bolus(A1) 16 dt 10 bolus(A1) 8 dt)
says that SS is the data column that brings the model to steady-state. On a given row, if the value
in the SS column is other than 0 (zero) or “.”, the model is brought to steady state by running the
dose cycle description as many times as necessary.
ss(SS, 10 bolus(A1) 24 dt)
In the above example, the dose cycle is “administer 10 units of drug in a bolus to dosepoint A1,
and then wait 24 time units.” The dose cycle description has a very simple syntax in reverse polish notation (RPN). the syntax is:
Table 2-1. Dose cycle syntax
18
Option
Definition
number
provide a number for an ensuing operation.
column-name
provide a column name for ensuing operation.
bolus (dosepoint)
give the previous number as a bolus to a dosepoint.
Language Structure and Syntax
Modeling project files
2
Table 2-1. Dose cycle syntax
Option
Definition
dt
sleep for the length of time of the preceding number
inf(dosepoint)
take the previous two numbers as an amount and a rate and
give an infusion to a dosepoint.
bolus2, inf2
same as bolus and inf, but for dosepoint2.
value op value
simple arithmetic operators. op = +, -, *, /, ^.
When defining a dose cycle, there must be at least one dt statement. In general, a dt statement
should come at the end of the cycle, so that any infusions or time lags in the cycle finish before
the start of the next cycle. If a dose occurs on the same data row as an ss statement, then the
model is first brought to steady state, and then the dose is administered.
addl(ss_column_name, dose_cycle_description)
Examples:
addl(ADDL, 24 dt 10 bolus(A1))
addl(ADDL, II dt Dose bolus(A1))
says that ADDL is the data column signifying additional doses. On a given row, if the value in the
ADDL column is other than 0 (zero) or “.”, then additional dose cycles are given according to the
dose cycle description.
The syntax of the dose cycle description is the same as for ss. The dt statement should come
first in the dose cycle, since ADDL is usually specified on the same row as a dose, and it indicates
follow-on doses.
table(
[optional_file]
[optional_dosepoints]
[optional_covariates]
[optional_observations]
[optional_times]
variable_list
)
Example:
table(file="foo.csv"
time(0,10,seq(2,8,0.1))
dose(A1)
covr(BW)
obs(Conc)
BW, C, cObs, V, Ke
)
says a table is generated in file foo.csv, which consists of the variables BW, C, cObs, V, and
Ke, whose values are generated at times 0, 2, 2.1,… 7.9, 8, and 10. (Note that the seq operator
specifies a sequence of numbers, so seq(60,80,5) is shorthand for “60, 65, 70, 75, 80”). Values are also generated at the times of observations of Conc, when BW changes, and when a
dose is given to A1. The times do not need to be specified in order, because they are automatically sorted. If multiple table statements are used, then multiple tables are generated.
19
2
Phoenix Modeling Language
Reference Guide
The following are the contents of a column mapping file for the Theophylline model example:
colstheo.txt
id(xid)
covr(dose<-dose)
covr(time<-time)
obs(cObs<-yobs)
General syntax conventions
•
Variable names are case sensitive and cannot contain special characters such as a period “.”.
They can contain an underscore “_”, but if they do they are not compatible with S-PLUS syntax.
The first character of a variable name cannot be an underscore “_”.
•
Column names are case sensitive and can contain special characters. However, if a column
name contains a blank space, the data must be given in CSV format, and a special argument, /
csv, must be given to the engine.
•
Line boundaries are not significant. Statements can span multiple lines, except for comments.
Characters that denote comments include.
# comment... end-of-line (S-PLUS convention)
/* comment... */ (multi-line, non-nesting, C convention)
// comment... end-of-line (C++ convention)
•
Block delimiters: { …} (curly brackets, S-PLUS convention)
•
Statement delimiter: An optional semicolon (S-PLUS convention)
•
Sub-statement delimiter: An optional comma
•
Assignment operators:
“=” sign (S-PLUS convention)
“<-” (S-PLUS convention)
•
Declaration of variables: Variable types are double precision so scoping is not needed (S-PLUS
convention). Variables are of two types:
– Declared variables are introduced by a declaration, such as deriv or real. These can be
changed at points in time, such as in sequence statements.
– Functional variables are introduced by being assigned at the top level of a model, such as C
= A1/V1. They are regarded as being computed “all of the time.”
20
•
Model member reference: Models inherently act as structure. “$” is the model component reference operator (S-PLUS convention)
•
Although the Phoenix Modeling Language uses the real variable for designating real numbers,
double is also acceptable.
Language Structure and Syntax
Reserved and user-defined variable names
2
Reserved and user-defined variable names
All of the variable names in the Phoenix Modeling Language can be user-defined. However, some
variable names are considered to be reserved for syntactical reasons. These words appear in the
model code as blue text.
The C++ runtime and math libraries use several reserved variable names. These names are listed in
Appendix C, “Reserved Words”. However, users are able to define the C++ runtime and math variable
names in any way they need.
Modeling syntax
•
“Population PK model” on page 21
•
“Closed-form models” on page 23
•
“Transit Compartment models” on page 25
•
“Action code” on page 27
•
“Observations” on page 29
•
“Math and special functions” on page 37
•
“Dosing” on page 38
•
“Covariates” on page 38
•
“Modeling discontinuous events” on page 39
•
“Sequence statements” on page 44
•
“Sleep statements” on page 47
•
“Time event switching in PML versus WinNonlin ASCII models” on page 47
•
“Fixed effect parameter syntax” on page 47
•
“Random effect parameter syntax” on page 48
Population PK model
The following example demonstrates the syntax for defining a population PK model.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mymodel(){
## STRUCTURAL MODEL SECTION
deriv(aa = - aa * ka)
deriv(a1 = aa * ka - a1 * cl/v)
dosepoint(aa)
c = a1 / v
## PARAMETER MODEL SECTION
stparm(
ka = tvKa * exp(nKa)
cl = tvCl * exp(nCl)
v = tvV * exp(nV)
)
fixef(
tvKa = c(, 10,)
tvCl = c(, 5,)
tvV = c(, 8,)
21
2
Phoenix Modeling Language
Reference Guide
17
18
19
20
21
22
23
24
)
ranef(
diag(nKa, nCl, nV) = c(1.0, 0.5, 0.6)
)
## ERROR MODEL SECTION
error(eps1 = 0.01)
observe(cObs = c + eps1)
}
Lines 1-24 define a model called “mymodel.” It is a one-compartment, first-order model parameterized by clearance and volume. The model statements can be roughly grouped into sections for structural, parameter, and error models. The model contains several user-defined and reserved names.
Line 3 gives the differential equation for the absorption compartment. It is read as “the derivative of
aa is -aa * ka.” The variable aa represents the amount of the drug in the absorption compartment.
Line 4 gives the differential equation for amount in the central compartment, a1.
Important Note: PML works best when the right-hand-side of each differential equation has no
time-discontinuities. An example of a system which is time-discontinuous is:
deriv (a1 = -a1*cl/v)
cl = (t < t1 ? cl1:cl2)
This is time-discontinuous because clearance jumps at time t1 from cl1 to cl2 and it appears
on the right-hand-side of the differential equation for a1. This has the effect of causing the ODE
solver to step back and forth over time t1, in ever smaller steps, attempting to reduce its error. It
is much better to use the sequence statement (explained below), which can run the ODE solver
up to particular times (called change points), then perform some discontinuous modifications to
the model and run the ODE solver forward again. In fact, if Matrix Exponent is requested, it will
not run this code. It will switch to a different solver, because it requires that the system be not only
continuous, but linear between change points.
The use of t, representing time since the subject began processing, is discouraged, because it is
most often used in the above manner.
Line 5, the dosepoint statement, says that aa, the absorption compartment, can receive doses. If the
central compartment can also take doses, the model can include an additional dosepoint statement.
Line 6 is a simple assignment statement saying that concentration c in the central compartment is
equal to the amount in the central compartment a1 divided by volume v. This quantity is related to the
observed quantity in line 23.
Lines 8-12 identify the structural parameters and their associations with the fixed and random effects.
If a model is used for single-subject estimation, only the fixed effects are estimated. The model can
include any number of stparm statements. Structural parameter statements should only include fixed
effects, random effects, and covariates. They should not include variables that are evaluated as
assignment statements. Structural parameter statements are executed before anything else and
are only re-executed during a given iteration if a covariate changes, so any variables from assignment statements will be undefined on the initial execution of the stparm statements, possibly leading
to model failure.
Lines 13-17 identify the population fixed effect parameters (thetas). It is recommended that a consistent naming convention is used to make the model more easily understood by others. In this example,
variables representing typical values start with the letters “tv,” followed by a capitalized variable name,
such as tvCl for clearance or tvV for volume. The model can include any number of fixed effect
statements.
22
Language Structure and Syntax
Modeling syntax
2
After each fixed effect is an optional assignment, providing either a single number representing the
initial value of the parameter or a list of three numbers representing a lower bound, an initial value,
and an upper bound, in that order.
If the assignment is used, then the initial estimate must be provided. The lower and upper bound
values can be omitted, but the order must be maintained by using blank spaces and commas as
delimiters. The correct syntax is:
tvA=c( , 1, )
Lower boundary
Upper boundary
(empty)
(empty)
Initial estimate
If one value is provided it is assumed that the lower and upper boundaries are not being supplied, but
the syntax must be correct. For example, tvA=c(1) does not work. However, users can omit the
parenthesis and use tvA=1, and the PML assumes that one is the initial value assigned to the
parameter.
Lines 18-20 identify the random effects (etas). In this model, there are three random effect variables
grouped into a single block, which causes a diagonal omega matrix to be estimated. The initial value
of the omega matrix is given as a list of numbers. Multiple blocks are supported. The model can
include any number of ranef statements.
Assignment statements are performed in the order that they are displayed in the model. Otherwise,
the statement order is flexible.
Line 22 identifies that there is an observational error variable (epsilon) called eps1, and its initial estimate of standard deviation is given. Supplying the initial estimate of standard deviation is optional.
Models can include multiple error variables, but only one per observe statement.
Additional error variables are converted internally so that:
observe(Yobs = Y*(1+eps1)+eps2); error(eps1); error(eps2)
is equivalent to:
observe(Yobs = Y*(1+eps1)+eps2*eps1); error(eps1); fixef(eps2=c(0,1,))
Line 23 specifies the observed quantity cObs and says it is equal to the predicted concentration c
plus the error variable. The expression must contain one and only one error variable. Various PK and
PD error models can be expressed in this way.
Only a single error variable can be used in an observe statement such as the one on line 23. Compound residual error models for any given observation, such as mixed additive and proportional, must
be built using a combination of fixed effects and a single error variable rather than multiple error variables.
For example, observe(cObs=c*(1+eps1)+eps1*scale1)is correct and
observe(cObs=c*(1+eps1)+eps2) is not correct.
Closed-form models
The PML contains built-in support for closed-form models with up to three compartments, and with
optional first order input, optional lag time, and optional bioavailability. The models are implemented
recursively so they can handle any combination of dosing scenarios.
Closed-form example (micro-constant parameterization):
cfMicro(A1, Ke)
Specifies a 1-compartment model. A1 is the amount in the central compartment, and Ke is the elimination rate parameter.
23
2
Phoenix Modeling Language
Reference Guide
cfMicro(A1, Ke, K12, K21)
Specifies a 2-compartment model, same as the 1-compartment model, but with two additional parameters K12 and K21.
cfMicro(A1, Ke, K12, K21, K13, K31)
Specifies a 3-compartment model, same as the 2-compartment model, but with two additional parameters K13 and K31.
cfMicro(A1, Ke, first = (Aa = Ka))
Specifies first-order input to any of the models above. Aa is the amount in the absorption compartment, and Ka is the absorption rate.
Closed-form example (macro-constant parameterization, WinNonlin-compatible):
cfMacro(A1, C1, A1Dose, A, Alpha, strip=A1Strip)
cfMacro(A1, C1, A1Dose, A, Alpha, B, Beta, strip=A1Strip)
cfMacro(A1, C1, A1Dose, A, Alpha, B, Beta, C, Gamma, strip=A1Strip)
Specifies 1, 2, and 3-compartment models, in which observed concentration C1 is modeled as the
exponential sum A*exp(-t*Alpha)+B*exp(-t*Beta)+C*exp(-t*Gamma). A1 is the dosing target, but is not a variable that can be referred to in the model. A1Strip is the name of a covariate specifying the “stripping dose” used to fit the model. The meaning, for example in the 2compartment case, is that at the time of initial dose, C1=(A+B)=A1Strip/V where V is not a
parameter in the model. V is implicitly equal to A1Strip/(A+B). A1Dose is a variable that records
the initial bolus amount. If the optional argument strip=A1Strip is not given, the initial bolus
amount is used as the stripping dose. The model can be used with any dosing sequence, but it is an
error if there is no specified stripping dose and no initial bolus.
cfMacro(Aa, C1, AaDose, A, Alpha, Ka, strip=A1Strip)
This model is the same as above except for the additional final parameter Ka, signifying first-order
absorption. In this case, the model without first-order absorption is convolved with the one-term firstorder absorption term, resulting in the final model. Everything else is the same as above.
Closed-form example (macro-constant parameterization, simple form):
cfMacro1(A, Alpha)
Specifies a 1-compartment model. A is the amount in the central compartment, and Alpha is the
elimination rate parameter. It can be used with any dosing sequence, but its response to a bolus dose
is A = D*exp(-t*Alpha).
cfMacro1(A, Alpha, B, Beta)
Specifies a 2-compartment model. A is the amount in the central compartment. It can be used with
any dosing sequence, but its response to a bolus dose is D*[(1-B)*exp(-t*Alpha) +
B*exp(-t*Beta)].
cfMacro1(A, Alpha, B, Beta, C, Gamma)
Specifies a 3-compartment model. A is the amount in the central compartment. It can be used with
any dosing sequence, but its response to a bolus dose is D*[(1-B-C)*exp(-t*Alpha) +
B*exp(-t*Beta) + C*exp(-t*Gamma)].
cfMacro1(A, Alpha, first = (Aa = Ka))
Any of the above models can be converted to first-order absorption by putting the following after the
other arguments.
, first = (Aa = Ka)
Aa is the amount in the absorption compartment, and Ka is the absorption rate. As above, A is the
amount in the central compartment. It can be used with any dosing sequence, and it allows dosing to
both Aa and A. (The model actually is two models superimposed, one is the base model, and the
other is the base model convolved with a first-order model.)
24
Language Structure and Syntax
Modeling syntax
2
Transit Compartment models
For modeling a time-delay as a sequence of transit compartments, there is the “transit” statement:
transit(
,
,
[, max = nnn]
[, in = ]
[, out =
Source Exif Data:
File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
PDF Version : 1.6
Linearized : Yes
Author : ladams
Create Date : 2018:05:03 08:39:13Z
Job Ref : pml_reference
Modify Date : 2018:05:03 08:47:04-05:00
Language : en
XMP Toolkit : Adobe XMP Core 5.4-c005 78.150055, 2012/11/19-18:45:32
Creator Tool : FrameMaker 12.0
Metadata Date : 2018:05:03 08:47:04-05:00
Producer : Acrobat Elements 15.0 (Windows)
Format : application/pdf
Title : Phoenix Modeling Language Reference Guide.book
Creator : ladams
Document ID : uuid:3c6ac7d2-0bc8-43f6-bf55-e29bcc190b87
Instance ID : uuid:c0d97d1f-2eef-4ebe-b1d6-1a0fead308c1
Page Mode : UseOutlines
Page Count : 98
EXIF Metadata provided by EXIF.tools