View source: R/cluster-metrics.R
| summarize_clusters | R Documentation |
Builds a Multi-Cluster Multi-Level (MCML) model from raw transition data
(edge lists or sequences) by recoding node labels to cluster labels and
counting the observed transitions. The macro network is then the Markov
chain over cluster states. Weight matrices are passed to
csum, which aggregates them.
summarize_clusters(
x,
clusters = NULL,
method = c("sum", "mean", "median", "max", "min", "density", "geomean"),
type = c("tna", "frequency", "cooccurrence", "semi_markov", "raw"),
directed = TRUE,
compute_within = TRUE
)
x |
Input data. Accepts multiple formats:
|
clusters |
Cluster/group assignments. Accepts:
|
method |
Aggregation method for combining edge weights: "sum", "mean", "median", "max", "min", "density", "geomean". Default "sum". |
type |
Post-processing: "tna" (row-normalize), "frequency" or "raw" (no normalization), "cooccurrence" (symmetrize), or "semi_markov" (row-normalize, identical to "tna"). Default "tna". |
directed |
Logical. Default |
compute_within |
Logical. Compute within-cluster matrices? Default TRUE. |
Usually an mcml object. Existing mcml or
cluster_summary inputs are returned unchanged. Transition-data
results include meta$source = "transitions" and are compatible with
plot_mcml, as_tna, and splot.
csum for matrix-based aggregation,
as_tna to convert to tna objects,
plot_mcml for visualization
clusters <- list(C1 = c("Explore", "Reflect", "Discuss"),
C2 = c("Plan", "Create", "Share"),
C3 = c("Monitor", "Adapt", "Synthesize", "Evaluate"))
summarize_clusters(regulation_net, clusters = clusters, method = "mean")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.