lcModels-class: 'lcModels': a list of 'lcModel' objects

lcModels-classR Documentation

lcModels: a list of lcModel objects

Description

The lcModels S3 class represents a list of one or more lcModel objects. This makes it easier to work with a collection of models in a more structured manner.

A list of models is outputted from the repeated estimation functions such as latrendRep(), latrendBatch(), and others. You can construct a list of models using the lcModels() function.

Functionality

  • Print an argument summary for each of the models.

  • Convert to a data.frame of method arguments.

  • Subset the list.

  • Compute an internal metric or external metric.

  • Obtain the best model according to minimizing or maximizing a metric.

  • Obtain the summed estimation time.

  • Plot a metric across a variable.

  • Plot the cluster trajectories.

See Also

Other lcModels functions: as.lcModels(), lcModels, max.lcModels(), min.lcModels(), plotMetric(), print.lcModels(), subset.lcModels()

Examples

data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
models <- latrendRep(method, data = latrendData, .rep = 5) # 5 repeated runs

bestModel <- min(models, "MAE")

latrend documentation built on March 31, 2023, 5:45 p.m.