update_baseline_saturated: Set a custom baseline or saturated reference model
Description
Convenience setters that overwrite the $baseline or $saturated slot of a psychonetrics model's @baseline_saturated list. Together with the baseline_saturated = FALSE argument exposed by every model constructor, they make it straightforward to attach hand-built reference models before calling runmodel.
An object of the class psychonetrics (psychonetrics-class) with the relevant slot overwritten.
Arguments
x
A psychonetrics model.
baseline
A psychonetrics model to use as the baseline reference.
saturated
A psychonetrics model to use as the saturated reference.
Author
Sacha Epskamp
Details
Pass baseline_saturated = FALSE to the model constructor to skip auto-construction of the default reference models, attach your own with these setters, and run the target. runmodel will run any attached baseline / saturated that is not yet @computed.
if (FALSE) {
mod <- modelfun(..., baseline_saturated = FALSE)
mod <- update_baseline(mod, mod_baseline)
mod <- update_saturated(mod, mod_saturated)
mod <- runmodel(mod)
}