If the $save
method has previously been invoked on a PM_sim
object, this function will load those results.
Provides an alternative method to call the simulator directly from output of a model fitting run.
Value
A PM_sim object
A PM_sim
object created by calling SIMparse at the completion of the
simulation.
Details
This object is created after a successful run of the simulator.
There are two methods of creating a PM_sim object.
PM_result$sim
PM_sim$run
These both call SIMrun to execute the simulation and SIMparse to process the results and return the PM_sim objects. See help on both of these functions for further details.
See makeAUC
The saved object is an .rds file. When loaded, it should be assigned to an R
object, e.g. sim1 <- PM_sim$load("filename")
.
Calling this function is equivalent to PM_result$sim()
.
Public fields
obs
Observations
amt
Amounts
parValues
Retained simulated parameter values after discarding any due to truncation limits
totalSets
Number of all simulated parameter values
totalMeans
Mean of all simulated parameter values
totalCov
Covariance of all simulated parameter values
data
A matrix that contains all the above elements as columns
Methods
Method new()
Create new simulation objects with results of $sim
method for PM_result
Usage
PM_sim$new(list)
Method save()
Save the current PM_sim object into a .rds file.
Method pta()
Estimates the Probability of Target Attaintment (PTA), based on the results of the current Simulation.
Arguments
targets
A vector of pharmacodynamic targets, such as Minimum Inhibitory Concentrations (MICs), e.g. c(0.25, 0.5,1,2,4,8,16,32). This can also be a sampled distribution using makePTAtarget.
target.type
A numeric or character vector, length 1. If numeric, must correspond to an observation time common to all PMsim objects in
simdata
, rounded to the nearest hour. In this case, the target statistic will be the ratio of observation at timetarget.type
to target. This enables testing of a specific timed concentration (e.g. one hour after a dose or C1) which may be called a peak, but is not actually the maximum drug concentration. Be sure that the time in the simulated data is used, e.g. 122 after a dose given at 120. Character values may be one of "time", "auc", "peak", or "min", for, respectively, percent time above target within the time range specified bystart
andend
, ratio of area under the curve within the time range to target, ratio of peak concentration within the time range to target, or ratio of minimum concentration within the time range to target....
Additional parameters, refer to makePTA