Check whether the fitted object converged.

converged(object, ...)

# S4 method for lcModel
converged(object, ...)

Arguments

object

The model.

...

Not used.

Value

Either logical indicating convergence, or a numeric status code.

The default lcModel implementation returns NA.

Implementation

Classes extending lcModel can override this method to return a convergence status or code.


setMethod("converged", "lcModelExt", function(object, ...) {
  # return convergence code
})

Examples

data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData, nClusters = 2)
converged(model)
#> [1] TRUE