asVPC {nlmeVPC}R Documentation

The average shifted visual predictive checks (asVPC)

Description

This function draws the average shifted visual predictive check (asVPC) plot. It calculates original and simulated data percentiles using the average shifted histogram method. After calculating percentiles with bin-related or distance-related weights, draw the VPC type plot.

Usage

asVPC(orig_data,
      sim_data,
      type = "CI",                
      weight_method = "bin",                  
      N_xbin = NULL,
      N_hist = NULL,
      probs = c(0.1,0.5,0.9),
      conf.level = 0.95,
      X_name = "TIME",
      Y_name = "DV",
      MissingDV = NULL,
      DV_point = TRUE,                
      CIvpc_type = "line",
      bin_grid = TRUE,                   
      plot_caption = TRUE,
      plot_flag = TRUE,
      linesize = 0.7,
      pointsize = 0.7,
      captionsize = 10,
      Kmethod = "cluster",                
      maxK = NULL,
      beta = 0.2,
      lambda = 0.3,
      R = 4,
      C1 = 2.5,
      C2 = 7.8,...)

Arguments

orig_data

A data frame of original data with X and Y variable.

sim_data

A matrix of simulated data with only Y values collected.

type

Type of VPC graph; "CI", "percentile", or "scatter".

weight_method

The way to put weight when the average shifted values are calculated. "bin" or "distance".

N_xbin

Number of bins in X variable. If NULL, optimal number of bins are automatically calcuated using optK function.

N_hist

The number of shifted histograms.

probs

A numeric vector of probabilities.

conf.level

Confidence level of the interval.

X_name

Name of X variable in orig_data (usually "TIME" in pharmacokinetic data).

Y_name

Name of Y variable in orig_data (usually "DV" in pharmacokinetic data).

MissingDV

Name of missing indicator variable in orig_data, which have value 1 if missing, value 0 otherwise. (usually "MDV" in pharmacokinetic data).

DV_point

Draw point (X, Y) in the plot if TRUE; omit if FALSE.

CIvpc_type

Type of CI area in VPC graph; "line" or "segment".

bin_grid

Draw grid lines for binning in X variable if TRUE; omit if FALSE.

plot_caption

Put caption with additional information if TRUE; omit if FALSE.

plot_flag

Draw plot if TRUE; generate data for drawing plot if FALSE.

linesize

Size of line in the plot.

pointsize

Size of point in the plot.

captionsize

Size of caption.

Kmethod

The way to calculate the penalty in automatic binning."cluster" or "kernel".

maxK

The maximum number of bins.

beta

Additional parameter for automatic binning, used in optK function.

lambda

Additional parameter for automatic binning, used in optK function.

R

Additional parameter for automatic binning, used in optK function.

C1

Additional parameter for automatic binning, used in optK function.

C2

Additional parameter for automatic binning, used in optK function.

...

Arguments to be passed to methods.

Value

asVPC plot or the values to draw asVPC plot.

Examples


data(origdata)
data(simdata)
asVPC(origdata,simdata,type="CI",N_hist=3,weight_method="distance",N_xbin=8)
asVPC(origdata,simdata,type="CI",N_hist=3,weight_method="bin",N_xbin=8)



[Package nlmeVPC version 2.6 Index]