Code block

Compared to the Procedure block, the Code block allows one to enter any valid Pharmacometrics Modeling Language (PML) statement to include in the model, such as sequence statements (refer to “The sequence and sleep statements” section of the PML Reference Guide). However, structural parameters, fixed effects, and random effects defined in the Code block will not be available in the Parameters tab. In addition, one cannot use the Accept All Fixed+Random button in the Parameters > Fixed effects subtab to update the values of the fixed effects and random effects defined in the Code block to their final estimates. Thus, if a variable/parameter can be defined through some type of block that is designed for such purpose, then we recommend avoiding the use of Code block to do it. For example, for structural parameters introduced in the Code block, one can use the Parameter block to define them instead of entering their associated statements inside the Code block.

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

With the Code block selected, type a name for the code in the Name field, or use the default.

The Code block is labeled Code1, Code2, and so forth depending on how many Code blocks are added to the model. The output node (represented by the small rectangle on the right side of the block) is labeled based on the name given to the variable. It can be connected to the input node (represented by the small rectangle on the left side of the block) on another block to assign a value to the variable associated with this input node.

Press Edit code to modify the PML code to include in the model.

Codeblockoptions

In the field, enter or edit the lines of PML code.

When finished, press Apply changes to save the changes, or Discard to ignore them.

See below for an example where the Code block (named as AbsorptionRate) is used to define the absorption rate, Ka, for a one-compartment model with first-order absorption, where the value of absorption rate is changed from Ka_bChangePt to Ka_aChangePt right after time ALAG3.

Codeblockexample


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