An overview of updates to plot()
function in tidyvpc v1.3.0
Set plot output dimensions:
knitr::opts_chunk$set(fig.width=12, fig.height=8, dpi = 300)
## tidyvpc is part of Certara.R!
## Follow the link below to learn more about R package development at Cerara.
## https://certara.github.io/R-Certara/
We can use facet = TRUE argument to facet continuous VPC by quantile or facet categorical VPC by predicted probability.
Setup categorical VPC.
vpc <- observed(obs_cat_data, x = agemonths, yobs = zlencat) %>%
simulated(sim_cat_data, ysim = DV) %>%
binning(bin = round(agemonths, 0)) %>%
vpcstats(vpc.type = "categorical")
Adjust point size.
plot(vpc, point.size = 4)
Setup continuous VPC.
plot(vpc, point.size = 1.5, point.stroke = 2.5, point.alpha = 0.1, ribbon.alpha = 0.05)
plot(vpc, point.size = 5, point.stroke = 0.3, point.shape = "triangle")
plot(vpc, point.size = 7, point.shape = "square-fill", point.alpha = 0.1, ribbon.alpha = 0.5)