clusterScore {SEMgraph} | R Documentation |
Module scoring
Description
Generate factor scores, principal component scores, or projection scores of latent, composite, and unmeasured variable modules, respectively, and fit them with an exogenous group effect.
Usage
clusterScore(
graph,
data,
group,
HM = "LV",
type = "wtc",
size = 5,
verbose = FALSE,
...
)
Arguments
graph |
An igraph object. |
data |
A matrix or data.frame. Rows correspond to subjects, and columns to graph nodes. |
group |
A binary vector. This vector must be as long as the number of subjects. Each vector element must be 1 for cases and 0 for control subjects. |
HM |
Hidden model type. For each defined hidden module:
(i) if |
type |
Graph clustering method. If |
size |
Minimum number of nodes per hidden module. By default, a minimum number of 5 nodes is required. |
verbose |
A logical value. If TRUE, intermediate graphs will be
displayed during the execution. In addition, a reduced graph with
clusters as nodes will be fitted and showed to screen (see also
|
... |
Currently ignored. |
Value
A list of 3 objects:
"fit", hidden module fitting as a lavaan object;
"membership", hidden module nodes membership;
clusterGraph
function;"dataHM", data matrix with cluster scores in first columns.
Author(s)
Mario Grassi mario.grassi@unipv.it
References
Grassi M, Palluzzi F, Tarantino B (2022). SEMgraph: An R Package for Causal Network Analysis of High-Throughput Data with Structural Equation Models. Bioinformatics, 38 (20), 4829–4830 <https://doi.org/10.1093/bioinformatics/btac567>
See Also
See clusterGraph
and cplot
for graph clustering.
Examples
# Nonparanormal(npn) transformation
als.npn <- transformData(alsData$exprs)$data
C <- clusterScore(graph = alsData$graph, data = als.npn,
group = alsData$group,
HM = "LV",
type = "wtc",
verbose = FALSE)
summary(C$fit)
head(C$dataHM)
table(C$membership)