mdControl {drc} | R Documentation |
Set control arguments in the control argument in the function 'multdrc'.
mdControl(bcAdd=0, constr = FALSE, errorm = TRUE, 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. |
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 PestSci
.
### Displaying the default settings mdControl() ### Using 'method' argument model1 <- multdrc(FA) model2 <- multdrc(FA, varPower = TRUE, startVal = coef(model1), control = mdControl(method = "Nelder-Mead")) rm(model1, model2) ### Using 'relTol' argument to improve accuracy ## Fitting a model to the PestSci dataset model1 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci) ## Fitting the same model in a different parametrisation model2 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci, collapse = list(~factor(CURVE),~factor(CURVE),~factor(CURVE),~factor(CURVE))) ## Reducing the relative tolerance model3 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci, collapse = list(~factor(CURVE),~factor(CURVE),~factor(CURVE),~factor(CURVE)), control = mdControl(relTol = 1e-12)) ## Comparing the parameter estimates coef(model1) coef(model2) coef(model3) # model3 is closer to model1 than model2 is rm(model1, model2, model3)