Parameter block

The Parameter block is used to add extra structural parameters to a model.

The Parameter block’s input nodes are labeled S1, S2, and so forth depending on how many Parameter blocks are added to the model. The output node is labeled based on the name given to the parameter.

The input node on the Parameter block can be connected to output nodes on PK compartments, observation blocks, PD blocks, and other parameter blocks. Once an output node is connected, its name cannot be changed.

Insert a Parameter block by selecting Insert > Parameter from the right-click menu.

With the Parameter block selected, type a name for the parameter in the name field.

Check the Sequential PK/PD? box if the PK model is part of a PK/PD model that is being fitted sequentially. This will freeze the PK portion of the model and turn its random effects into covariates. See the “Sequential PK-PD population model fitting” section for more information.

Procedure block

Use Procedure blocks to enter assignment statements, differential equations, and logical statements. Within a Procedure block, functions in the Code tab are executed in the order they are listed, one or more times at each simulation step. For that reason, Procedure blocks are not suitable for counting, storing model status across time, or performing computations at specific times during simulation. Code blocks are case sensitive.

1.  Insert a Procedure block by selecting Insert > Procedure from the right-click menu.

Procedureblockoptions

2.  With the Parameter block selected, type a name for the procedure in the Name field, or use the default.

The Procedure block is labeled Proc1, Proc2, and so forth depending on how many Procedure blocks are added to the model. The output node is labeled based on the name given to the parameter.

3.  In the Code sub-tab, enter any differential equations or PML (Pharmacometrics Modeling Language) statements. See the “Entering procedure block code” section for more information.)

If the statement entered in the Code tab adds a dose point to a compartment, use the Infusions possible? checkbox in the compartment’s Dosepts tab to indicate whether the dose point uses infusions. Selecting this option adds a dosing rate context to the Main Mappings and the Dosing panels.

4.  To add a structural parameter to the Procedure block:

a.  Select the Str. Parameters sub-tab.

b.  Press Add.

c.  In the parameter field, type a name for the parameter.

An input node is added to the Procedure block for each new parameter that is added.

d.  To remove a structural parameter, click the X button next to the name.

Note:    Sequence blocks cannot be entered in a procedure block when working with the graphical model. They can be entered in the textual model, however.

Entering procedure block code

Statements can follow each other on a single line or be set on different lines.

    statement statement … 

The most common type of statement is an assignment, for example:

    x=5+y; 

This statement assigns the variable x the value 5+y. Note that x and y must be valid drug model variables. The semicolon character (;) separating statements is optional.

The statements are inserted in the model, alongside automatically generated statements. For example, define new structural parameters Q and R, and then enter this code in the block:

    deriv(B=-B*Q) 
D=B/R

It is important not to write code that depends on time “t” or other continuously changing variables to equal exact values, such as:

    x=((t==4)?xxx:yyy) 

because this code is executed very frequently, including every time a derivative evaluation is performed. Time “t” takes on many values, along with other continuously changing variables, but cannot be relied on to equal any value, or even to advance monotonically. However, covariates, if not interpolated, use the specific values that they are set to by the input data.

Differential equations can be created only by using deriv statements inside a Procedure block. Note that the variable t, the time variable, can be used inside of a deriv statement. t represents subject time, which is the elapsed time since the first event experienced by the subject.

Also, writing code containing discontinuities is not recommended, e.g.,

    x=((t>=4)?xxx:yyy) 

because x discontinuously changes from xxx to yyy at time 4. Assuming x enters the model in some way, it can cause the ODE solver or the modeling engine to be faced with a discontinuity. If the ODE solver encounters a discontinuity, it responds by adjusting the step size to as small a value as possible to minimize error, which can slow model performance. If the modeling engine encounters a discontinuity, it responds by trying (and failing) to make a continuous model in the region of the discontinuity, resulting in a troublesome fit and possible lack of standard errors. Use the sequence statement in the PML to schedule events when discrete actions can be taken.

Discrete covariate values can be referred to using their number representation. Each value is represented by a whole number, starting with 0 (zero) for the first value listed in the Covar. Type tab, which is in the Parameters tab.

For available logical operators and functions that can be used in statements, see “Supported Operators”, “Supported Math Functions”, and “Pharmacometrics Modeling Language” sections in the PML documentation.


Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.