Specifies the initial values, lower bounds, upper bounds, and units for fixed effects in a model
fixedEffect.Rd
Specifies the initial values, lower bounds, upper bounds, and units for fixed effects in a model
Usage
fixedEffect(
.Object,
effect,
value = NULL,
lowerBound = NULL,
upperBound = NULL,
isFrozen = NULL,
unit = NULL
)
Arguments
- .Object
Model object in which to define fixed effects values
- effect
Character or character vector specifying names of fixed effects
- value
Numeric or numeric vector specifying the initial values of fixed effects. If supplying vector, must be in the same order/length as corresponding
effect
.- lowerBound
Numeric or numeric vector specifying the lower limit values of fixed effects. If supplying vector, must be in the same order as
effect
.- upperBound
Numeric or numeric vector specifying the upper limit values of fixed effects. If supplying vector, must be in the same order as
effect
.- isFrozen
Logical or logical vector. Set to
TRUE
to freeze the fixed effect to the specified initial value. If supplying vector, must be in the same order aseffect
.- unit
Character or character vector specifying units of measurement for the fixed effects. If supplying a vector, must be in the same order as
effect
.
Examples
model <- pkmodel(
numCompartments = 2,
data = pkData,
ID = "Subject",
Time = "Act_Time",
A1 = "Amount",
CObs = "Conc",
modelName = "TwCpt_IVBolus_FOCE_ELS"
)
# View initial/current fixed effect values
initFixedEffects(model)
#> tvV tvCl tvV2 tvCl2
#> "1" "1" "1" "1"
model <- model |>
fixedEffect(
effect = c("tvV", "tvCl", "tvV2", "tvCl2"),
value = c(15, 5, 40, 15)
)