metric: Compute internal model metric(s)

Description Usage Arguments Value See Also Examples

Description

Compute internal model metric(s)

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'lcModel'
metric(object, name = c("AIC", "BIC", "WRSS", "APPA"), ...)

## S4 method for signature 'list'
metric(object, name, drop = TRUE)

## S4 method for signature 'lcModels'
metric(object, name, drop = TRUE)

Arguments

object

The lcModel, lcModels, or list of lcModel objects to compute the metrics for.

name

The name(s) of the metric(s) to compute.

...

Additional arguments.

drop

Whether to return a numeric vector instead of a data.frame in case of a single metric.

Value

For metric(lcModel): A named numeric vector with the computed model metrics.

For metric(list): A data.frame with a metric per column.

For metric(lcModels): A data.frame with a metric per column.

See Also

externalMetric min.lcModels max.lcModels

Other metric functions: defineExternalMetric(), defineInternalMetric(), externalMetric,lcModel,lcModel-method, getExternalMetricDefinition(), getExternalMetricNames(), getInternalMetricDefinition(), getInternalMetricNames()

Examples

1
2
3
4
5
6
data(latrendData)
model <- latrend(lcMethodLcmmGMM(fixed = Y ~ Time, mixture = ~ Time,
   id = "Id", time = "Time"), latrendData)
bic <- metric(model, "BIC")

ic <- metric(model, c("AIC", "BIC"))

latrend documentation built on April 14, 2021, 5:08 p.m.