PM_fit
objects comprise a PM_data
and PM_model
object ready for analysis
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
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
....
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())
Arguments
...
Other arguments passed to NPrun
engine
"NPAG" (default) or "IT2B"
rundir
This argument specifies an existing folder that will store the run inside.
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.