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
dataEither 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_dataobject on the fly. However, if created on the fly, this object will not be available to other methods or other instances ofPM_fit.modelSimilarly, 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.backendBackend used for calculations; default is value in PMoptions.
...Other parameters passed to
PM_dataorPM_modelif 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"
rundirThis argument specifies an existing folder that will store the run inside.
backendBackend 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.
