Plot sensitivity analysis results
sens_plot(data, ...)# S3 method for sens_each
sens_plot(
data,
dv_name = NULL,
p_name = NULL,
logy = FALSE,
ncol = NULL,
lwd = 0.8,
digits = 3,
plot_ref = TRUE,
xlab = "time",
ylab = dv_name[1],
layout = c("default", "facet_grid", "facet_wrap", "list"),
grid = FALSE,
...
)
# S3 method for sens_grid
sens_plot(
data,
dv_name = NULL,
digits = 2,
ncol = NULL,
lwd = 0.8,
logy = FALSE,
plot_ref = TRUE,
...
)
A ggplot object when one dv_name is specified or a list of ggplot
objects when multiple dv_names are specified.
output from sens_each() or
sens_grid().
arguments passed on to methods.
dependent variable names to plot; can be a comma-separated
string; if NULL, then the unique values of dv_name in data are used.
parameter names to plot; can be a comma-separates string.
if TRUE, y-axis is transformed to log scale
passed to ggplot2::facet_wrap().
passed to ggplot2::geom_line().
used to format numbers on the strips.
if TRUE, then the reference case will be plotted in a black
dashed line.
x-axis title.
y-axis title; not used for facet_grid or facet_wrap layouts.
specifies how plots should be returned when dv_name requests
multiple dependent variables; see Details.
if TRUE, plots from the sens_each method
will be arranged on a page with patchwork::wrap_plots(); see the ncol
argument.
The layout argument is only used for the sens_each method. It lets
you get the plots back in different formats when multiple dependent
variables are requested via dv_name.
Use default to get the plots back in a list if multiple dependent
variables are requested otherwise a single plot is returned.
Use facet_grid to get a single plot, with parameters in columns and
dependent variables in rows.
Use facet_wrap to get a plot with faceted using ggplot2::facet_wrap(),
with both the parameter name and the dependent variable name in the strip.
Use list to force output to be a list of plots; this output can be
further arranged using patchwork::wrap_plots() if desired.
When grid is TRUE, a list of plots will be returned when multiple
dependent variables are requested.
mod <- mrgsolve::house()
dose <- mrgsolve::ev(amt = 100)
out <- sens_run(mod, sargs = list(events = dose), par = "CL,VC")
sens_plot(out, dv_name = "CP")
Run the code above in your browser using DataLab