Contains results of internal validation by simulation to permit generation of visual predictive checks (VPCs), prediction corrected visual predictive checks, (pcVPCs), normalized prediction distribution errors (NPDE), and numerical predictive checks. This is typically a field in a PM_result
Details
The PM_valid object is both a data field within a PM_result, and itself an R6 object comprising data fields and associated methods suitable for analysis and plotting of observed vs. population or individual predicted outputs.
Because PM_valid objects are automatically added to the PM_result by calling the
$validate() method of a PM_result after a
successful run, it is generally not necessary for users to generate PM_valid objects
themselves.
Public fields
simdataSimulated data created in the validation process
timeBinMedianMedian times for cluster bins
tadBinMedianMedian times after previous doses for cluster bins
opDFObserved-predicted data frame
npdeData for Normalized Prediction Distribution Error
npde_tadData for Normalized Prediction Distribution Error using Time After Dose if available
Methods
Method new()
This function will create an object suitable for plotting visual predictive checks (VPCs) and prediction-corrected visual predictive checks (pcVPCs).
Usage
PM_valid$new(result, tad = FALSE, binCov, doseC, timeC, tadC, limits, ...)Arguments
resultThe result of a prior run, usually supplied by calling the
$validate()method of a PM_result at the end of a run, or later loaded with PM_load.tadBoolean operator to use time after dose rather than time after start. Default is
FALSE.binCovA character vector of the names of covariates which are included in the model, i.e. in the model equations and which need to be binned. For example
binCov='wt'if "wt" is included in a model equation like V=V0*wt, orbinCov=c( 'wt', 'crcl')if both "wt" and "crcl" are included in model equations.doseCAn integer with the number of dose/covariate bins to cluster, if known from a previous run of this function. Including this value will skip the clustering portion for doses/covariates.
timeCAn integer with the number of observation time bins to cluster, if known from a previous run of this function. Including this value will skip the clustering portion for observation times.
tadCAn integer with the number of time after dose bins to cluster, if known from a previous run of this function. Including this value will skip the clustering portion for time after dose. This argument will be ignored if
tad=FALSE.limitsLimits on simulated parameters. See PM_sim.
...Other parameters to be passed to PM_sim, especially
limits.
Details
The function will guide the user
through appropriate clustering of doses, covariates and sample times for
prediction correction using the methods of Bergstrand et al (2011).
NOTE: Including tad is only
valid if steady state conditions exist for each patient.
This means that dosing is stable and regular
for each patient, without changes in amount or timing, and that
sampling occurs after the average concentrations
are the same from dose to dose. Otherwise observations are NOT
superimposable and tad should
NOT be used, i.e. should be set to FALSE.
Returns
An R6 object of class PM_valid, which is a list with the following.
simdata The combined, simulated files for all subjects using the population mean values and each subject as a template. This object will be automatically saved to the run, to be loaded with PM_load next time.
timeBinMedian A data frame with the median times for each cluster bin.
tadBinMedian A data frame with the median time after dose (tad) for each cluster bin. This will be
NAiftad = FALSE.opDF A data frame with observations, predicitons, and bin-corrected predictions for each subject.
ndpe An object with results of normalized distrubition of prediction errors analysis.
npde_tad NPDE with time after dose rather than absolute time, if
tad = TRUE
Method plot()
Plot method. Calls plot.PM_valid.
Examples
## ------------------------------------------------
## Method `PM_valid$new`
## ------------------------------------------------
if (FALSE) { # \dontrun{
valid <- NPex$validate(limits = c(0, 3))
} # }