Skip to contents

Constructs a log-log regression scatter plot from a df_doseprop() result (or any object satisfying the doseprop_stats contract). Recovers the observation rows and column names from the object's attributes, builds the faceting label from the per-metric PowerCI text, and renders the scatter

  • trend layers.

Most users will reach this function indirectly via plot_doseprop(). Call plot_build_doseprop() directly when working from a manually- constructed or cached doseprop_stats object — for example, plotting a precomputed result from disk or a custom pipeline that produces compatible columns and attributes.

Usage

plot_build_doseprop(stats, style = NULL, se = TRUE)

Arguments

stats

A doseprop_stats object (typically the output of df_doseprop()). Must contain $obs and $config slots with metric_name_var, metric_value_var, dose_var, and ci. Validated by validate_doseprop_stats() at entry.

style

A ggstylekit::style_spec() controlling plot aesthetics. Defaults to style_doseprop(); view the defaults by running style_doseprop() with no arguments. Customize by passing style = style_doseprop(...), or restyle the returned plot with restyle_plot(). The per-metric facet layout is taken from the style's facet_scales (default "free"), facet_nrow, and facet_ncol; the facet, logx, and logy fields are ignored because the builder sets the facet and log-log axes itself.

se

logical to display confidence interval around regression. Default is TRUE.

Value

a ggplot plot object

See also

Examples

stats <- df_doseprop(dplyr::filter(data_sad_nca, PART == "Part 1-SAD"),
                      metrics = c("aucinf.obs", "cmax"))
plot_build_doseprop(stats)

plot_build_doseprop(stats, se = FALSE)