Define an external metric for lcModels

defineExternalMetric(
  name,
  fun,
  warnIfExists = getOption("latrend.warnMetricOverride", TRUE)
)

Arguments

name

The name of the metric.

fun

The function to compute the metric, accepting a lcModel object as input.

warnIfExists

Whether to output a warning when the metric is already defined.