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 including sequence statements (refer to “The sequence and sleep statements” section of the PML Reference Guide). However, the information entered in the Code block will not be available in the Main Mappings panel, Dosing panel, Parameters tab, Input Options tab, or Predictive Check run mode. For example, if a categorical covariate statement is entered in the Code block, then the covariate name will not appear in either the Main Mappings panel or Parameters tab or the Stratify menu in the Predictive Check run mode. 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.

Codeblockoptions

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.

In the field, enter any lines of PML code to include in the model.

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.