Note: this function should not be called directly, as it is part of the lcMethod fitting process. For fitting an lcMethod object to a dataset, see latrend().
The compose() function of the lcMethod object evaluates and finalizes the lcMethod arguments.
The default implementation returns an updated object with all arguments having been evaluated.
# S4 method for lcMethod
compose(method, envir = NULL)The lcMethod object.
The environment in which the lcMethod should be evaluated
The evaluated and finalized lcMethod object.
In general, there is no need to extend this method for a specific method, as all arguments are automatically evaluated by the compose,lcMethod method.
However, in case there is a need to extend processing or to prevent evaluation of specific arguments (e.g., for handling errors), the method can be overridden for the specific lcMethod subclass.
setMethod("compose", "lcMethodExample", function(method, envir = NULL) {
  newMethod <- callNextMethod()
  # further processing
  return(newMethod)
})
Each lcMethod subclass defines a type of methods in terms of a series of steps for estimating the method.
These steps, as part of the fitting procedure, are executed by latrend() in the following order:
compose(): Evaluate and finalize the method argument values.
validate(): Check the validity of the method argument values in relation to the dataset.
prepareData(): Process the training data for fitting.
preFit(): Prepare environment for estimation, independent of training data.
fit(): Estimate the specified method on the training data, outputting an object inheriting from lcModel.
postFit(): Post-process the outputted lcModel object.
The result of the fitting procedure is an '>lcModel object that inherits from the lcModel class.