The Rule Set panel allows the mapping of a BQL rule set to the BQL object or defining a new BQL rule set using the internal BQL Rule Set worksheet. See “General BQL rules” for more information on BQL rules.
Select Rule Set from the list in the Setup tab, then check the Use internal BQL Rule Set box.
Or
Right-click the BQL Rules folder in the Object Browser and select New > Rule Set:
In the Nonnumeric Code cell, enter the status code to be transformed.
If the transformation is the same regardless of whether the status code occurs before or after Tmax or is repeated, it is considered an unconditional substitution. An unconditional substitution is the same as a REPLACE ALL function within the column mapped to Concentration. If the transformation depends on the status code’s position relative to Tmax or whether the code is repeated in consecutive observations, it is a conditional substitution.
For unconditional substitutions, enter the value with which to substitute the status code in the Unconditional Substitution field.
For conditional substitutions, leave the Unconditional Substitution cell blank and enter values in the subsequent 4 - 5 columns.
Conditional substitutions are based on being able to identify a Tmax (time when the maximum concentration is observed within a profile) and its corresponding concentration (Cmax). The first four parts of a conditional substitution need to be defined but the fifth substitution is optional and not applied if left empty. The tool always sorts by the Sort variables first, then by Time, after which the rule is applied to the Concentration:
Before Tmax: Value for any status code that occurs before Tmax.
After Tmax: Value to use for any status code that occurs after Tmax and is neither followed nor preceded by the same status code (i.e., the value is isolated).
First of consecutive after Tmax: Value for any status code that occurs after Tmax and is followed but not preceded by the same status code (i.e., this value is assigned to the first of those contiguous observations).
After First of Consecutive after Tmax: Value for any status code that occurs after Tmax and is preceded by the same status code (i.e., this value is assigned to all status codes except the first of those contiguous observations).
All Entries After 2 Consecutive after Tmax [Optional]: Value for any status code that occurs after Tmax and is preceded by two identical observations (i.e., the value assigned to all trailing observations (status codes or values) except the first and second of those contiguous observations). This substitution is optional and should be left blank if one does not wish to apply it.
Any entry that is not equal to the non-numeric code (including blanks and missing values) breaks the consecutive assessment. These should be removed prior to applying conditional substitutions if the consecutive rule should ignore them.
Tmax is considered the maximum value in the column concentration within unique combinations of sort variables (typically subject). If there is more than one Tmax within a profile, the first Tmax is used for the conditional substitution.
Conditional substitution rules are only applied if there is at least one numerical value in the column mapped to concentration. For example, if all the values within a profile are equal to the non-numeric code (e.g., BQL) then the resulting column will present blank data for the profile. However, if there is an unconditional substitution beforehand then the results will present the original values in the column mapped to concentration (e.g., BQL).
Check the Use When < LLOQ box to transform numeric values that are less than the LLOQ as though they contained the status code.
As an example, if the unconditional substitution is that BQL non-numeric code should be set to zero, the LLOQ is set to 0.5 and the Use When < LLOQ box is checked, any concentration equal to BQL and any concentration less than 0.5 will be set to zero.
This option can be used with conditional and unconditional substitutions, but an LLOQ needs to be defined either by entering a static value in the rule or by mapping a column with these values to the LLOQ column and only one non-numeric code can be assigned.
If a profile has concentration values but all of those are < LLOQ a conditional substitution will consider the first value in the concentration column to be tmax and the substitution will take place based on this assessment. In other words, the first concentration will be set to substitution for “first consecutive” and the following concentrations will be set to the value for the “after first consecutive.”
Check the Set to LLOQ and censor box to set the resulting concentration cell to the LLOQ value (the static value or the value from the LLOQ mapped column). A column named CObsBQL is created in the output.
This substitution is mutually exclusive from the other existing substitutions (conditional and unconditional), therefore only one type of substitution can be used for each rule.
The cell that is modified by the censoring substitution (i.e., set to LLOQ value) gets a corresponding value of one for CObsBQL; if no substitution took place, then a value of zero is assigned to CObsBQL. The values assigned to the censored column CObsBQL are either zero or one. If the option of Use When < LLOQ is checked in conjunction with the censoring substitution, then any numeric value less than LLOQ is set to the LLOQ value, and the censoring flag is set to one.
The censoring substitution option is designed to integrate with Maximum Likelihood (NLME) models so that a BQL results worksheet with a CObsBQL column can be used as input by the Maximum Likelihood object by checking the BQL? box and mapping the BQL CObsBQL column to the CObsBQL context in the Main Mappings panel. The CObsBQL column can contain two categories of values: non-zero (censored) or zero (non-censored). If a concentration value is marked as censored (CObsBQL<>0), it means that the true value of the observation is unknown but not greater than the observed value (e.g., LLOQ), then the cumulative distribution function for the normally distributed error is used to calculate the likelihood. If a concentration value is flagged as non-censored, then the probability density function is used to calculate the likelihood.
Note: Maximum Likelihood models with censored data (BQL? option) use the log of the probabilities between 0 and the censored number in the log likelihoods. If the censoring numbers are small, the log likelihood might overflow, resulting in a Fortran error. This is more often the case when using multiplicative error models. If the error occurs, try increasing the BQL value if possible or change error types.
Check the Use Static LLOQ Value box to set a fixed LLOQ value.
In the LLOQ Value field, type the LLOQ value.
When a static LLOQ value is specified, the static value is always used, even if a dataset column is mapped to the LLOQ context in the BQL object.
Additional status codes can be entered under Non-numeric Code. Each new status code that is entered creates a new row in the rule set. To remove a rule, left-click the row number to select the entire row and press the Delete key.
Syntax for the rules: The status rules are not case-sensitive. The values entered can include numbers, operators, and the variable LLOQ, if an LLOQ value or data column is assigned.
Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.