ssim_to_matrix: Convert SSIM to Adjacency Matrix

View source: R/ssim.R

ssim_to_matrixR Documentation

Convert SSIM to Adjacency Matrix

Description

Converts a Structural Self-Interaction Matrix (SSIM) with V/A/X/O notation to a binary adjacency matrix suitable for ISM analysis.

Usage

ssim_to_matrix(ssim, validate = TRUE)

Arguments

ssim

A square character matrix with V/A/X/O values in the upper triangle. Can be created using create_ssim.

validate

Logical. If TRUE (default), validates that all upper triangle entries are valid (V/A/X/O).

Details

The conversion rules are:

V at (i,j)

Sets adj[i,j] = 1 (i influences j)

A at (i,j)

Sets adj[j,i] = 1 (j influences i)

X at (i,j)

Sets adj[i,j] = 1 AND adj[j,i] = 1 (mutual influence)

O at (i,j)

No edges added

Value

A square numeric adjacency matrix where:

  • 1 at position (i,j) indicates element i influences element j

  • 0 indicates no direct influence

See Also

create_ssim for creating SSIM templates, compute_reachability for the next step in ISM analysis.

Examples

# Create and fill SSIM
ssim <- create_ssim(c("Budget", "Resources", "Quality", "Success"))
ssim["Budget", "Resources"] <- "V"
ssim["Budget", "Quality"] <- "V"
ssim["Resources", "Quality"] <- "V"
ssim["Quality", "Success"] <- "V"

# Convert to adjacency matrix
adj <- ssim_to_matrix(ssim)
print(adj)

# Continue with ISM analysis
reach <- compute_reachability(adj)
levels <- level_partitioning(reach)

ISMtools documentation built on March 13, 2026, 1:06 a.m.