nm.read.vpc: Read VPC output

View source: R/nm.read.vpc.r

nm.read.vpcR Documentation

Read VPC output

Description

Parses the output from PsN's vpc and prepares it for plotting.

Usage

nm.read.vpc(
  path = getOption("nmDir"),
  vpc_results = "vpc_results.csv",
  vpctab = dir(path = path, pattern = "^vpctab")[1],
  PI.limits = c(0.025, 0.05, 0.1, 0.3, 0.7, 0.9, 0.95, 0.975),
  PI.ci.area.smooth = FALSE
)

Arguments

path

directory where vpc_results.csv and vpctab files reside

vpc_results

file name of summarized VPC results. Defaults to vpc_results.csv

vpctab

filename of observed data table. Defaults to vpctab

PI.limits

what prediction interval stats should be read from the VPC output files

PI.ci.area.smooth

if TRUE the center of the interval of the independent variable will be used. This will create smooth VPC plots, the same way as xpose does. (defaults to FALSE)

Value

A list of data frames 'obs', 'vpc, and 'res'

Note

Please note that qPharmetra's default VPC plot tool is xpose.VPC. Use this function with the ggvpc functions in case one needs more flexibility to post-process results before plotting, and when stratifcation by more than one variable is needed.

See Also

ggvpc_xpose, ggvpc_standard, read.vpc

Examples

myVPC = nm.read.vpc(path = file.path(getOption("qpExampleDir"), "vpc_final_strt"))

unique(myVPC$vpc$strata)
unique(myVPC$obs$strata)
# they match nicely

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.