externalMetric: Compute external model metric(s)

Description Usage Arguments Value References See Also Examples

Description

Compute external model metric(s)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'lcModel,lcModel'
externalMetric(object, object2, name, ...)

## S4 method for signature 'lcModels,missing'
externalMetric(object, object2, name = "adjustedRand")

## S4 method for signature 'lcModels,character'
externalMetric(object, object2 = "adjustedRand")

## S4 method for signature 'lcModels,lcModel'
externalMetric(object, object2, name, drop = TRUE)

## S4 method for signature 'list,lcModel'
externalMetric(object, object2, name, drop = TRUE)

Arguments

object

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

object2

The other lcModel to compare with.

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 externalMetric(lcModel, lcModel): A numeric vector of the computed metrics.

A named numeric vector containing the computed model metrics.

For externalMetric(lcModels): A distance matrix of class dist representing the pairwise comparisons.

For externalMetric(lcModels, name): A distance matrix of class dist representing the pairwise comparisons.

For externalMetric(lcModels, lcModel): A named numeric vector or data.frame containing the computed model metrics.

For externalMetric(list, lcModel): A named numeric vector or data.frame containing the computed model metrics.

References

\insertRef

desgraupes2018clustercritlatrend

\insertRef

you2018mclustcomplatrend

\insertRef

csardi2006igraphlatrend

\insertRef

hubert1985comparinglatrend

\insertRef

revelle2019psychlatrend

\insertRef

scrucca2016mclustlatrend

See Also

metric

Other metric functions: defineExternalMetric(), defineInternalMetric(), getExternalMetricDefinition(), getExternalMetricNames(), getInternalMetricDefinition(), getInternalMetricNames(), metric()

Examples

1
2
3
4
5
data(latrendData)
model1 <- latrend(lcMethodKML("Y", id = "Id", time = "Time"), latrendData)
model2 <- latrend(lcMethodLcmmGMM(fixed = Y ~ Time, mixture = ~ Time,
   id = "Id", time = "Time"), latrendData)
ari <- externalMetric(model1, model2, 'adjustedRand')

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