plot.HarbronFit: Plot method for 'HarbronFit' objects

Description Usage Arguments Value Author(s) Examples

View source: R/plot.HarbronFit.R

Description

Diagnostic and goodness-of-fit plots (in 2D and 3D).

Usage

1
2
## S3 method for class 'HarbronFit'
plot(x, y = NULL, which = c("nls", "2d", "3d"), ...)

Arguments

x

A HarbronFit object returned by fitModel.

y

A (optional) second HarbronFit object returned by fitModel. If provided, which argument is ignored and a 2d-plot comparing two model fits is produced. Note that the two models should have been fitted on the same data. Note that this argument can also be used as which. See examples.

which

Whether to show default plot.nls ("nls"), a 'slice' plot with fitted curves overlaid on top of the observed data ("2d") or a 3d-plot with fitted surface overlaid on top of the observed data ("3d").

...

Further arguments passed to plot.nls, fitPlot2d or fitPlot3d depending on which.

Value

Output from plot.nls, a ggplot2 object if which = "2d", or a 3d rgl plot if which = "3d".

Author(s)

Maxim Nazarov

Examples

1
2
3
4
5
6
data("checkerboardData", package = "drugCombo")
data1 <- checkerboardData[checkerboardData$exp == 1, ]
fitUniform <- fitModel(data1, model = "uniform")
fitLinear <- fitModel(data1, model = "linear1")
plot(fitUniform, fitLinear)
plot(fitLinear, "2d")  # here 2nd argument is interpreted as `which`

drugCombo documentation built on June 30, 2021, 1:07 a.m.