Object to define and run a model and data in PmetricsSource:
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.
Create a new object
PM_fit$new(data = data, model = model, ...)
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_dataobject on the fly. However, if created on the fly, this object will not be available to other methods or other instances of
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
Other parameters passed to
PM_modelif created from a filename
Fit the model to the data
PM_fit$run(..., engine = "NPAG", rundir = getwd())
Other arguments passed to NPrun
"NPAG" (default) or "IT2B"
This argument specifies an existing folder that will store the run inside.
Save the current PM_fit object to a .rds file.
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
Checks for errors in data and model objects and agreement between them.