This object contains all of the results after a Pmetrics runs. It is created by using the PM_load function.
Details
After a run completes, results are stored on your hard drive. They are loaded back into R with PM_load to create the PM_result object, which contains both the results and functions to analyze or plot the result.
Public fields
NPdataList with all output from NPAG, made by NPparse
ITdataList with all output from IT2B, made by ITparse
popA PM_pop object
postA PM_post object
finalA PM_final object
cycleA PM_cycle object
opA PM_op object
covA PM_cov object
dataPM_data object representing the original .csv data file used in the run
modeltext string representing the original model file used in the run
errfileName of error file if it exists
successBoolean if successful run
validIf the
$validatemethod has been executed after a run, this object will be added to thePM_resultobject. It contains the information required to plot visual predictive checks and normalized prediction error discrepancies via the npde code developed by Comets et al. Use the$savemethod on the augmentedPM_resultobject to save it with the new validation results.
Methods
Method new()
Create new object populated with data from previous run
Usage
PM_result$new(out, quiet = TRUE)Arguments
outThe parsed output from PM_load, which is automatically generated. This is not a user-modifiable.
quietQuietly validate. Default is
FALSE.
Details
Creation of new PM_result objects is via PM_load.
Method plot()
Plot generic function based on type
Method summary()
Summary generic function based on type
Method nca()
Perform non-compartmental analysis
Arguments
...Arguments passed to makeNCA.
Details
See makeNCA.
Method sim()
Simulates using the self$final object.
For parameter information refer to SIMrun. It will return a PM_sim object
by running SIMparse at the end of the simulation.
Arguments
...Parameters passed to SIMrun
Method save()
Save the current PM_result object to an .Rdata file.
Arguments
runThe run output folder number to save the revised result. If missing, will save in the current working directory. For example, if folder "1" is in your current working directory, specify
run = 1to save the result to the "outputs" subfolder of the "1" folder.fileCustom file name. Default is "PMout.Rdata".
Details
This is useful if you have updated the result in some way, for example you
have run the $make_valid method on the PM_result object, which returns
an internal simulation based validation as a new valid field. To save this
validation, use this $save method. Note that unless a file name is provided,
the changes will overwrite the
previous run results, although unchanged items will be preserved. This is the
usual workflow. However, a custom file name may be useful to share the run
results with someone.
The saved object is an .Rdata file. When loaded, it should be assigned to an R
object, e.g. run2 <- PM_result$new("filename"). An equivalent statement would
be run2 <- PM_load(file = "filename").
Method validate()
Validate the result by internal simulation methods.
Arguments
...Arguments passed to make_valid.
Method step()
Conduct stepwise linear regression of Bayesian posterior parameter values and covariates.
Arguments
...Arguments passed to PMstep.
Method MM_opt()
Calculate optimal sample times from result and template data file.
Arguments
...Arguments passed to MM_opt.
Method load()
Deprecated method to load prior results saved with the $save method.
Replaced by PM_load.
