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