newuoaControl | R Documentation |
Control for newuoa estimation method in nlmixr2
newuoaControl(
npt = NULL,
rhobeg = NULL,
rhoend = NULL,
iprint = 0L,
maxfun = 100000L,
returnNewuoa = FALSE,
stickyRecalcN = 4,
maxOdeRecalc = 5,
odeRecalcFactor = 10^(0.5),
useColor = crayon::has_color(),
printNcol = floor((getOption("width") - 23)/12),
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,
rxControl = NULL,
optExpression = TRUE,
sumProd = FALSE,
literalFix = TRUE,
addProp = c("combined2", "combined1"),
calcTables = TRUE,
compress = TRUE,
covMethod = c("r", ""),
adjObf = TRUE,
ci = 0.95,
sigdig = 4,
sigdigTable = NULL,
...
)
npt |
The number of points used to approximate the objective function via a quadratic approximation for bobyqa. The value of npt must be in the interval [n+2,(n+1)(n+2)/2] where n is the number of parameters in par. Choices that exceed 2*n+1 are not recommended. If not defined, it will be set to 2*n + 1. (bobyqa) |
rhobeg |
Beginning change in parameters for bobyqa algorithm (trust region). By default this is 0.2 or 20 parameters when the parameters are scaled to 1. rhobeg and rhoend must be set to the initial and final values of a trust region radius, so both must be positive with 0 < rhoend < rhobeg. Typically rhobeg should be about one tenth of the greatest expected change to a variable. Note also that smallest difference abs(upper-lower) should be greater than or equal to rhobeg*2. If this is not the case then rhobeg will be adjusted. (bobyqa) |
rhoend |
The smallest value of the trust region radius that is allowed. If not defined, then 10^(-sigdig-1) will be used. (bobyqa) |
iprint |
The value of 'iprint' should be set to an integer value in '0, 1, 2, 3, ...', which controls the amount of printing. Specifically, there is no output if 'iprint=0' and there is output only at the start and the return if 'iprint=1'. Otherwise, each new value of 'rho' is printed, with the best vector of variables so far and the corresponding value of the objective function. Further, each new value of the objective function with its variables are output if 'iprint=3'. If 'iprint > 3', the objective function value and corresponding variables are output every 'iprint' evaluations. Default value is '0'. |
maxfun |
The maximum allowed number of function evaluations. If this is exceeded, the method will terminate. |
returnNewuoa |
return the newuoa output instead of the nlmixr2 fit |
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 |
useColor |
Boolean indicating if focei can use ASCII color codes |
printNcol |
Number of columns to printout before wrapping parameter estimates/gradient |
print |
Integer representing when the outer step is printed. When this is 0 or do not print the iterations. 1 is print every function evaluation (default), 5 is print every 5 evaluations. |
normType |
This is the type of parameter
normalization/scaling used to get the scaled initial values
for nlmixr2. These are used with With the exception of In general, all all scaling formula can be described by:
= (
)/
Where The other data normalization approaches follow the following formula
= (
)/
|
scaleType |
The scaling scheme for nlmixr2. The supported types are:
|
scaleCmax |
Maximum value of the scaleC to prevent overflow. |
scaleCmin |
Minimum value of the scaleC to prevent underflow. |
scaleC |
The scaling constant used with
These parameter scaling coefficients are chose to try to keep similar slopes among parameters. That is they all follow the slopes approximately on a log-scale. While these are chosen in a logical manner, they may not always apply. You can specify each parameters scaling factor by this parameter if you wish. |
scaleTo |
Scale the initial parameter estimate to this value. By default this is 1. When zero or below, no scaling is performed. |
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'. |
addProp |
specifies the type of additive plus proportional errors, the one where standard deviations add (combined1) or the type where the variances add (combined2). The combined1 error type can be described by the following equation:
The combined2 error model can be described by the following equation:
Where: - y represents the observed value - f represents the predicted value - a is the additive standard deviation - b is the proportional/power standard deviation - c is the power exponent (in the proportional case c=1) |
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 covariance. In this discussion, R is the Hessian matrix of the objective function. The S matrix is the sum of individual gradient cross-product (evaluated at the individual empirical Bayes estimates).
|
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. This controls:
|
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. |
... |
Ignored parameters |
newuoa control structure
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="newuoa")
print(fit2)
# you can also get the nlm output with
fit2$newuoa
# The nlm control has been modified slightly to include
# extra components and name the parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.