### 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
Run the code above in your browser using DataLab