Skip to contents

[Stable]

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.

Author

Michael Neely, Julian Otalvaro

Public fields

NPdata

List with all output from NPAG, made by NPparse

ITdata

List with all output from IT2B, made by ITparse

pop

A PM_pop object

post

A PM_post object

final

A PM_final object

cycle

A PM_cycle object

op

A PM_op object

cov

A PM_cov object

data

PM_data object representing the original .csv data file used in the run

model

text string representing the original model file used in the run

errfile

Name of error file if it exists

success

Boolean if successful run

valid

If the $validate method has been executed after a run, this object will be added to the PM_result object. 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 $save method on the augmented PM_result object 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

out

The parsed output from PM_load, which is automatically generated. This is not a user-modifiable.

quiet

Quietly validate. Default is FALSE.

Details

Creation of new PM_result objects is via PM_load.


Method plot()

Plot generic function based on type

Usage

PM_result$plot(type, ...)

Arguments

type

Type of plot based on class of object

...

Plot-specific arguments


Method summary()

Summary generic function based on type

Usage

PM_result$summary(type, ...)

Arguments

type

Type of summary based on class of object

...

Summary-specific arguments


Method auc()

AUC generic function based on type

Usage

PM_result$auc(type, ...)

Arguments

type

Type of AUC based on class of object

...

Summary-specific arguments


Method nca()

Perform non-compartmental analysis

Usage

PM_result$nca(...)

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.

Usage

PM_result$sim(...)

Arguments

...

Parameters passed to SIMrun


Method save()

Save the current PM_result object to an .Rdata file.

Usage

PM_result$save(run, file)

Arguments

run

The 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 = 1 to save the result to the "outputs" subfolder of the "1" folder.

file

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

Usage

PM_result$validate(...)

Arguments

...

Arguments passed to make_valid.


Method step()

Conduct stepwise linear regression of Bayesian posterior parameter values and covariates.

Usage

PM_result$step(...)

Arguments

...

Arguments passed to PMstep.


Method MM_opt()

Calculate optimal sample times from result and template data file.

Usage

PM_result$MM_opt(...)

Arguments

...

Arguments passed to MM_opt.


Method load()

[Deprecated]

Deprecated method to load prior results saved with the $save method. Replaced by PM_load.

Usage

PM_result$load(...)

Arguments

...

Not used.


Method clone()

The objects of this class are cloneable with this method.

Usage

PM_result$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.