mdControl {drc} | R Documentation |
Set control arguments in the control argument in the function 'multdrc'.
mdControl(bcAdd=0, constr = FALSE, errorm = TRUE, maxDose = 1e-1, maxIt = 500, method="BFGS", noMessage = FALSE, relTol = 1e-07, rmNA=FALSE, warnVal = -1, zeroTol=0)
bcAdd |
numeric. The constant to be added in Box-Cox transformation. |
constr |
logical. If TRUE optimisation is constrained, only yielding non-negative parameters. |
errorm |
logical specifying whether failed convergence in multdrc should result in an error or only a warning. |
maxDose |
numeric. The maximum dose allowed if scaling of dose is to be used. |
maxIt |
numeric. The maximum number of iterations in the optimisation procedure. |
method |
character string. The method used in the optimisation procedure. See optim for available methods. |
noMessage |
logical, specifying whether or not messages should be displayed. |
relTol |
numeric. The relative tolerance in the optimisation procedure. |
rmNA |
logical. Should NAs be removed from sum of squares used for estimation? Default is FALSE (not removed). |
warnVal |
numeric. If equal to 0 then the warnings are stored and displayed at the end. See under 'warn' in options .
The default results in suppression of warnings. |
zeroTol |
numeric. The threshold below which doses are considered as control. |
A list with 8 components, one for each of the above arguments.
The use of a non-zero constant bcAdd
may in some cases make it more difficult to obtain convergence of the estimation procedure.
Christian Ritz
See the documentation on the data set spinach
.
### Displaying the default settings mdControl() ### Using 'method' argument ryegrass.model1 <- multdrc(ryegrass) ryegrass.model2 <- multdrc(ryegrass, varPower = TRUE, startVal = coef(ryegrass.model1), control = mdControl(method = "Nelder-Mead")) ### Using 'relTol' argument to improve accuracy ## Fitting a model to the PestSci dataset spinach.model1 <- multdrc(SLOPE~DOSE, CURVE, data = spinach) ## Fitting the same model in a different parametrisation spinach.model2 <- multdrc(SLOPE~DOSE, CURVE, data = spinach, collapse = list(~factor(CURVE),~factor(CURVE),~factor(CURVE),~factor(CURVE))) ## Reducing the relative tolerance spinach.model3 <- multdrc(SLOPE~DOSE, CURVE, data = spinach, collapse = list(~factor(CURVE),~factor(CURVE),~factor(CURVE),~factor(CURVE)), control = mdControl(relTol = 1e-12)) ## Comparing the parameter estimates coef(spinach.model1) coef(spinach.model2) coef(spinach.model3) # model3 is closer to model1 than model2 is