Compare Grouped TNA Models with Comprehensive Metrics
# S3 method for group_tna
compare(
x,
i = 1L,
j = 2L,
scaling = "none",
measures = character(0),
network = TRUE,
...
)A tna_comparison object. See compare.tna() for details.
A group_tna object.
An integer index or the name of the principal cluster as a
character string.
An integer index or the name of the secondary cluster as a
character string.
A character string naming a scaling method to
apply to the weights before comparing them. The supported options are:
"none": No scaling is performed. The weights are used as is.
"minmax": Performs min-max normalization, i.e., the minimum value is
subtracted and the differences are scaled by the range.
"max": Max-normalization: the values are divided by the maximum value.
"rank": Applies min-max normalization to the ranks of the weights
(computed with ties.method = "average").
"zscore": Computes the standard score, i.e. the mean weight is
subtracted and the differences are scaled by the standard deviation.
"robust": Computes the robust z-score, i.e. the median weight is
subtracted and the differences are scaled by the median absolute deviation
(using stats::mad).
"log": Simply the natural logarithm of the weights.
"log1p": As above, but adds 1 to the values before taking the logarithm.
Useful for scenarios with zero weights.
"softmax": Performs softmax normalization.
"quantile": Uses the empirical quantiles of the weights
via stats::ecdf.
A character vector indicating which centrality
measures should be computed. See centralities() for the
available measures. No measures are included by default.
A logical value indicating whether network metrics should
be included in the comparison. The default is TRUE.
Additional arguments passed to compare.tna().
Model comparison functions
compare(),
compare_sequences(),
plot.tna_comparison(),
plot.tna_sequence_comparison(),
plot_compare(),
plot_compare.group_tna(),
print.tna_comparison(),
print.tna_sequence_comparison()
model <- group_model(engagement_mmm)
compare(model, i = 1, j = 2)
Run the code above in your browser using DataLab