Learn R Programming

nda (version 0.3.0)

plot.ndrlm: Plot an NDRLM Path Network

Description

Creates a layered, printable network of indicators, latent variables, and fitted regression links. A latent variable and its indicators share one community colour. A light qualitative node palette is used by default. Structural path labels and widths use standardized coefficients by default, including ridge and elastic-net fits. Legacy unnamed fits recover their response and standardization data from the fitted model.

Usage

# S3 method for ndrlm
plot(x, sig = 0.05, interactive = FALSE,
    show_edge_labels = TRUE, edge.label.size = 9,
    vertex.label.size = 11, edgescale = 1, shape = "automatic",
    standardized.paths = TRUE, layer.positions = NULL,
    node.lighten = 0.18, node.alpha = 0.90,
    static.engine = c("grid", "igraph"),
    positive.color = "#009E73", negative.color = "#C62828",
    loading.color = "grey60", positive.lty = 1, negative.lty = 1,
    loading.lty = 2, edge.width.range = c(1, 6),
    edge.label.color = "#333333",
    edge.label.background = "#FFFFFFE6", edge.label.offset = 0.022,
    node.border.color = "#25313C",
    igraph_args = list(), visnetwork_args = list(), ...)

Value

An ndrlm_plot object; printing it renders the graph.

Arguments

x

An ndrlm object.

sig

Significance threshold for ordinary least-squares paths. Penalized and LOESS paths do not have p-values and are not filtered by sig.

interactive

Create a visNetwork widget.

show_edge_labels

Show loading estimates and structural path coefficients. Structural path labels are standardized by default.

edge.label.size,vertex.label.size

Label sizes.

edgescale

Absolute-weight edge-width multiplier.

shape

"automatic" uses rectangles for observed variables and circles for latent variables. Community membership is encoded by colour. Alternatively, supply one shape or one shape per node.

standardized.paths

If TRUE, use standardized structural coefficients. For linear, ridge, and elastic-net fits these are calculated as \(\beta_j s_{x_j}/s_y\) from the complete training observations. Set to FALSE to display raw coefficients.

layer.positions

Optional horizontal layer positions. Supply four strictly increasing values for the input-indicator, input-latent, output-latent, and output-indicator layers, or one value per active layer. The default closes gaps left by absent latent layers.

node.lighten,node.alpha

Amount of white mixed into node fills and their opacity. Both accept values between zero and one.

static.engine

Static renderer. The default "grid" renderer uses a centred layered layout and labels with opaque backgrounds; "igraph" retains the legacy renderer.

positive.color,negative.color,loading.color

Colours for positive paths, negative paths, and measurement loadings.

positive.lty,negative.lty,loading.lty

Line types for the three edge roles. Structural paths are solid and measurement links are dashed by default.

edge.width.range

Minimum and maximum widths to which absolute estimates are rescaled separately within measurement loadings and structural paths. Structural widths use the same standardized or raw coefficients as their labels.

edge.label.color,edge.label.background,edge.label.offset

Edge-label colour, opaque background, and perpendicular displacement from the edge.

node.border.color

Node-border colour.

igraph_args

Named legacy static plotting arguments, used when static.engine = "igraph".

visnetwork_args

Named network, nodes, edges, options, interaction, and physics argument lists.

...

Additional legacy static plot.igraph arguments.

Examples

Run this code
X <- as.data.frame(freeny.x)
Y <- data.frame(y = freeny.y)
p <- plot(ndrlm(Y, X, optimize = FALSE))
p

Run the code above in your browser using DataLab