Blocks are sets of statements grouped together inside curly brackets. Statements include assignment of values and variables. Statements within the model (and within blocks) can span multiple lines of code, and can be separated with (optional) semicolons.
For the statements described in this section, assume the following:
var = a variable name
varlist = a list of variables, optionally separated by commas
numlist = a list of numbers, optionally separated by commas
assign = an assignment operator
expr = any numerical expression, including variable names, numbers, and arithmetic operators
[ …] = the content of the brackets is optional
| = “or” and separates options
* = zero or more of an item can be displayed
+ = one or more of an item can be displayed
statement = a statement of the form: variable=expression
cfMacro(id,parameters, [strip = strippingDoseCovariate])
Macro-parameter model of concentration, using optional stripping dose. See the “Closed-form models” section for more information.
cfMacro(id,parameters, [first = absCptName])
Macro-parameter model of amount in central compartment. See “Closed-form models” for more information.
cfMicro(id,parameters, [first = absCptName])
Micro-parameter model. See the “Closed-form models” section for more information and also see “One-compartment first-order absorption, closed-form” for an example.
count(var,expr[,action])
Defines an occurrence count. See the “Count statement for Count models” section for details.
covariate((var)*)
Defines one or more variables as covariates. Include an empty pair of parentheses after the covariate name to indicate that it is categorical.
covariate(dose,time,Gender())
See the “Covariates” section for more information.
delay(expression, MeanDelayTime[ , shape = ShapeExpression]
[ , hist = HistExpression][ , dist = NameofDistribution])
Models delayed outcomes using either discrete delay or distributed delay (which involves convolution of the signal to be delayed and the probability density function of the delay time, where gamma, Weibull, and inverse Gaussian distribution are supported).
Expression: Signal to be delayed.
MeanDelayTime: The value (positive) associated with the mean delay time.
shape = ShapeExpression: (Optional) If provided, the delay function is used to describe a distributed delay with ShapeExpression (positive) representing the shape parameter that defines the distribution of the delay time. Otherwise, it is used to describe a discrete delay.
hist = HistExpression: (Optional) Specify the value of the expression prior to time 0. If not provided, then 0 is assumed.
dist = NameOfDistribution: (Optional) Specify the name of the distribution for the delay time. If not provided, gamma distribution is assumed.
Any number of delay functions can be included in a model. The MeanDelayTime and shape parameters can be estimated. See the “Discrete and distributed delays” section for more information.
delayInfCpt(A, MeanDelayTime, ParamRelatedToShape
[ , in = inflow][ , out = outflow][ , dist = NameOfDistribution])
A statement related to a compartment (that can receive a dose through a dosepoint statement) with all of its input delayed (where the distribution of the delay time is specified by the dist option), including the rate of administered dose (if provided) and the inflow specified by the “in” option (if provided).
A: Name of the compartment.
MeanDelayTime: The value (positive) associated with the mean delay time.
ParamRelatedToShape: The value of a parameter related to the shape parameter of the specified distribution: if the dist = InverseGaussian, then ParamRelatedToShape=ShapeParameter, otherwise, ParamRelatedToShape=ShapeParameter–1.
out = outflow: (Optional) Represents the flow (either out of or into compartment A) that is not delayed.
in = inflow: (Optional) Represents the additional inflow that is delayed.
dist = NameOfDistribution: (Optional) Represents the name of the distribution for the delay time.
See the “Discrete and distributed delays” section for more information.
gammaDelay(expression, MeanDelayTime, shape = ShapeParam
[, hist = HistExpression], numODE = NumberOfODEUsed)
Defines a gamma distributed delay.
Expression: signal to be delayed.
MeanDelayTime: The value (positive) associated with the mean delay time.
shape = ShapeParam: The value of the shape parameter for the gamma distribution.
hist = HistExpression: (Optional) The value of the expression prior to time 0. If not provided, 0 is assumed.
numODE = NumberOfODEUsed: The number of ODEs used to approximate the gamma distributed delay.
See the “Discrete and distributed delays” section for more information.
deriv(var = expr)
Defines an ordinary differential equation.
deriv(a=-a*Cl/V)
See the “Differential equation models” section for more information.
dosepoint| dosepoint2(id [, tlag = expr][ , duration = expr]
[ , rate = expr][ , bioavail = expr)
Defines dosing. Example:
dosepoint(a1)
deriv(a1=-a1*ke1)
c1=a1/v1
dosepoint(a2)
deriv(a2=-a2*ke2)
c2=a2/v2
See the “Dosing” section for more information.
error(var[(freeze)][ = std])
Defines a Gaussian error variable with its standard deviation optionally provided. Examples:
error(CEps = 0.1)
error(Ceps(freeze)
See also the “Observe statement for Gaussian Residual models” section.
event(var,expr)
Defines an unscheduled (e.g., adverse) event, where var is an occur variable, expr is its hazard.
event(occur,haz)
The occur variable can be:
0 = did not occur
1 = occurred at the given time
2 = occurred at least once in the prior interval
–n = occurred n times in the prior interval
–999999 = no information about the prior interval
See also the “Event statement for Time-to-event models” section for more information
fixef(var[(freeze)][enable=int)]
[=c([lowerbound],[ initialestimate],[ upperbound])]
Defines variable(s) as fixed effects parameters, optionally using (freeze) to fix parameter value during the estimation process, with optional initial estimate and bounds.
See the “Fixed effects” section for more information.
interpolate((id)(*))
For more on the interpolate statement, see “Covariates”.
LL(observedVariable, expression [, type=observedVariableType]
[, simulate={simulationCode}][. actionCode])
Defines a log-likelihood model where expression is the log-likelihood of the observed variable (observedVariable). See the “LL statement for user-defined log-likelihood models” section for more information.
multi(var,invlink(,expr)*[ ,action])
Defines an integer-valued categorical observation, where invlink is an inverse link function and the rest is a series of ascending offset expressions that serve as inputs to the inverse link function.
multi(Y,ilogit,-C*slope+intercept0, -C*slope+intercept1), …)
See the “Multi statement for Categorical models” section for more information.
observe(id1[(id2)] [=expr][ ,bql][ ,dobefore={ …}][ ,doafter={ …}])
Defines a residual error model for a continuous observed variable, where id1 is the observed variable, id2 is the independent variable, and expr is some function of the prediction and a Gaussian/normal error variable.
observe(cObs=cpred+eps1)
See the “Observe statement for Gaussian Residual models” section for more information.
ordinal(var,invlink,input,slope, (,intercept)*)
Variation on the multi statement.
ordinal(Y,ilogit,C,slope,intercept0,intercept1)
See the “Ordinal statement for Ordinal Responses” section for more information.
peakreset(Cmax)
or peakreset(Cmin)
Use in a sequence block, doafter, or dobefore. This statement takes place at a point in time and will reset the peak- or trough-finder, after which it can detect another peak/trough.
proc{ statement*}
ranef((diag|block(varlist) = numlist)*)
Defines variable(s) as random effects parameters, optionally defining the covariance matrix.
ranef(nlKe=0.01,nlV=0.01)
ranef(eta1,eta2=6
diag(eta5,eta6)=c(1,3)
same(eta7,eta8)
block(eta11,eta12)=c(1,2,3)
)
See the “Random effects” section for more information.
secondary((var = expr)+1)
Defines one or more secondary parameters, which are functions of fixed effects. For example, Tmax can be defined as a secondary parameter by using the built-in function CalcTMax as follows:
secondary(Tmax=CalcTMax(tvA,tvA1lpha,tvB,tvBeta,tvC,tvGamma))
section(<int>,section-stmt)
sequence{ statement*}
Defines a block of statements to be executed together and can contain conditional statements. It can contain special statements:
if statements set statements to be executed conditional on expr being true
if(expr){statement*}
[ else if(expr){statement*}]*
[ else {statement*}]
while statements set zero or more statements to be executed while expr is true
while (expr){statement*}
sleep statements pause computations for expr time units. (The expr value for the sleep statement is a relative time, not an absolute time.)
sleep (expr)
See “Modeling discontinuous events”, “Action code”, “The sequence and sleep statements”, “One-compartment model with sequence”, and “One-compartment model with sleep statement”.
stparm((var | var=expr) +)
Defines one or more structural model parameters, var, with optional values, expr.
stparm(
ka=exp(tvlKa+nlKa)
ke=exp(tvlKe+nlKe)
v=exp(tvlV+nlV)
)
See the “Structural parameters and group statements” section for more information.
Tmax=peak(Cmax=C, max)
or Tmin=peak(Cmin=C, min)
Use in model code, not in a sequence block, doafter, or dobefore, to find peak (when the keyword max is included) or trough (when the keyword min is included). Tmax and Tmin are user-specified variable names, Cmax and Cmin are the internal variables and do not need defining, and C is any user-written expression.
Blank is outputted to variables Tmax/Tmin and Cmax/Cmin until after a peak/trough is detected. After a peak/trough is detected, variables Tmax/Tmin and Cmax/Cmin are set to the peak/trough of a cubic spline fitted to the points around the peak/trough, where the points are what is seen on the trajectory of C.
If a subsequent peak/trough is detected, values of Tmax/Tmin and Cmax/Cmin will be updated only if the newly found Cmax/Cmin is higher/lower than the previous one. If the keyword (i.e., max or min) is not included, then max is assumed.
Tmax=peak(Cmax=C)
Either keyword, max or min, may be followed by a logical expression, such as:
Tmax=peak(Cmax=C, max=(t < 6))
Tmin=peak(Cmin=C, min=(t >=6))
In the case where max=(t < 6), if (t < 6) is true, it looks for a peak. If (t < 6) is false, it looks for the trough.
urinecpt(var = expr)
Defines an elimination compartment. The urinecpt is like deriv, except in a steady state dosing situation, urinecpt is ignored.
Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.