Generates boxplot summarizing results generated during svp.analysis. Additionally, Kruskal-Wallis rank sum test is performed (using group.by variable for data stratification) and p-values are shown for each comparison group.

compareCalibrationPlot(
  object,
  which.assay.1,
  which.assay.2,
  which.parameter = NULL,
  which.plot = "scatter",
  color.option = "cividis",
  color.begin = 0,
  color.end = 1,
  box.alpha = 0.5,
  point.size = 2,
  point.alpha = 1,
  slope.scale = NULL,
  intercept.scale = NULL,
  show.reference.line = T
)

Arguments

object

Calibration Object.

which.assay.1

First Assay for calibraiton comparison. Assumed to have fitted calibration equations.

which.assay.2

Second Assay for calibraiton comparison. Assumed to have fitted calibration equations.

which.parameter

Character specifying which parameters to plot. If unspecified, one parameter is expected in the dataset.

which.plot

Character specifying which plot to generate. One of:

  • scatter - Default. Pairwise scatter plot between slopes and intercepts in both assays. If scatter, spearman rho is calculated and reported.

  • box - Boxplot of slopes and intercepts for each assay. If box, Kruskal-Wallis rank sum test is conducted and p-value is reported.

color.option

Character indicating which color map option to use (from viridis palette). One of:

  • "magma" (or "A")

  • "inferno" (or "B")

  • "plasma" (or "C")

  • "viridis" (or "D")

  • "cividis" (or "E") - Default

color.begin

Hue in [0,1] at which the viridis color map begins. Default is 0.

color.end

Hue in [0,1] at which the viridis color map ends. Default is 1.

box.alpha

Numeric [0,1] specifying degree of transparency for box plots. Default is 0.5.

point.size

Numeric specifying size of scatter plot points. Default is 2.

point.alpha

Numeric [0,1] specifying degree of transparency for points. Default is 1.

slope.scale

Range of values [a,b] specifying min (a) and max(a) limits of slope-related plots. Specify as vector c(a,b).

intercept.scale

Range of values [a,b] specifying min (a) and max(a) limits of intercept-related plots. Specify as vector c(a,b).

show.reference.line

Logical indicating whether reference x=y line is shown as dashed line. Only specified if which.plot is scatter. Default is true.

Value

ggplot object

See also