plot_td2pLL: Plot interactive td2pLL model without underlying model fit

View source: R/plot_td2pLL.R

plot_td2pLLR Documentation

Plot interactive td2pLL model without underlying model fit

Description

plot_td2pLL plots an interactive time-dose 2 parameter log-logistic (td2pLL) model when parameters are specified but there is no underlying fit. See fit_td2pLL for the model function. If a model fit is available through fit_td2pLL, please use plot.td2pLL_mod.

Usage

plot_td2pLL(
  td2pLL_coefs = NULL,
  dose_lim = NULL,
  time_lim = NULL,
  add_ext_data = NULL,
  n_grid = 100,
  title = NULL,
  xaxis_scale = "log",
  yaxis_scale = "-",
  xaxis_title = "Dose",
  yaxis_title = "Time",
  zaxis_title = "Response",
  add_ED50_line = TRUE,
  ED50_line_col = "red",
  ED50_line_width = 6,
  ...
)

Arguments

td2pLL_coefs

(named numeric(4))
Contains parameters for h, delta, gamma and c0 of the td2pLL model.

dose_lim

(numeric(2))
Boundaries of the doses (xaxis) for plotting. Note: If xaxis_scale = "log" (default), then dose_lim cannot include 0. If dose_lim shall include the 0, set xaxis_scale = "linear".

time_lim

(numeric(2))
Boundaries for the time (yaxis) for plotting.

add_ext_data

(data.frame())
Optional numeric data.frame to add data points to the surface plot. Must include columns dose, time and resp.

n_grid

(integer(1))
n_grid*n_grid is the dose*time grid for surface evaluations that will be interpolated. Increase n_grid for a smoother plot.

title

(character(1))
Optional plot title.

xaxis_scale

(character(1) in c("log", "linear", "-")
Scale of x-axis (dose-axis).
If "-" is set, then plot_ly() tries to guess which scale to use.

yaxis_scale

(character(1) in c("log", "linear", "-")
Scale of y-axis (time-axis).
If "-" is set, then plot_ly() tries to guess which scale to use.

xaxis_title

(character(1))
Title for dose-axis, time-axis and response-axis.

yaxis_title

(character(1))
Title for dose-axis, time-axis and response-axis.

zaxis_title

(character(1))
Title for dose-axis, time-axis and response-axis.

add_ED50_line

(logical(1))
Indicates if the line of ED50 values shall be annotated (=TRUE).

ED50_line_col

(character(1))
Color for optionally added ED50 line.

ED50_line_width

(numeric(1))
Width for optionally added ED50 line.

...

any
Not used.

Examples

plot_td2pLL(td2pLL_coefs = c(h = 2, delta = 3, gamma = 1.5, c0 = 1),
 dose_lim = c(0.01, 10), time_lim = c(1, 5))
plot_td2pLL(td2pLL_coefs = c(h = 1.5, delta = 5, gamma = 1, c0 = 0.1),
 dose_lim = c(0.1, 10), time_lim = c(1, 10), xaxis_scale = "log",
 yaxis_scale = "linear")
 # If time and response is on log-scale and gamme = 1(=original Haber's law
 # with equal contribution of time and exposure), then one can clearly see
 # haber's law since the red ED50 is a line, if viewed from above.
plot_td2pLL(td2pLL_coefs = c(h = 1.5, delta = 5, gamma = 1, c0 = 0.1),
 dose_lim = c(0.1, 10), time_lim = c(1, 10), xaxis_scale = "log",
 yaxis_scale = "log")

jcduda/td2pLL documentation built on May 14, 2022, 6:48 p.m.