coverageplot: The coverage plot

View source: R/coverage.R

coverageplotR Documentation

The coverage plot

Description

The coverage plot is developed to help visually check the fitted model with the NPC result. In each level of the predicted interval, the ratios between the expected number of points (Exp) outside the prediction interval and the observed number of data (Obs) outside the prediction interval are calculated. These ratios on the upper and lower sides of the prediction interval are calculated separately.

Usage

coverageplot(orig_data,
             sim_data,
             N_xbin = NULL,
             pred.level = c(0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9),
             conf.level = 0.95,                         
             X_name = "TIME",
             Y_name = "DV",
             MissingDV = NULL,
             plot_flag = TRUE,
             linesize = 0.7,
             pointsize = 1.5,
             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.

N_xbin

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

pred.level

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).

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.

Kmethod

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

maxK

Yhe 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

coverage plot

References

Holford N, & Karlsson M. (2008). "A tutorial on visual predictive checks, abstr 1434." Annual Meeting of the Populations Approach Group in Europe. www.page-meeting.org. 2008.

Examples


data(origdata)
data(simdata)
coverageplot(origdata,simdata,N_xbin=8)



nlmeVPC documentation built on Dec. 28, 2022, 2:49 a.m.