
Plots and Tables from a Multi-Stratum Sensitivity Analysis
Source:R/sus_mod_plot_sensitivity.R
sus_mod_plot_sensitivity.RdProduces exposure-response curve overlays, hot-vs-cold RR scatter plots,
and grouped forest plots from a climasus_sensitivity object returned by
sus_mod_sensitivity().
Arguments
- x
A
climasus_sensitivityobject produced bysus_mod_sensitivity().- type
Character. Plot type:
"curves"(default),"scatter", or"bar".- output_type
Character.
"plot"(default),"table", or"all"(named list$plot,$table,$data).- interactive
Logical.
TRUEconverts the ggplot2 output to an interactive plotly widget. DefaultFALSE.- base_size
Numeric. ggplot2 base font size. Default
12.- save_plot
Character or
NULL. File path to save the plot.- lang
Character. Language for labels:
"pt"(default),"en","es".- verbose
Logical. Print progress messages. Default
FALSE.
Value
Depending on output_type:
"plot"-> aggplotorplotlyobject."table"-> atibbleof the plotted data."all"-> a named list:$plot,$table,$data.
Plot types (type)
type | Description |
"curves" | Overlay of each stratum's exposure-response curve with CI ribbon |
"scatter" | Hot RR vs Cold RR per stratum; point size encodes sensitivity index |
"bar" | Horizontal forest plot of hot and cold RR per stratum ordered by SI |
Examples
if (FALSE) { # \dontrun{
sens <- sus_mod_sensitivity(fits, lang = "pt")
sus_mod_plot_sensitivity(sens, type = "curves", lang = "pt")
sus_mod_plot_sensitivity(sens, type = "scatter", lang = "en")
sus_mod_plot_sensitivity(sens, type = "bar", lang = "es")
out <- sus_mod_plot_sensitivity(sens, output_type = "all")
out$table
} # }