Title: | Generate Visual Predictive Checks (VPC) Using 'shiny' |
---|---|
Description: | Utilize the 'shiny' interface to parameterize a Visual Predictive Check (VPC), including selecting from different binning or binless methods and performing stratification, censoring, and prediction correction. Generate the underlying 'tidyvpc' and 'ggplot2' code directly from the user interface and download R or Rmd scripts to reproduce the VPCs in R. |
Authors: | James Craig [aut, cre], Mike Talley [aut], Certara USA, Inc [cph, fnd] |
Maintainer: | James Craig <[email protected]> |
License: | LGPL-3 |
Version: | 3.0.1 |
Built: | 2024-11-10 06:01:50 UTC |
Source: | https://github.com/cran/Certara.VPCResults |
A ggplot2 theme for Certara.
theme_certara( base_size = 11, base_family = "", base_line_size = base_size/22, base_rect_size = base_size/22, grid = c("none", "horizontal", "both") )
theme_certara( base_size = 11, base_family = "", base_line_size = base_size/22, base_rect_size = base_size/22, grid = c("none", "horizontal", "both") )
base_size |
base font size, given in pts. |
base_family |
base font family |
base_line_size |
base size for line elements |
base_rect_size |
base size for rect elements |
grid |
Which grid lines should appear? Horizontal only, both horizontal and vertical, or none (default).
|
There are 3 variants of the theme: no grid
theme_certara()
, full grid theme_certara(grid = "both")
, and
horizontal grid lines only theme_certara(grid = "horizontal")
.
An object of class theme()
.
Use tidyvpc
package to parameterize VPC from Shiny GUI and customize plot
using ggplot2
. Code generation functionality allows you to reproduce tidyvpc
object and ggplot2
plot in your local R session via R script saved to your working
directory.
vpcResultsUI( observed, simulated, ObsName = NULL, vpc.type = c("continuous", "categorical"), tagged = NULL, settings = NULL, ... )
vpcResultsUI( observed, simulated, ObsName = NULL, vpc.type = c("continuous", "categorical"), tagged = NULL, settings = NULL, ... )
observed |
Observed input data. |
simulated |
Simulated input data. |
ObsName |
Optional character value specifiying the name of the observed dependent variable (e.g., ObsName). |
vpc.type |
Character value specifying type of VPC. |
tagged |
A list of tagged VPC's or model diagnostics created from previous |
settings |
A list of plot customization settings used in previous |
... |
Arguments for initiation from Pirana. |
If interactive()
, returns a list of tagged diagnostics from the Shiny application, otherwise returns TRUE
.
if (interactive()) { vpcResultsUI(tidyvpc::obs_data, tidyvpc::sim_data) }
if (interactive()) { vpcResultsUI(tidyvpc::obs_data, tidyvpc::sim_data) }
Use this function to write code to R script from diagnostics tagged in Certara's VPC Results Shiny Application.
write_code(tagged, file)
write_code(tagged, file)
tagged |
List of tagged objects from returned from |
file |
Character specifying path of output file. If missing, it will be saved as |
Returns NULL
after writing to file
.
if (interactive()) { tagged_diagnostics <- vpcResultsUI(tidyvpc::obs_data, tidyvpc::sim_data) write_code(tagged_diagnostics, "tagged_vpc.R") }
if (interactive()) { tagged_diagnostics <- vpcResultsUI(tidyvpc::obs_data, tidyvpc::sim_data) write_code(tagged_diagnostics, "tagged_vpc.R") }