| nlminbControl | R Documentation |
nlmixr2 nlminb defaults
nlminbControl(
eval.max = 200,
iter.max = 150,
trace = 0,
abs.tol = 0,
rel.tol = NULL,
x.tol = NULL,
xf.tol = 2.2e-14,
step.min = 1,
step.max = 1,
sing.tol = rel.tol,
scale = 1,
scale.init = NULL,
diff.g = NULL,
rxControl = NULL,
optExpression = TRUE,
sumProd = FALSE,
literalFix = TRUE,
literalFixRes = TRUE,
returnNlminb = FALSE,
solveType = c("hessian", "grad", "fun"),
stickyRecalcN = 4,
maxOdeRecalc = 5,
odeRecalcFactor = 10^(0.5),
indTolRelax = TRUE,
eventType = c("central", "forward"),
shiErr = (.Machine$double.eps)^(1/3),
shi21maxFD = 20L,
optimHessType = c("central", "forward"),
hessErr = (.Machine$double.eps)^(1/3),
shi21maxHess = 20L,
useColor = NULL,
printNcol = NULL,
print = 1L,
normType = c("rescale2", "mean", "rescale", "std", "len", "constant"),
scaleType = c("nlmixr2", "norm", "mult", "multAdd"),
scaleCmax = 1e+05,
scaleCmin = 1e-05,
scaleC = NULL,
scaleTo = 1,
gradTo = 1,
addProp = c("combined2", "combined1"),
eventSens = c("jump", "fd"),
sensMethod = c("default", "forward"),
calcTables = TRUE,
compress = TRUE,
covMethod = c("r", "nlminb", ""),
adjObf = TRUE,
ci = 0.95,
sigdig = 3,
sigdigTable = NULL,
...
)
eval.max |
Maximum number of evaluations of the objective function allowed. Defaults to 200. |
iter.max |
Maximum number of iterations allowed. Defaults to 150. |
trace |
The value of the objective function and the parameters is printed every trace'th iteration. When 0 no trace information is to be printed |
abs.tol |
Absolute tolerance. Defaults to 0 so the absolute convergence test is not used. If the objective function is known to be non-negative, the previous default of '1e-20' would be more appropriate |
rel.tol |
Relative tolerance. When 'NULL' (default) it is derived from 'sigdig' the way 'foceiControl()' does ('10^(-sigdig)'). |
x.tol |
X tolerance. When 'NULL' (default) it is derived from 'sigdig' ('10^(-sigdig)'). |
xf.tol |
false convergence tolerance. Defaults to '2.2e-14'. |
step.min |
Minimum step size. Default to '1.'. |
step.max |
Maximum step size. Default to '1.'. |
sing.tol |
singular convergence tolerance; defaults to 'rel.tol;. |
scale |
See PORT documentation (or leave alone). |
scale.init |
... probably need to check PORT documentation |
diff.g |
an estimated bound on the relative error in the objective function value |
rxControl |
'rxode2' ODE solving options during fitting, created with 'rxControl()' |
optExpression |
Optimize the rxode2 expression to speed up calculation. By default this is turned on. |
sumProd |
Is a boolean indicating if the model should change
multiplication to high precision multiplication and sums to
high precision sums using the PreciseSums package. By default
this is |
literalFix |
boolean, substitute fixed population values as literals and re-adjust ui and parameter estimates after optimization; Default is 'TRUE'. |
literalFixRes |
boolean, substitute fixed population values as literals and re-adjust ui and parameter estimates after optimization; Default is 'TRUE'. |
returnNlminb |
logical; when TRUE this will return the nlminb result instead of the nlmixr2 fit object |
solveType |
controls whether ‘nlm' uses nlmixr2’s analytical gradients (event-related parameters like lag time/duration/rate/F use Shi2021 finite differences instead): '"hessian"' builds a Hessian from the analytical gradient via finite differences, '"gradient"' supplies the gradient and lets 'nlm' compute the finite-difference Hessian, and '"fun"' lets 'nlm' compute both by finite differences. |
stickyRecalcN |
The number of bad ODE solves before reducing the atol/rtol for the rest of the problem. |
maxOdeRecalc |
Maximum number of times to reduce the ODE tolerances and try to resolve the system if there was a bad ODE solve. |
odeRecalcFactor |
The ODE recalculation factor when ODE solving goes bad, this is the factor the rtol/atol is reduced |
indTolRelax |
When 'TRUE' (default), only subjects whose ODE solve produced NaN/Inf have their tolerances relaxed, and the relaxed tolerance persists across optimizer calls (sticky). When 'FALSE', all subjects have their tolerances relaxed on each retry and tolerances are reset afterward. |
eventType |
Event gradient type for dosing events; Can be "central" or "forward" |
shiErr |
This represents the epsilon when optimizing the ideal step size for numeric differentiation using the Shi2021 method |
shi21maxFD |
The maximum number of steps for the optimization of the forward difference step size when using dosing events (lag time, modeled duration/rate and bioavailability) |
optimHessType |
Hessian type for numeric-difference individual Hessians in generalized log-likelihood estimation: "central" (matches R's 'optimHess()', default) or "forward" (faster). |
hessErr |
This represents the epsilon when optimizing the Hessian step size using the Shi2021 method. |
shi21maxHess |
Maximum number of times to optimize the best step size for the hessian calculation |
useColor |
Logical (or 'NULL') emit ANSI bold/color escapes in the iteration print. 'NULL' (default) defers to [crayon::has_color()]. |
printNcol |
Integer (or 'NULL') parameter columns per row before wrapping. 'NULL' (default) uses 'floor((getOption("width") - 23) / 12)'. |
print |
Either a scalar print-frequency ('0' = suppress, '1' (default) = every evaluation, 'N' = every Nth), OR a pre-built [iterPrintControl()] object. Equivalent to 'iterPrintControl(every = print, ncol = printNcol, useColor = useColor)'. |
normType |
Parameter normalization/scaling used to get scaled
initial values for |
scaleType |
The scaling scheme for nlmixr2: |
scaleCmax |
Maximum value of the scaleC to prevent overflow. |
scaleCmin |
Minimum value of the scaleC to prevent underflow. |
scaleC |
Scaling constant used with |
scaleTo |
Scale the initial parameter estimate to this value. By default this is 1. When zero or below, no scaling is performed. |
gradTo |
this is the factor that the gradient is scaled to before optimizing. This only works with scaleType="nlmixr2". |
addProp |
Type of additive-plus-proportional error: '"combined1"', where standard deviations add:
; or '"combined2"', where variances add:
. Here y = observed, f = predicted, a = additive sd, b = proportional/power sd, c = power exponent (1 in the proportional case). |
eventSens |
Controls how dosing/event-parameter ('alag', 'F', 'rate', 'dur') sensitivities are computed for THETA/ETA gradients: ‘"jump"' (default) uses rxode2’s analytic event sensitivities; '"fd"' uses the legacy finite-difference behavior. |
sensMethod |
Method used to compute the ODE parameter sensitivities. '"forward"' uses the classic variational (forward) sensitivity ODEs; '"default"' is the same thing. |
calcTables |
This boolean is to determine if the foceiFit
will calculate tables. By default this is |
compress |
Should the object have compressed items |
covMethod |
Method for calculating the covariance. |
adjObf |
is a boolean to indicate if the objective function
should be adjusted to be closer to NONMEM's default objective
function. By default this is |
ci |
Confidence level for some tables. By default this is 0.95 or 95% confidence. |
sigdig |
Optimization significant digits. One value drives, with a single
consistent formula, the inner/outer optimizer convergence tolerance
( |
sigdigTable |
Significant digits in the final output table. If not specified, then it matches the significant digits in the 'sigdig' optimization algorithm. If 'sigdig' is NULL, use 3. |
... |
Further arguments to be supplied to |
Matthew L. Fidler
# A logit regression example with emax model
dsn <- data.frame(i=1:1000)
dsn$time <- exp(rnorm(1000))
dsn$DV=rbinom(1000,1,exp(-1+dsn$time)/(1+exp(-1+dsn$time)))
mod <- function() {
ini({
E0 <- 0.5
Em <- 0.5
E50 <- 2
g <- fix(2)
})
model({
v <- E0+Em*time^g/(E50^g+time^g)
ll(bin) ~ DV * v - log(1 + exp(v))
})
}
fit2 <- nlmixr(mod, dsn, est="nlminb")
print(fit2)
# you can also get the nlm output with fit2$nlminb
fit2$nlminb
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.