Package: vpc 1.2.3

Ron Keizer

vpc: Create Visual Predictive Checks

Visual predictive checks are a commonly used diagnostic plot in pharmacometrics, showing how certain statistics (percentiles) for observed data compare to those same statistics for data simulated from a model. The package can generate VPCs for continuous, categorical, censored, and (repeated) time-to-event data.

Authors:Ron Keizer [aut, cre], Bill Denney [aut]

vpc_1.2.3.tar.gz
vpc_1.2.3.zip(r-4.5)vpc_1.2.3.zip(r-4.4)vpc_1.2.3.zip(r-4.3)
vpc_1.2.3.tgz(r-4.4-any)vpc_1.2.3.tgz(r-4.3-any)
vpc_1.2.3.tar.gz(r-4.5-noble)vpc_1.2.3.tar.gz(r-4.4-noble)
vpc_1.2.3.tgz(r-4.4-emscripten)vpc_1.2.3.tgz(r-4.3-emscripten)
vpc.pdf |vpc.html
vpc/json (API)
NEWS

# Install 'vpc' in R:
install.packages('vpc', repos = c('https://ronkeizer.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ronkeizer/vpc/issues

Datasets:

On CRAN:

23 exports 36 stars 3.71 score 52 dependencies 6 dependents 3 mentions 328 scripts 1.1k downloads

Last updated 3 months agofrom:ec210170e7. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 11 2024
R-4.5-winOKSep 11 2024
R-4.5-linuxOKSep 11 2024
R-4.4-winOKSep 11 2024
R-4.4-macOKSep 11 2024
R-4.3-winOKSep 11 2024
R-4.3-macOKSep 11 2024

Exports:add_noiseas_vpcdbauto_binbin_datacreate_vpc_themeggplot.vpcdb_categoricalggplot.vpcdb_censoredggplot.vpcdb_continuousggplot.vpcdb_time_to_eventnew_vpc_themeplot_vpcplot_vpc_helperquantile_censread_table_nmreplace_list_elementsshow_defaulttheme_emptytheme_plainvpcvpc_catvpc_censvpc_ttevpc_vpc

Dependencies:bitbit64classclassIntclicliprcolorspacecpp11crayondplyre1071fansifarvergenericsggplot2gluegtablehmsisobandKernSmoothlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigprettyunitsprogressproxypurrrR6RColorBrewerreadrrlangscalesstringistringrsurvivaltibbletidyrtidyselecttzdbutf8vctrsviridisLitevroomwithr

Readme and manuals

Help Manual

Help pageTopics
VPC packagevpc-package
Add noise / residual error to dataadd_noise
Add sim index numberadd_sim_index_number
Adds stratification to data setadd_stratification
Create a vpcdb object, and standardize parameter checkingas_vpcdb
Calculate appropriate bin separators for vpcauto_bin auto_bin.data.frame auto_bin.numeric
Function to bin data based on a vector of bin separators, e.g. for use in VPCbin_data
Perform prediction-correctioncalc_pred_corr_continuous
Calculate aggregate statistics for simulated and observed VPC datacalc_vpc_continuous
Check whether stratification columns are availablecheck_stratification_columns_available
Compute Kaplan-Meier statisticscompute_kaplan
Compute KMMC statisticscompute_kmmc
Create new vpc themecreate_vpc_theme
Define bins for many types of datadefine_bins define_bins_tte
Define data column defaults for various softwaresdefine_data_columns
Check and standardize limits of quantificationdefine_loq
Draw parameters from multivariate distributiondraw_params_mvr
Remove values that are not observed values from datafilter_dv
Prepare VPC data for future calculations by standardizing column names and modifying the input data based on the limits of quantification, stratification, and logarithmic values.format_vpc_input_data format_vpc_input_data_tte
Create a ggplot for each vpcdb typeggplot.vpcdb_categorical ggplot.vpcdb_censored ggplot.vpcdb_continuous ggplot.vpcdb_time_to_event
Function copied from ggplot2:::label_variable, with addition of ` Copied here since CRAN does not like use of `:::`.ggplot2_label_variable
Custom ggplot2 labeller function.label_vpc_tte
Calculate fraction of observations below lloq / above uloqloq_frac
Create a customized VPC themenew_vpc_theme
Simulate PK data from a 1-compartment iv modelpk_iv_1cmt
Simulate PK data from a 1-compartment oral modelpk_oral_1cmt
VPC plotting functionplot_vpc
Core prediction correction functionpred_correction_core
Calculate quantiles respecting the censored dataquantile_cens
NONMEM output table import functionread_table_nm
Read in VPC dataread_vpc
Replace list elements by namereplace_list_elements
Simulated RTTE data (1x)rtte_obs_nm
Simulated RTTE data (100x)rtte_sim_nm
Defaults for show argument with various endpoint typesshow_default
A small rich datasetsimple_data
Confirm that a column is in the data, and rename data to prepare that column for later use.standardize_column
Empty ggplot2 themetheme_empty
A nicer default theme for ggplot2theme_plain
Lower to full triangletriangle_to_full
VPC functionvpc vpc.default vpc_vpc
VPC function for categoricalvpc_cat
VPC function for left- or right-censored data (e.g. BLOQ data)vpc_cens
A collection of internal ggplot helpers for VPC plottingfacet_continuous facet_tte geom_bin_sep geom_hline_loq geom_obs_cens_dat_tte geom_obs_ci_continuous geom_obs_ci_tte geom_obs_dv_continuous geom_obs_km geom_obs_median_continuous geom_sim_km geom_sim_median_ci_continuous geom_sim_median_continuous geom_sim_median_tte geom_sim_pi_as_area_continuous geom_sim_pi_as_area_tte geom_sim_pi_ci_continuous geom_sim_pi_continuous guides_stratify_color scale_x_log10_vpc scale_y_log10_vpc vpc_ggplot
VPC function for time-to-event (survival) datavpc_tte