A VPC example using the built in simple_

suppressMessages(library(vpc))
evalall <- FALSE
vpc(simple_data$sim, simple_data$obs)

Can also easily stratify.

vpc(simple_data$sim, simple_data$obs, stratify = c("ISM"))

saving as a plot object

p <- vpc(simple_data$sim, simple_data$obs, stratify = c("ISM"))

Given is a ggplot object can just call the object to print it to the screen

p 

Can also override with additional theme elements or lines etc

p + PKPDmisc::base_theme()

p + geom_vline(xintercept = 3, color = "red")


ronkeizer/vpc documentation built on May 11, 2023, 11:09 p.m.