View source: R/plot.td2pLL_mod.R
plot.td2pLL_mod | R Documentation |
plot.td2pLL_mod
is the plot method for the S3 class
td2pLL_mod
.
Model fits generated with the fit_td2pLL()
function are of class
c("td2pLL_mod", "nls")
and can therefore be used for this plot method.
If no fitted model but a through parameters pre-specified td2pLL model
shall be plotted, this can be done via the plot_td2pLL.
For details on the td2pLL
model, see fit_td2pLL()
.
If the TDR()
function is used which performs the two-step
modeling pipeline, one can apply plot.td2pLL_mod()
to the fit
list entry of the
object returned by TDR()
,
if fitting a td2pLL
model was chosen in accordance
to the anova pre-test (see td2pLL_anova()
) calculated in TDR()
.
## S3 method for class 'td2pLL_mod' plot( x = NULL, dose_lim = NULL, time_lim = NULL, add_model_data = TRUE, 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, ... )
x |
( |
dose_lim |
( |
time_lim |
( |
add_model_data |
( |
add_ext_data |
( |
n_grid |
( |
title |
( |
xaxis_scale |
( |
yaxis_scale |
( |
xaxis_title, yaxis_title, zaxis_title |
( |
add_ED50_line |
( |
ED50_line_col |
( |
ED50_line_width |
( |
... |
any |
For further details on the td2pLL model, check fit_td2pLL()
.
For details on the ANOVA used, see td2pLL_anova()
. More over,
the entire procedure is explained in duda et al. (2021).
For plotting, the plot_ly
function of package plotly
is used.
data(cytotox) data_subset <- cytotox[cytotox$compound == "ASP", c("expo", "dose", "resp")] colnames(data_subset)[1] <- "time" fit <- fit_td2pLL(data = data_subset) plot(fit) plot(fit, xaxis_scale = "linear") plot(fit, title = "td2pLL model of Compound ASP", dose_lim = c(0.01, 100)) plot(fit, xaxis_scale = "linear", dose_lim = c(0, 15)) # If you want to see how the model looks like for certain parameters, # use [plot_td2pLL] 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.