Learn R Programming

morse (version 3.3.4)

plot.survFitTT: Plotting method for survFitTT objects

Description

This is the generic plot S3 method for the survFitTT class. It plots concentration-response fit under target time survival analysis.

Usage

# S3 method for survFitTT
plot(
  x,
  xlab = "Concentration",
  ylab = "Survival probability",
  main = NULL,
  fitcol = "orange",
  fitlty = 1,
  fitlwd = 1,
  spaghetti = FALSE,
  cicol = "orange",
  cilty = 2,
  cilwd = 1,
  ribcol = "grey70",
  adddata = FALSE,
  addlegend = FALSE,
  log.scale = FALSE,
  style = "ggplot",
  ...
)

Value

a plot of class ggplot

Arguments

x

an object of class survFitTT

xlab

a label for the \(X\)-axis, default is Concentration

ylab

a label for the \(Y\)-axis, default is Survival probability

main

main title for the plot

fitcol

color of the fitted curve

fitlty

line type of the fitted curve

fitlwd

width of the fitted curve

spaghetti

if TRUE, the credible interval is represented by multiple curves

cicol

color of the 95 % credible interval limits

cilty

line type for the 95 % credible interval limits

cilwd

width of the 95 % credible interval limits

ribcol

color of the ribbon between lower and upper credible limits. Transparent if NULL

adddata

if TRUE, adds the observed data with confidence intervals to the plot

addlegend

if TRUE, adds a default legend to the plot

log.scale

if TRUE, displays \(X\)-axis in log-scale

style

graphical backend, can be 'generic' or 'ggplot'

...

Further arguments to be passed to generic methods

Details

The fitted curve represents the estimated survival probability at the target time as a function of the concentration of chemical compound; When adddata = TRUE the black dots depict the observed survival probability at each tested concentration. Note that since our model does not take inter-replicate variability into consideration, replicates are systematically pooled in this plot. The function plots both 95% credible intervals for the estimated survival probability (by default the grey area around the fitted curve) and 95% binomial confidence intervals for the observed survival probability (as black segments if adddata = TRUE). Both types of intervals are taken at the same level. Typically a good fit is expected to display a large overlap between the two intervals. If spaghetti = TRUE, the credible intervals are represented by two dotted lines limiting the credible band, and a spaghetti plot is added to this band. This spaghetti plot consists of the representation of simulated curves using parameter values sampled in the posterior distribution (10% of the MCMC chains are randomly taken for this sample).