lcMethod-estimation {latrend}R Documentation

Longitudinal cluster method (lcMethod) estimation procedure

Description

Each longitudinal cluster method represented by a lcMethod class implements a series of standardized steps that produce the estimated method as its output. These steps, as part of the estimation procedure, are executed by the latrend() function and other functions prefixed by "latrend" (e.g., latrendRep(), latrendBoot(), latrendCV()).

Estimation procedure

The steps for estimating a lcMethod object are defined and executed as follows:

  1. compose(): Evaluate and finalize the method argument values.

  2. validate(): Check the validity of the method argument values in relation to the dataset.

  3. prepareData(): Process the training data for fitting.

  4. preFit(): Prepare environment for estimation, independent of training data.

  5. fit(): Estimate the specified method on the training data, outputting an object inheriting from lcModel.

  6. postFit(): Post-process the outputted lcModel object.

The result of the fitting procedure is an lcModel object that inherits from the lcModel class.

See Also

lcMethod latrend

Examples

data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, data = latrendData)
summary(model)

[Package latrend version 1.6.1 Index]