Learn R Programming

latrend (version 1.0.1)

externalMetric,lcModel,lcModel-method: Compute external model metric(s)

Description

Compute external model metric(s)

Usage

# S4 method for lcModel,lcModel
externalMetric(object, object2, name, ...)

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

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

# S4 method for 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 drop the matrix dimensions in case of a single model output.

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, lcModel): A named numeric vector or matrix containing the computed model metrics.

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

See Also

metric

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

Examples

Run this code
# NOT RUN {
data(latrendData)
model1 <- latrend(lcMethodKML("Y", id = "Id", time = "Time"), latrendData)
model2 <- latrend(lcMethodLcmmGMM(Y ~ Time + (1 | Id), id = "Id", time = "Time"), latrendData)
ari <- externalMetric(model1, model2, 'adjustedRand')
# }

Run the code above in your browser using DataLab