Generate visual predictive checks (VPC) data

vpc_data(
  xpdb,
  opt,
  stratify,
  vpc_type = c("continuous", "categorical", "censored", "time-to-event"),
  psn_folder = NULL,
  psn_bins = FALSE,
  obs_problem = NULL,
  sim_problem = NULL,
  quiet
)

Arguments

xpdb

An xpose database object.

opt

A list of options regarding binning, pi and ci computation. For more information see vpc_opt.

stratify

Either a character string or a formula to stratify the data. For 'categorical' vpcs the stratification fixed to the different categories.

vpc_type

A string specifying the type of VPC to be created, can be one of: 'continuous', 'categorical', 'censored' or 'time-to-event'.

psn_folder

Specify a PsN-generated VPC-folder.

psn_bins

Only used with argument psn_folder. If TRUE bins will be inputed from the PsN vpc_bins.txt file. If FALSE (default) bins will be re-calculated in R. Note that when psn_bins = TRUE only the first bin array will be used and applied to all panels as it is not currently possible to define per panel binning in xpose. In addition when psn_bins = TRUE is used along with vpc(smooth = FALSE) the observations lines may not be centered in the bins. Check the output carefully.

obs_problem

Alternative to the option `psn_folder`. The $problem number to be used for observations. By default returns the last estimation problem.

sim_problem

Alternative to the option `psn_folder`. The $problem number to be used for simulations. By default returns the last simulation problem.

quiet

Logical, if FALSE messages are printed to the console.

See also

Examples

if (FALSE) {
xpdb_ex_pk %>% 
 vpc_data() %>% 
 vpc()
}