Control for nlmer estimation method in nlmixr2
Usage
nlmixr2NlmerControl(
optimizer = "bobyqa",
tolPwrss = 1e-07,
optCtrl = list(),
returnNlmer = FALSE,
muRefCovAlg = TRUE,
eventSens = c("jump", "fd"),
eventType = c("central", "forward"),
shiErr = (.Machine$double.eps)^(1/3),
shi21maxFD = 20L,
stickyRecalcN = 4,
maxOdeRecalc = 5,
odeRecalcFactor = 10^(0.5),
useColor = NULL,
printNcol = NULL,
print = 1L,
optExpression = TRUE,
literalFix = TRUE,
sumProd = FALSE,
rxControl = NULL,
calcTables = TRUE,
compress = TRUE,
adjObf = TRUE,
ci = 0.95,
sigdig = 4,
sigdigTable = NULL,
addProp = c("combined2", "combined1"),
...
)
nlmerControl(
optimizer = "bobyqa",
tolPwrss = 1e-07,
optCtrl = list(),
returnNlmer = FALSE,
muRefCovAlg = TRUE,
eventSens = c("jump", "fd"),
eventType = c("central", "forward"),
shiErr = (.Machine$double.eps)^(1/3),
shi21maxFD = 20L,
stickyRecalcN = 4,
maxOdeRecalc = 5,
odeRecalcFactor = 10^(0.5),
useColor = NULL,
printNcol = NULL,
print = 1L,
optExpression = TRUE,
literalFix = TRUE,
sumProd = FALSE,
rxControl = NULL,
calcTables = TRUE,
compress = TRUE,
adjObf = TRUE,
ci = 0.95,
sigdig = 4,
sigdigTable = NULL,
addProp = c("combined2", "combined1"),
...
)Arguments
- optimizer
passed to
lme4::nlmerControl(): optimizer to use- tolPwrss
passed to
lme4::nlmerControl(): tolerance for the penalized, weighted residual sum-of-squares (PWRSS) inner iterations- optCtrl
a
listof additional control parameters passed to the nonlinear optimizer vialme4::nlmerControl()- returnNlmer
logical; when
TRUEreturn the raw lme4 nlmerMod object instead of the nlmixr2 fit- muRefCovAlg
logical; when
TRUEapply mu2 covariate referencing algebraic transformation (same as saem)- eventSens
method used for the dosing-parameter (alag/F/rate/dur) sensitivities in the analytic gradient model:
"jump"routes them through rxode2's analytic event jumps;"fd"falls back to Shi2021 finite differences. Seenlmixr2est::nlmControl().- eventType
finite-difference type (
"central"or"forward") used for event-related parameters wheneventSens = "fd"- shiErr
epsilon used when optimizing the ideal finite-difference step size with the Shi2021 method
- shi21maxFD
maximum number of Shi2021 step-size optimization iterations for the gradient
- stickyRecalcN
number of bad ODE solves tolerated before the per-subject tolerance is stickily relaxed
- maxOdeRecalc
maximum number of times to retry a bad ODE solve with a relaxed tolerance
- odeRecalcFactor
factor by which atol/rtol are relaxed on an ODE solve retry
- 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)`.
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)`.
- optExpression
Optimize the rxode2 expression to speed up calculation. By default this is turned on.
- literalFix
boolean, substitute fixed population values as literals and re-adjust ui and parameter estimates after optimization; Default is `TRUE`.
- 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
FALSE.- rxControl
`rxode2` ODE solving options during fitting, created with `rxControl()`
- calcTables
This boolean is to determine if the foceiFit will calculate tables. By default this is
TRUE- compress
Should the object have compressed items
- 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
TRUE- ci
Confidence level for some tables. By default this is 0.95 or 95% confidence.
- sigdig
Optimization significant digits; controls the inner/outer optimization tolerance (
10^-sigdig), ODE solver tolerance (0.5*10^(-sigdig-2), or0.5*10^(-sigdig-1.5)for sensitivity/steady-state with liblsoda), and boundary check tolerance (5*10^(-sigdig+1)).- 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.
- addProp
Type of additive-plus-proportional error: `"combined1"`, where standard deviations add: $$y = f + (a + b\times f^c) \times \varepsilon$$; or `"combined2"`, where variances add: $$y = f + \sqrt{a^2 + b^2\times f^{2\times c}} \times \varepsilon$$. Here y = observed, f = predicted, a = additive sd, b = proportional/power sd, c = power exponent (1 in the proportional case).
- ...
Ignored parameters
Examples
nlmerControl()
#> $optimizer
#> [1] "bobyqa"
#>
#> $tolPwrss
#> [1] 1e-07
#>
#> $optCtrl
#> list()
#>
#> $returnNlmer
#> [1] FALSE
#>
#> $muRefCovAlg
#> [1] TRUE
#>
#> $eventSens
#> [1] "jump"
#>
#> $eventType
#> [1] "central"
#>
#> $shiErr
#> [1] 6.055454e-06
#>
#> $shi21maxFD
#> [1] 20
#>
#> $stickyRecalcN
#> [1] 4
#>
#> $maxOdeRecalc
#> [1] 5
#>
#> $odeRecalcFactor
#> [1] 3.162278
#>
#> $iterPrintControl
#> $every
#> [1] 1
#>
#> $ncol
#> [1] 4
#>
#> $headerEvery
#> [1] 10
#>
#> $useColor
#> [1] TRUE
#>
#> $simple
#> [1] FALSE
#>
#> attr(,"class")
#> [1] "iterPrintControl" "list"
#>
#> $optExpression
#> [1] TRUE
#>
#> $literalFix
#> [1] TRUE
#>
#> $sumProd
#> [1] FALSE
#>
#> $rxControl
#> $scale
#> NULL
#>
#> $method
#> liblsoda
#> 2
#>
#> $atol
#> [1] 5e-07
#>
#> $rtol
#> [1] 5e-07
#>
#> $maxsteps
#> [1] 70000
#>
#> $hmin
#> [1] 0
#>
#> $hmax
#> [1] NA
#>
#> $hini
#> [1] 0
#>
#> $maxordn
#> [1] 12
#>
#> $maxords
#> [1] 5
#>
#> $covsInterpolation
#> locf
#> 1
#>
#> $addCov
#> [1] TRUE
#>
#> $returnType
#> rxSolve
#> 0
#>
#> $sigma
#> NULL
#>
#> $sigmaDf
#> NULL
#>
#> $nCoresRV
#> [1] 1
#>
#> $sigmaIsChol
#> [1] FALSE
#>
#> $sigmaSeparation
#> [1] "auto"
#>
#> $sigmaXform
#> identity
#> 4
#>
#> $nDisplayProgress
#> [1] 10000
#>
#> $amountUnits
#> [1] NA
#>
#> $timeUnits
#> [1] "hours"
#>
#> $addDosing
#> [1] FALSE
#>
#> $stateTrim
#> [1] Inf
#>
#> $updateObject
#> [1] FALSE
#>
#> $omega
#> NULL
#>
#> $omegaDf
#> NULL
#>
#> $omegaIsChol
#> [1] FALSE
#>
#> $omegaSeparation
#> [1] "auto"
#>
#> $omegaXform
#> variance
#> 6
#>
#> $nSub
#> [1] 1
#>
#> $thetaMat
#> NULL
#>
#> $thetaDf
#> NULL
#>
#> $thetaIsChol
#> [1] FALSE
#>
#> $nStud
#> [1] 1
#>
#> $dfSub
#> [1] 0
#>
#> $dfObs
#> [1] 0
#>
#> $seed
#> NULL
#>
#> $nsim
#> NULL
#>
#> $minSS
#> [1] 10
#>
#> $maxSS
#> [1] 10000
#>
#> $strictSS
#> [1] 1
#>
#> $infSSstep
#> [1] 12
#>
#> $istateReset
#> [1] TRUE
#>
#> $subsetNonmem
#> [1] TRUE
#>
#> $hmaxSd
#> [1] 0
#>
#> $maxAtolRtolFactor
#> [1] 0.1
#>
#> $from
#> NULL
#>
#> $to
#> NULL
#>
#> $by
#> NULL
#>
#> $length.out
#> NULL
#>
#> $iCov
#> NULL
#>
#> $keep
#> NULL
#>
#> $keepF
#> character(0)
#>
#> $drop
#> NULL
#>
#> $warnDrop
#> [1] TRUE
#>
#> $omegaLower
#> [1] -Inf
#>
#> $omegaUpper
#> [1] Inf
#>
#> $sigmaLower
#> [1] -Inf
#>
#> $sigmaUpper
#> [1] Inf
#>
#> $thetaLower
#> [1] -Inf
#>
#> $thetaUpper
#> [1] Inf
#>
#> $indLinPhiM
#> [1] 0
#>
#> $indLinPhiTol
#> [1] 1e-07
#>
#> $indLinMatExpType
#> expokit
#> 2
#>
#> $indLinMatExpOrder
#> [1] 6
#>
#> $idFactor
#> [1] TRUE
#>
#> $mxhnil
#> [1] 0
#>
#> $hmxi
#> [1] 0
#>
#> $warnIdSort
#> [1] TRUE
#>
#> $ssAtol
#> [1] 5e-05
#>
#> $ssRtol
#> [1] 5e-05
#>
#> $safeZero
#> [1] 1
#>
#> $sumType
#> pairwise
#> 1
#>
#> $prodType
#> long double
#> 1
#>
#> $resample
#> NULL
#>
#> $resampleID
#> [1] TRUE
#>
#> $maxwhile
#> [1] 100000
#>
#> $cores
#> [1] 0
#>
#> $atolSens
#> [1] 1.581139e-06
#>
#> $rtolSens
#> [1] 1.581139e-06
#>
#> $ssAtolSens
#> [1] 0.0002108483
#>
#> $ssRtolSens
#> [1] 0.0002108483
#>
#> $simVariability
#> [1] NA
#>
#> $nLlikAlloc
#> NULL
#>
#> $useStdPow
#> [1] 0
#>
#> $naTimeHandle
#> ignore
#> 1
#>
#> $addlKeepsCov
#> [1] FALSE
#>
#> $addlDropSs
#> [1] TRUE
#>
#> $ssAtDoseTime
#> [1] TRUE
#>
#> $ss2cancelAllPending
#> [1] FALSE
#>
#> $naInterpolation
#> locf
#> 1
#>
#> $keepInterpolation
#> na
#> 2
#>
#> $safeLog
#> [1] 1
#>
#> $safePow
#> [1] 1
#>
#> $ssSolved
#> [1] TRUE
#>
#> $linCmtSensType
#> auto
#> 100
#>
#> $linCmtSensH
#> [1] 1e-04
#>
#> $linCmtGillFtol
#> [1] 0
#>
#> $linCmtGillK
#> [1] 20
#>
#> $linCmtGillStep
#> [1] 4
#>
#> $linCmtGillRtol
#> [1] 1.490116e-08
#>
#> $linCmtShiErr
#> [1] 1.490116e-08
#>
#> $linCmtShiMax
#> [1] 20
#>
#> $linCmtScale
#> [1] 0 0 0 0 0 0 0
#>
#> $linCmtHcmt
#> [1] 1
#>
#> $linCmtHmeanI
#> geometric
#> 2
#>
#> $linCmtHmeanO
#> geometric
#> 2
#>
#> $linCmtSuspect
#> [1] 1e-06
#>
#> $linCmtForwardMax
#> [1] 2
#>
#> $indOwnAlloc
#> [1] -1
#>
#> $maxExtra
#> [1] 1000
#>
#> $tolFactor
#> NULL
#>
#> $serializeFile
#> NULL
#>
#> $dense
#> [1] FALSE
#>
#> $cvodeLinSolver
#> dense
#> 1
#>
#> $stiff2
#> [1] 0
#>
#> $autoSwitchMaxStiff
#> [1] 10
#>
#> $autoSwitchMaxNonstiff
#> [1] 3
#>
#> $autoSwitchStiffFirst
#> [1] 0
#>
#> $autoSwitchNonstifftol
#> [1] 0.9
#>
#> $autoSwitchStifftol
#> [1] 0.9
#>
#> $autoSwitchDtfac
#> [1] 2
#>
#> $autoSwitchSwitchMax
#> [1] 5
#>
#> $useLinCmt
#> [1] TRUE
#>
#> $file
#> NULL
#>
#> $chunkSize
#> NULL
#>
#> $parallel
#> [1] 0
#>
#> $.zeros
#> NULL
#>
#> attr(,"class")
#> [1] "rxControl"
#>
#> $calcTables
#> [1] TRUE
#>
#> $compress
#> [1] TRUE
#>
#> $adjObf
#> [1] TRUE
#>
#> $ci
#> [1] 0.95
#>
#> $sigdig
#> [1] 4
#>
#> $sigdigTable
#> [1] 4
#>
#> $addProp
#> [1] "combined2"
#>
#> $genRxControl
#> [1] TRUE
#>
#> attr(,"class")
#> [1] "nlmerControl"
nlmixr2NlmerControl()
#> $optimizer
#> [1] "bobyqa"
#>
#> $tolPwrss
#> [1] 1e-07
#>
#> $optCtrl
#> list()
#>
#> $returnNlmer
#> [1] FALSE
#>
#> $muRefCovAlg
#> [1] TRUE
#>
#> $eventSens
#> [1] "jump"
#>
#> $eventType
#> [1] "central"
#>
#> $shiErr
#> [1] 6.055454e-06
#>
#> $shi21maxFD
#> [1] 20
#>
#> $stickyRecalcN
#> [1] 4
#>
#> $maxOdeRecalc
#> [1] 5
#>
#> $odeRecalcFactor
#> [1] 3.162278
#>
#> $iterPrintControl
#> $every
#> [1] 1
#>
#> $ncol
#> [1] 4
#>
#> $headerEvery
#> [1] 10
#>
#> $useColor
#> [1] TRUE
#>
#> $simple
#> [1] FALSE
#>
#> attr(,"class")
#> [1] "iterPrintControl" "list"
#>
#> $optExpression
#> [1] TRUE
#>
#> $literalFix
#> [1] TRUE
#>
#> $sumProd
#> [1] FALSE
#>
#> $rxControl
#> $scale
#> NULL
#>
#> $method
#> liblsoda
#> 2
#>
#> $atol
#> [1] 5e-07
#>
#> $rtol
#> [1] 5e-07
#>
#> $maxsteps
#> [1] 70000
#>
#> $hmin
#> [1] 0
#>
#> $hmax
#> [1] NA
#>
#> $hini
#> [1] 0
#>
#> $maxordn
#> [1] 12
#>
#> $maxords
#> [1] 5
#>
#> $covsInterpolation
#> locf
#> 1
#>
#> $addCov
#> [1] TRUE
#>
#> $returnType
#> rxSolve
#> 0
#>
#> $sigma
#> NULL
#>
#> $sigmaDf
#> NULL
#>
#> $nCoresRV
#> [1] 1
#>
#> $sigmaIsChol
#> [1] FALSE
#>
#> $sigmaSeparation
#> [1] "auto"
#>
#> $sigmaXform
#> identity
#> 4
#>
#> $nDisplayProgress
#> [1] 10000
#>
#> $amountUnits
#> [1] NA
#>
#> $timeUnits
#> [1] "hours"
#>
#> $addDosing
#> [1] FALSE
#>
#> $stateTrim
#> [1] Inf
#>
#> $updateObject
#> [1] FALSE
#>
#> $omega
#> NULL
#>
#> $omegaDf
#> NULL
#>
#> $omegaIsChol
#> [1] FALSE
#>
#> $omegaSeparation
#> [1] "auto"
#>
#> $omegaXform
#> variance
#> 6
#>
#> $nSub
#> [1] 1
#>
#> $thetaMat
#> NULL
#>
#> $thetaDf
#> NULL
#>
#> $thetaIsChol
#> [1] FALSE
#>
#> $nStud
#> [1] 1
#>
#> $dfSub
#> [1] 0
#>
#> $dfObs
#> [1] 0
#>
#> $seed
#> NULL
#>
#> $nsim
#> NULL
#>
#> $minSS
#> [1] 10
#>
#> $maxSS
#> [1] 10000
#>
#> $strictSS
#> [1] 1
#>
#> $infSSstep
#> [1] 12
#>
#> $istateReset
#> [1] TRUE
#>
#> $subsetNonmem
#> [1] TRUE
#>
#> $hmaxSd
#> [1] 0
#>
#> $maxAtolRtolFactor
#> [1] 0.1
#>
#> $from
#> NULL
#>
#> $to
#> NULL
#>
#> $by
#> NULL
#>
#> $length.out
#> NULL
#>
#> $iCov
#> NULL
#>
#> $keep
#> NULL
#>
#> $keepF
#> character(0)
#>
#> $drop
#> NULL
#>
#> $warnDrop
#> [1] TRUE
#>
#> $omegaLower
#> [1] -Inf
#>
#> $omegaUpper
#> [1] Inf
#>
#> $sigmaLower
#> [1] -Inf
#>
#> $sigmaUpper
#> [1] Inf
#>
#> $thetaLower
#> [1] -Inf
#>
#> $thetaUpper
#> [1] Inf
#>
#> $indLinPhiM
#> [1] 0
#>
#> $indLinPhiTol
#> [1] 1e-07
#>
#> $indLinMatExpType
#> expokit
#> 2
#>
#> $indLinMatExpOrder
#> [1] 6
#>
#> $idFactor
#> [1] TRUE
#>
#> $mxhnil
#> [1] 0
#>
#> $hmxi
#> [1] 0
#>
#> $warnIdSort
#> [1] TRUE
#>
#> $ssAtol
#> [1] 5e-05
#>
#> $ssRtol
#> [1] 5e-05
#>
#> $safeZero
#> [1] 1
#>
#> $sumType
#> pairwise
#> 1
#>
#> $prodType
#> long double
#> 1
#>
#> $resample
#> NULL
#>
#> $resampleID
#> [1] TRUE
#>
#> $maxwhile
#> [1] 100000
#>
#> $cores
#> [1] 0
#>
#> $atolSens
#> [1] 1.581139e-06
#>
#> $rtolSens
#> [1] 1.581139e-06
#>
#> $ssAtolSens
#> [1] 0.0002108483
#>
#> $ssRtolSens
#> [1] 0.0002108483
#>
#> $simVariability
#> [1] NA
#>
#> $nLlikAlloc
#> NULL
#>
#> $useStdPow
#> [1] 0
#>
#> $naTimeHandle
#> ignore
#> 1
#>
#> $addlKeepsCov
#> [1] FALSE
#>
#> $addlDropSs
#> [1] TRUE
#>
#> $ssAtDoseTime
#> [1] TRUE
#>
#> $ss2cancelAllPending
#> [1] FALSE
#>
#> $naInterpolation
#> locf
#> 1
#>
#> $keepInterpolation
#> na
#> 2
#>
#> $safeLog
#> [1] 1
#>
#> $safePow
#> [1] 1
#>
#> $ssSolved
#> [1] TRUE
#>
#> $linCmtSensType
#> auto
#> 100
#>
#> $linCmtSensH
#> [1] 1e-04
#>
#> $linCmtGillFtol
#> [1] 0
#>
#> $linCmtGillK
#> [1] 20
#>
#> $linCmtGillStep
#> [1] 4
#>
#> $linCmtGillRtol
#> [1] 1.490116e-08
#>
#> $linCmtShiErr
#> [1] 1.490116e-08
#>
#> $linCmtShiMax
#> [1] 20
#>
#> $linCmtScale
#> [1] 0 0 0 0 0 0 0
#>
#> $linCmtHcmt
#> [1] 1
#>
#> $linCmtHmeanI
#> geometric
#> 2
#>
#> $linCmtHmeanO
#> geometric
#> 2
#>
#> $linCmtSuspect
#> [1] 1e-06
#>
#> $linCmtForwardMax
#> [1] 2
#>
#> $indOwnAlloc
#> [1] -1
#>
#> $maxExtra
#> [1] 1000
#>
#> $tolFactor
#> NULL
#>
#> $serializeFile
#> NULL
#>
#> $dense
#> [1] FALSE
#>
#> $cvodeLinSolver
#> dense
#> 1
#>
#> $stiff2
#> [1] 0
#>
#> $autoSwitchMaxStiff
#> [1] 10
#>
#> $autoSwitchMaxNonstiff
#> [1] 3
#>
#> $autoSwitchStiffFirst
#> [1] 0
#>
#> $autoSwitchNonstifftol
#> [1] 0.9
#>
#> $autoSwitchStifftol
#> [1] 0.9
#>
#> $autoSwitchDtfac
#> [1] 2
#>
#> $autoSwitchSwitchMax
#> [1] 5
#>
#> $useLinCmt
#> [1] TRUE
#>
#> $file
#> NULL
#>
#> $chunkSize
#> NULL
#>
#> $parallel
#> [1] 0
#>
#> $.zeros
#> NULL
#>
#> attr(,"class")
#> [1] "rxControl"
#>
#> $calcTables
#> [1] TRUE
#>
#> $compress
#> [1] TRUE
#>
#> $adjObf
#> [1] TRUE
#>
#> $ci
#> [1] 0.95
#>
#> $sigdig
#> [1] 4
#>
#> $sigdigTable
#> [1] 4
#>
#> $addProp
#> [1] "combined2"
#>
#> $genRxControl
#> [1] TRUE
#>
#> attr(,"class")
#> [1] "nlmerControl"