Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

new_vpc_theme

Create a customized VPC theme


Description

Create a customized VPC theme

Usage

new_vpc_theme(update = NULL)

Arguments

update

list containing the plot elements to be updated. Run 'new_vpc_theme()' with no arguments to show an overview of available plot elements.

Details

This function creates a theme that customizes how the VPC looks, i.e. colors, fills, transparencies, linetypes an sizes, etc. The following arguments can be specified in the input list:

  • obs_color: color for observations points

  • obs_size: size for observation points

  • obs_median_color: color for median observation line

  • obs_median_linetype: linetype for median observation line

  • obs_median_size: size for median observation line

  • obs_ci_fill: color for observation CI fill

  • obs_ci_color: color for observation CI lines

  • obs_ci_linetype: linetype for observation CI lines

  • obs_ci_size: size for observations CI lines

  • sim_pi_fill: fill color for simulated prediction interval areas

  • sim_pi_alpha: transparency for simulated prediction interval areas

  • sim_pi_color: color for simulated prediction interval lines

  • sim_pi_linetype: linetype for simulated prediction interval lines

  • sim_pi_size: size for simulated prediction interval lines

  • sim_median_fill: fill color for simulated median area

  • sim_median_alpha: transparency for simulated median area

  • sim_median_color: color for simulated median line

  • sim_median_linetype: linetype for simulated median line

  • sim_median_size: size for simulated median line

  • bin_separators_color: color for bin separator lines, NA for don't plot

  • bin_separators_location: where to plot bin separators ("t" for top, "b" for bottom)

  • loq_color: color of line showing limit of quantification

Value

A list with vpc theme specifiers

Examples

theme1 <- new_vpc_theme(update = list(
  obs_color = "red",
  obs_ci_color = "#aa0000",
  obs_alpha = .3,
  sim_pi_fill = "#cc8833",
  sim_pi_size = 2
))
vpc(simple_data$sim, simple_data$obs, vpc_theme = theme1)

vpc

Create Visual Predictive Checks

v1.2.2
MIT + file LICENSE
Authors
Ron Keizer <ronkeizer@gmail.com>
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.