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)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_data object on the fly. However, if created on the fly, this object will not be available to other methods or other instances of PM_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.
Method run()
Run a fit of model to the data (deprecated)
Details
The $run method for PM_fit objects has been deprecated in
favor of the $fit method in PM_model().
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.