Usage
phxvpc.sim(path, vpcpath=NULL, ivar="t", nsim=200, pstrat=NULL, setseed=NULL, pred.corr=NULL, var.corr=FALSE, pi=c(0.025,0.5, 0.975), pi.ci=c(0.025, 0.975), bin.option=NULL, bin.bound=NULL, bin.center=NULL, modsp.file="model.spec.csv", out.file="out0001.txt", clean=FALSE, hold=FALSE)
Arguments
path
System directory for location of the model run folder
vpcpath
System directory where vpc simulation results will be stored. If NULL(default), a subfolder vpc n will be created under the model run folder (path), in which n is a number. If vpc n subfolder already exists, n will automatically increase by 1 until no identical existing folder can be found.
ivar
Independent variable (x-axis). Default is "t", which is the independent variable when the structure model is set to any of Phoenix build-in PK models. Other options include "TAD", "PRED", or any user specified input. If user specified input is used, this variable must be in data set and defined in cols.file for model fit.
nsim
An integer value specifying the number of simulation replicates. Default is 200.
pstrat
A character vector that provides a maximum of 3 stratification variables. The vpc will stratify the data on unique values of the specified variable, and perform separate analyses on each set. Variables must be in data set and defined in cols.file for model fit. (Refer to Phoenix NLME manual for additional details regarding cols.file)
setseed
An integer value that provides a fixed seed for random resampling. If omitted, a random seed will be assigned automatically.
pred.corr
Optional. A character string specifying the options of how prediction correction is performed on dependent variable values before computing vpc results. Options are "proportional" or "additive", which can be shorten, with the minimal length of "prop" and "add", respectively. Not case sensitive. Default is NULL.
var.corr
A logical value. If TRUE, perform variability correction on dependent variable values before computing VPC results. Default is FALSE. Note: this option is only functional when the argument pred.corr is used.
pi
Default is c(0.025,0.5, 0.975). A vector of values that describe the prediction percentile that should be calculated. The prediction percentiles are displayed by the Q.pred.line option in phxvpc.plot
pi.ci
Default is c(0.025, 0.975). A vector of two values that describe the confidence interval of the prediction percentile that should be calculated. These values are used to specify the boundaries of the CI.Q.pred option in phxvpc.plot
bin.option
A character string that provide the binning options for simulation. Default is NULL. Alternative options are "K-means", "centers", and "boundaries", which can be shorten, with the minimal length of "k", "cent", and "bound", respectively. Not case sensitive.
bin.bound
A numeric vector that provides binning boundaries when bin.option "boundaries" is used. This option will be ignored when other bin.option is selected. Default is NULL.
bin.center
A numeric vector that provides centers for all bins when bin.option "centers" is used. This option will be ignored when other bin.option is selected. Default is NULL.
clean
A logical value. Default is FALSE. If TRUE, the NLME executable file in the vpcpath folder will be deleted after model execution, the results cannot be updated/modified. If FALSE, it makes possible to apply other estimation/simulation functions in the same folder.
hold
A logical value that determines command window behavior. Currently, it is not implemented.
modsp.file
An output file from phxnlme
that specifies the model file, column file, data file, and Phoenix NLME estimation method used in model run. This file is required. out.file
An output file from phxnlme
that contains the final parameter estimates of model run. This file is required so that final parameter estimates can be obtained to simulate data.