Learn R Programming

drugCombo (version 1.2.1)

fitPlot2d: Plot 2d surface (slices) of observations and model fit

Description

Plot 2d surface (slices) of observations and model fit

Usage

fitPlot2d(
  fit,
  fit2 = NULL,
  side = c("d1", "d2", "total"),
  useFineGrid = TRUE,
  modelNames = NULL
)

Arguments

fit

A HarbronFit object returned by fitModel.

fit2

An optional HarbronFit object returned by fitModel. If provided, 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 side.

side

Which side ("d1", "d2" or "total" for the sum of d1 and d2) to use as x-axis.

useFineGrid

Whether to use fine grid for plotting fitted curves (default), or calculate predictions only at the observed data points.

modelNames

Model names to use for the plot legend in the case of model comparison (i.e. when fit2 is provided).

Value

ggplot2 object