Details
Data and model objects can be previously created as PM_data or PM_model objects, or created on the fly when making a new PM_fit object. PM_fit objects contain methods to cross-check data and model objects for compatibility, as well as to run the analysis.
Methods
Method new()
Create a new object
Usage
PM_fit$new(data = data, model = model, backend = getPMoptions()$backend, ...)
Arguments
data
Either the name of a PM_data object in memory or the quoted name of a Pmetrics data file in the current working directory, which will crate a
PM_data
object on the fly. However, if created on the fly, this object will not be available to other methods or other instances ofPM_fit
.model
Similarly, this is either the name of a PM_model object in memory or the quoted name of a Pmetrics text model file in the current working directory. Again, if created on the fly, the object will not be available to other methods or other instances of
PM_fit
.backend
Backend used for calculations; default is value in PMoptions.
...
Other parameters passed to
PM_data
orPM_model
if created from a filename
Method run()
Fit the model to the data
Usage
PM_fit$run(
...,
engine = "NPAG",
rundir = getwd(),
backend = getPMoptions()$backend
)
Arguments
...
Other arguments passed to NPrun
engine
"NPAG" (default) or "IT2B"
rundir
This argument specifies an existing folder that will store the run inside.
backend
Backend used for calculations; default is value in PMoptions.
Method save()
Save the current PM_fit object to a .rds file.
Method load()
PM_fit
objects contain a save
method which invokes saveRDS to write
the object to the hard drive as an .rds file. This is the corresponding load
function.