clusterScore | R Documentation |
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.
clusterScore(
graph,
data,
group,
HM = "LV",
type = "wtc",
size = 5,
verbose = FALSE,
...
)
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. |
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.
Mario Grassi mario.grassi@unipv.it
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 clusterGraph
and cplot
for graph clustering.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.