## Fitting models to be plotted below
model1 <- multdrc(rootl~conc, data = ryegrass)
model2 <- multdrc(rootl~conc, data = ryegrass, fct=l3()) # lower limit fixed at 0
## Plotting observations and fitted curve for 'model1'
plot(model1)
## Adding fitted curve for 'model2'
plot(model2, add = TRUE, type = "none",
col = 2, lty = 2)
## Fitting model to be plotted below
model3 <- multdrc(SLOPE~DOSE, CURVE, data=PestSci)
## Plot with no colours
plot(model3, main="Different line types (default)")
## Plot with default colours
plot(model3, col=TRUE, main="Default colours")
## Plot with specified colours
plot(model3, col=c(2,6,3,23,56), main="User-specified colours")
## Plot of curves 1 and 2 only
plot(model3, level=c(1,2), main="User-specified curves")
## Fitting another model to be plotted below
model4 <- multdrc(weight~conc, data=hormesis)
## Using the argument 'conLevel'. Compare the plots!
par(mfrow=c(2, 2))
plot(model4, main="conLevel=1e-2 (default)") # using the default
plot(model4, conLevel=1e-4, main="conLevel=1e-4")
plot(model4, conLevel=1e-6, main="conLevel=1e-6")
plot(model4, conLevel=1e-8, main="conLevel=1e-8")
par(mfrow=c(1,1))
## Using the argument 'broken'
plot(model1, conLevel = 0.1, broken = TRUE)
plot(model1, conLevel = 0.1, broken = TRUE,
bcontrol=list(style="zigzag"))
## Removing models from work space
rm(model1, model2, model3, model4)
Run the code above in your browser using DataLab