| nmf.ffb.DOT | R Documentation |
Creates a Graphviz DOT script that visualizes the structural network
estimated by nmf.sem.
The resulting diagram displays:
endogenous observed variables (Y_1),
exogenous observed variables (Y_2),
latent factors (F_1, ..., F_Q),
together with the non-negative path coefficients whose magnitudes exceed a user-specified threshold.
Directed edges represent estimated relationships:
Y_2 \rightarrow F_q: entries of C2 (exogenous loadings),
F_q \rightarrow Y_1: rows of X (factor-to-endogenous mappings),
Y_1 \rightarrow F_q: entries of C1 (feedback paths).
Edge widths are scaled by coefficient magnitude, and nodes are placed in optional visual clusters. Only variables participating in edges above the threshold are displayed, while latent factors are always shown.
nmf.ffb.DOT(
result,
weight_scale = 5,
weight_scale_c2 = weight_scale,
weight_scale_x1 = weight_scale,
weight_scale_feedback = weight_scale,
threshold = 0.01,
sig.level = 0.1,
rankdir = "LR",
fill = TRUE,
cluster.box = c("normal", "faint", "invisible", "none"),
cluster.labels = NULL,
hide.isolated = TRUE,
...
)
result |
A list returned by |
weight_scale |
Base scaling factor for edge widths. |
weight_scale_c2 |
Scaling factor for edges
|
weight_scale_x1 |
Scaling factor for edges
|
weight_scale_feedback |
Scaling factor for feedback edges
|
threshold |
Minimum coefficient value needed for an edge to be drawn. |
sig.level |
Significance level for filtering structural edges
( |
rankdir |
Graphviz rank direction (e.g., |
fill |
Logical; whether to use filled node shapes. |
cluster.box |
Character string controlling the visibility and style
of cluster frames around Y2, factors, and Y1 blocks.
One of |
cluster.labels |
Optional character vector of length 3 giving custom labels for the Y2, factor, and Y1 clusters. |
hide.isolated |
Logical. If |
... |
For backward compatibility: accepts deprecated names
|
A character string representing a valid Graphviz DOT script.
nmf.ffb, nmf.ffb.inference,
plot.nmfkc.DOT
Y <- t(iris[, -5])
Y1 <- Y[1:2, ]
Y2 <- Y[3:4, ]
result <- nmf.ffb(Y1, Y2, rank = 2, maxit = 500)
dot <- nmf.ffb.DOT(result)
cat(dot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.