CWRES {MIfuns}R Documentation

Generate conditional weighted residual (CWRES) diagnostic plots as a pdf.

Description

CWRES is a function to generate CWRES diagnostic plots following a successful NONMEM run. It can be called as a standalone function following a successful NONMEM run to generate CWRES plots. Plots are the same as those generated by PLOTR or via NONR.

Usage

CWRES(ProjectDir, b, dvname, exportas = 0, logtrans = 0, grp = NULL,
grpnames = NULL, covplt, cont.cov = NULL, cat.cov = NULL, missing = -99,
epilog = NULL)

Arguments

ProjectDir System path to the directory containing the NONMEM control (*.ctl) streams.
b Vector of control stream numbers to run in NONMEM. Should be numeric with no placeholder zeros to left of number, i.e., "1" not "001". Example: b=c(1,2,5)
dvname Name of the dependent variable to use as a label for the diagnostic plots.
exportas Flag to choose pdf (0) or png (1) output for plots with default being "0" for pdf output.
logtrans Flag to log transform (1) or not (0) the NONMEM output variables DV, PRED, and IPRED with the default being "0" to NOT transform the variables.
grp Item in NONMEM datafile or output table file that can be used to condition plots generated by PLOTR. Default value is NULL. Example: grp=c("SEX")
grpnames Optional vector of names for grp item. Vector length must equal number of conditions in grp. Default value is NULL. Example: grpnames=c("Male","Female")
covplt Flag to generate (1) or not (0) covariate diagnostic plots with default value being "0" to not routinely create covariate plots.
cont.cov Vector of continuous covariate names. Names must match those used as column headers in DataFile. Values are retrieved from DataFile so they do not need to be part of the NONMEM $TABLE step. Default value is NULL. Example: cont.cov=c("AGE","WT","CRCL")
cat.cov Vector of categorical covariate names. Names must match those used as column headers in DataFile. Values are retrieved from DataFile so they do not need to be part of the NONMEM $TABLE step. Default value is NULL. Example: cat.cov=c("SEX","FOOD")
missing Numeric item that defines value used to represent missing items in the NONMEM data file. Default value is "-99".
epilog Path to user-defined script that will be sourced at completion of NONMEM run. Default value is NULL.

Warning

CWRES values for each observation are attached to NONMEM "*.TAB" file as part of this function. Multiple runs of this function on the same "*.TAB" file are likely to create errors.

Author(s)

Developed by Metrum Institute (Bill Knebel, Tim Bergsma, and others).

References

MIfuns package available from Metrum Institute website (http://metruminstitute.org/).

See Also

NONR,PLOTR,compute.cwres


[Package MIfuns version 3.2.9 Index]