| Title: | Interpretive Structural Modelling Analysis Tools |
|---|---|
| Description: | A comprehensive toolkit for Interpretive Structural Modelling (ISM) analysis. Provides functions for creating adjacency matrices from various input formats including SSIM (Structural Self-Interaction Matrix), computing reachability matrices using Warshall's algorithm, performing hierarchical level partitioning, MICMAC (Cross-Impact Matrix Multiplication Applied to Classification) analysis, and visualizing ISM structures through both static and interactive diagrams. ISM is a methodology for identifying and summarizing relationships among specific elements which define an issue or problem, as described in Warfield (1974) <doi:10.1109/TSMC.1974.5408524>. |
| Authors: | Yi Tang [aut, cre] (ORCID: <https://orcid.org/0000-0002-4374-6334>) |
| Maintainer: | Yi Tang <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-13 06:47:02 UTC |
| Source: | https://github.com/cran/ISMtools |
A comprehensive toolkit for Interpretive Structural Modelling (ISM) and MICMAC analysis. ISM is a methodology for identifying and summarizing relationships among specific elements which define an issue or problem.
create_relation_matrixCreate or convert adjacency matrices
convert_to_matrixConvert edge lists to adjacency matrices
create_ssimCreate SSIM (Structural Self-Interaction Matrix) template
ssim_to_matrixConvert SSIM (V/A/X/O) to adjacency matrix
compute_reachabilityCalculate reachability matrix using Warshall's algorithm
level_partitioningPerform hierarchical level decomposition
micmac_analysisMICMAC analysis (driving/dependence power)
extract_direct_edgesTransitive reduction for clean diagrams
plot_ismStatic ISM structure visualization (base R or igraph)
plot_interactive_ismInteractive ISM visualization (requires visNetwork)
plot_micmacMICMAC scatter plot
Create SSIM using create_ssim or adjacency matrix using create_relation_matrix
Convert SSIM to adjacency matrix using ssim_to_matrix (if applicable)
Compute reachability matrix using compute_reachability
Perform level partitioning using level_partitioning
Perform MICMAC analysis using micmac_analysis
Visualize results using plot_ism and plot_micmac
The package includes an example dataset ism_example containing
a project risk factors adjacency matrix for demonstration purposes.
Maintainer: Yi Tang [email protected] (ORCID)
Warfield, J. N. (1974). Developing interconnection matrices in structural modeling. IEEE Transactions on Systems, Man, and Cybernetics, SMC-4(1), 81-87. doi:10.1109/TSMC.1974.5408524
Sage, A. P. (1977). Interpretive Structural Modeling: Methodology for Large-scale Systems. McGraw-Hill.
Calculates the reachability matrix from an adjacency matrix using Warshall's algorithm. The reachability matrix shows all direct and indirect relationships between elements in a system.
compute_reachability(adj_matrix, include_self = TRUE)compute_reachability(adj_matrix, include_self = TRUE)
adj_matrix |
A square adjacency matrix (n x n) containing only 0s and 1s. A value of 1 at position (i,j) indicates that element i directly influences element j. |
include_self |
Logical. If |
The function implements Warshall's algorithm for computing the transitive closure of a directed graph. The time complexity is O(n^3) where n is the number of elements.
In standard ISM methodology, the reachability matrix is defined as:
where A is the adjacency matrix, I is the identity matrix, and k is the
smallest integer such that .
The diagonal elements being 1 (self-reachability) is essential for correct level partitioning in ISM analysis.
A reachability matrix of the same dimension as the input.
A value of 1 at position (i,j) indicates that element i can reach element j either directly or through intermediate elements.
When include_self = TRUE, diagonal elements are always 1.
Warfield, J. N. (1974). Developing interconnection matrices in structural modeling. IEEE Transactions on Systems, Man, and Cybernetics, SMC-4(1), 81-87. doi:10.1109/TSMC.1974.5408524
create_relation_matrix for creating adjacency matrices,
level_partitioning for hierarchical decomposition,
plot_ism for visualization.
# Create a 4x4 adjacency matrix adj_matrix <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) # Compute reachability matrix (with self-reachability) reach_matrix <- compute_reachability(adj_matrix) print(reach_matrix) # Note: diagonal elements are 1 (self-reachability) diag(reach_matrix) # With named elements rownames(adj_matrix) <- colnames(adj_matrix) <- c("A", "B", "C", "D") reach_matrix <- compute_reachability(adj_matrix) print(reach_matrix)# Create a 4x4 adjacency matrix adj_matrix <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) # Compute reachability matrix (with self-reachability) reach_matrix <- compute_reachability(adj_matrix) print(reach_matrix) # Note: diagonal elements are 1 (self-reachability) diag(reach_matrix) # With named elements rownames(adj_matrix) <- colnames(adj_matrix) <- c("A", "B", "C", "D") reach_matrix <- compute_reachability(adj_matrix) print(reach_matrix)
Converts various input formats (data.frame, matrix) to a standard adjacency matrix suitable for ISM analysis. Performs validation and provides warnings for potential issues.
convert_to_matrix(x, from = 1, to = 2, nodes = NULL, validate = TRUE)convert_to_matrix(x, from = 1, to = 2, nodes = NULL, validate = TRUE)
x |
Input data. Can be:
|
from |
Column name or index for source nodes (if x is a data.frame). Default is 1. |
to |
Column name or index for target nodes (if x is a data.frame). Default is 2. |
nodes |
Optional character vector of predefined node names. If provided, ensures the resulting matrix includes all specified nodes. |
validate |
Logical. If |
This function provides flexible input handling for ISM analysis. It can convert edge lists (either as data frames or two-column matrices) into adjacency matrices, or validate and return existing adjacency matrices.
When validate = TRUE, the function checks:
Square matrices contain only 0s and 1s (or logical values)
Edge list nodes exist in the predefined node list (if provided)
Column names exist in data frames
A square numeric adjacency matrix with node names as row and column names. A value of 1 at position (i,j) indicates a directed edge from node i to node j.
create_relation_matrix for a higher-level interface,
ssim_to_matrix for SSIM conversion,
compute_reachability for computing reachability matrices.
# From data frame edge list edge_df <- data.frame(source = c("A", "B"), target = c("B", "C")) convert_to_matrix(edge_df, from = "source", to = "target") # From matrix edge list edge_mat <- matrix(c("A", "B", "B", "C"), ncol = 2, byrow = TRUE) convert_to_matrix(edge_mat) # Existing adjacency matrix (validated and returned) adj_mat <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) convert_to_matrix(adj_mat) # With predefined nodes (ensures all nodes are included) edge_df <- data.frame(source = "A", target = "B") convert_to_matrix(edge_df, from = "source", to = "target", nodes = c("A", "B", "C", "D"))# From data frame edge list edge_df <- data.frame(source = c("A", "B"), target = c("B", "C")) convert_to_matrix(edge_df, from = "source", to = "target") # From matrix edge list edge_mat <- matrix(c("A", "B", "B", "C"), ncol = 2, byrow = TRUE) convert_to_matrix(edge_mat) # Existing adjacency matrix (validated and returned) adj_mat <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) convert_to_matrix(adj_mat) # With predefined nodes (ensures all nodes are included) edge_df <- data.frame(source = "A", target = "B") convert_to_matrix(edge_df, from = "source", to = "target", nodes = c("A", "B", "C", "D"))
Creates a new adjacency matrix or converts existing data to an adjacency matrix format suitable for ISM analysis.
create_relation_matrix(input, from = 1, to = 2, nodes = NULL)create_relation_matrix(input, from = 1, to = 2, nodes = NULL)
input |
Input data. Accepts:
|
from |
Column position or name for source nodes (when input is an edge list). Default is 1. |
to |
Column position or name for target nodes (when input is an edge list). Default is 2. |
nodes |
Optional character vector of predefined node names. Ensures matrix completeness when converting from edge lists. |
This function provides a unified interface for creating adjacency matrices in ISM analysis. It handles three common scenarios:
Creating an empty matrix of specified size for manual population
Converting edge list data (data.frame or matrix) to adjacency format
Validating existing adjacency matrices
A square adjacency matrix with node labels as dimnames. A value of 1 at position (i,j) indicates a directed relationship from element i to element j.
convert_to_matrix for the underlying conversion logic,
compute_reachability for computing reachability matrices.
# Create a 3x3 zero matrix create_relation_matrix(3) # Create with custom node labels create_relation_matrix(3, nodes = c("A", "B", "C")) # Convert edge list data.frame edge_df <- data.frame(source = c("A", "B"), target = c("B", "C")) create_relation_matrix(edge_df, from = "source", to = "target", nodes = LETTERS[1:4]) # Validate existing matrix existing_mat <- matrix(c(0, 1, 1, 0), nrow = 2) create_relation_matrix(existing_mat)# Create a 3x3 zero matrix create_relation_matrix(3) # Create with custom node labels create_relation_matrix(3, nodes = c("A", "B", "C")) # Convert edge list data.frame edge_df <- data.frame(source = c("A", "B"), target = c("B", "C")) create_relation_matrix(edge_df, from = "source", to = "target", nodes = LETTERS[1:4]) # Validate existing matrix existing_mat <- matrix(c(0, 1, 1, 0), nrow = 2) create_relation_matrix(existing_mat)
Creates an empty SSIM template or converts existing data to SSIM format. SSIM uses V/A/X/O notation to describe pairwise relationships between elements.
create_ssim(n, labels = NULL)create_ssim(n, labels = NULL)
n |
Number of elements, or a character vector of element names. |
labels |
Optional character vector of element labels. If |
SSIM (Structural Self-Interaction Matrix) is the standard input format for ISM analysis. For each pair of elements (i, j) where i < j, the relationship is coded as:
Element i influences element j (i -> j)
Element j influences element i (j -> i)
Both elements influence each other (i <-> j)
No relationship between elements
A character matrix of dimension n x n with:
Upper triangle: empty strings (to be filled with V/A/X/O)
Diagonal: "X" (self-relation)
Lower triangle: "-" (mirror of upper, not used directly)
ssim_to_matrix for converting SSIM to adjacency matrix,
create_relation_matrix for direct matrix creation.
# Create empty 4x4 SSIM ssim <- create_ssim(4) print(ssim) # Create with labels ssim <- create_ssim(c("Budget", "Resources", "Quality", "Success")) print(ssim) # Fill in relationships ssim["Budget", "Resources"] <- "V" ssim["Budget", "Quality"] <- "V" ssim["Resources", "Quality"] <- "V" ssim["Quality", "Success"] <- "V" print(ssim)# Create empty 4x4 SSIM ssim <- create_ssim(4) print(ssim) # Create with labels ssim <- create_ssim(c("Budget", "Resources", "Quality", "Success")) print(ssim) # Fill in relationships ssim["Budget", "Resources"] <- "V" ssim["Budget", "Quality"] <- "V" ssim["Resources", "Quality"] <- "V" ssim["Quality", "Success"] <- "V" print(ssim)
Performs transitive reduction on a reachability matrix to extract only the direct (essential) edges, removing edges that can be inferred through transitive paths.
extract_direct_edges(reach_matrix, adj_matrix = NULL)extract_direct_edges(reach_matrix, adj_matrix = NULL)
reach_matrix |
A square reachability matrix (n x n) with 0/1 entries. |
adj_matrix |
Optional. The original adjacency matrix. If provided, the function will use it to identify direct edges more accurately. |
Transitive reduction removes redundant edges from a directed graph while preserving reachability. An edge (i,j) is considered redundant (transitive) if there exists another path from i to j through intermediate nodes.
For example, if A->B->C and A->C, the edge A->C is transitive and will be removed, leaving only A->B and B->C.
This is essential for creating clean ISM diagrams suitable for publications, as showing all reachability edges would result in cluttered graphs.
A matrix of the same dimension containing only direct edges (1s where there is a direct relationship that cannot be inferred from other paths).
identify_transitive_edges for identifying (not removing) transitive edges,
plot_ism which uses this function internally.
# Create adjacency matrix with a transitive edge # A -> B -> C, and A -> C (transitive) adj <- matrix(c(0, 1, 1, 0, 0, 1, 0, 0, 0), nrow = 3, byrow = TRUE) rownames(adj) <- colnames(adj) <- c("A", "B", "C") # Compute reachability reach <- compute_reachability(adj) print(reach) # Extract direct edges only direct <- extract_direct_edges(reach) print(direct) # A->C is removed because it's transitive through B# Create adjacency matrix with a transitive edge # A -> B -> C, and A -> C (transitive) adj <- matrix(c(0, 1, 1, 0, 0, 1, 0, 0, 0), nrow = 3, byrow = TRUE) rownames(adj) <- colnames(adj) <- c("A", "B", "C") # Compute reachability reach <- compute_reachability(adj) print(reach) # Extract direct edges only direct <- extract_direct_edges(reach) print(direct) # A->C is removed because it's transitive through B
Identifies which edges in a reachability matrix are transitive (can be inferred from other paths) versus direct (essential).
identify_transitive_edges(reach_matrix, adj_matrix = NULL)identify_transitive_edges(reach_matrix, adj_matrix = NULL)
reach_matrix |
A square reachability matrix (n x n) with 0/1 entries. |
adj_matrix |
Optional. The original adjacency matrix for comparison. |
This function is useful for understanding the structure of relationships and for creating visualizations where transitive edges are shown differently (e.g., as dashed lines) from direct edges.
A data frame with columns:
from: source node index
to: target node index
from_label: source node label (if available)
to_label: target node label (if available)
type: "direct" or "transitive"
extract_direct_edges for removing transitive edges,
plot_ism for visualization.
adj <- matrix(c(0, 1, 1, 0, 0, 1, 0, 0, 0), nrow = 3, byrow = TRUE) rownames(adj) <- colnames(adj) <- c("A", "B", "C") reach <- compute_reachability(adj) edges <- identify_transitive_edges(reach) print(edges)adj <- matrix(c(0, 1, 1, 0, 0, 1, 0, 0, 0), nrow = 3, byrow = TRUE) rownames(adj) <- colnames(adj) <- c("A", "B", "C") reach <- compute_reachability(adj) edges <- identify_transitive_edges(reach) print(edges)
A dataset containing an adjacency matrix representing relationships between project risk factors. This example is useful for demonstrating ISM analysis workflow.
data(ism_example)data(ism_example)
A 7x7 numeric matrix with row and column names F1 through F7, representing the following risk factors:
Budget Constraints - financial limitations
Resource Shortage - insufficient human or material resources
Technical Complexity - challenging technical requirements
Poor Communication - inadequate information flow
Schedule Pressure - tight deadlines
Quality Issues - defects and quality problems
Project Failure - ultimate negative outcome
The matrix values indicate direct influence relationships:
1: Factor in row directly influences factor in column
0: No direct influence
The relationships encoded are:
F1 (Budget) -> F2 (Resource), F5 (Schedule)
F2 (Resource) -> F3 (Technical), F6 (Quality)
F3 (Technical) -> F6 (Quality)
F4 (Communication) -> F2, F3, F6
F5 (Schedule) -> F4 (Communication), F6 (Quality)
F6 (Quality) -> F7 (Failure)
Hypothetical example for demonstration purposes, based on common project management risk factor relationships.
compute_reachability, level_partitioning,
micmac_analysis
# Load the example data data(ism_example) # View the adjacency matrix print(ism_example) # Compute reachability matrix reach <- compute_reachability(ism_example) print(reach) # Perform level partitioning levels <- level_partitioning(reach) print(levels) # MICMAC analysis micmac <- micmac_analysis(reach) print(micmac)# Load the example data data(ism_example) # View the adjacency matrix print(ism_example) # Compute reachability matrix reach <- compute_reachability(ism_example) print(reach) # Perform level partitioning levels <- level_partitioning(reach) print(levels) # MICMAC analysis micmac <- micmac_analysis(reach) print(micmac)
Performs hierarchical level decomposition of system elements based on their reachability and antecedent sets. This is a core step in Interpretive Structural Modelling (ISM) analysis.
level_partitioning(reach_matrix)level_partitioning(reach_matrix)
reach_matrix |
A square reachability matrix (n x n) with 0/1 entries,
typically computed using |
The algorithm implements the standard ISM level partitioning procedure:
For each remaining element i, compute:
Reachability set R(i): elements that i can reach (within remaining set)
Antecedent set A(i): elements that can reach i (within remaining set)
An element belongs to the current (top) level if:
, i.e., the reachability set equals the intersection
Remove top-level elements and repeat until all elements are assigned
This implementation correctly operates on the remaining subset at each iteration, which is essential for correct level assignment.
An object of class ism_levels, which is a list containing:
Each element is a vector of node indices belonging to that level
Level 1 is the top level (outcomes/dependent variables)
Higher numbered levels are lower in the hierarchy (drivers/independent variables)
Attribute labels: node names if the input matrix has dimnames
Warfield, J. N. (1974). Developing interconnection matrices in structural modeling. IEEE Transactions on Systems, Man, and Cybernetics, SMC-4(1), 81-87. doi:10.1109/TSMC.1974.5408524
Sage, A. P. (1977). Interpretive Structural Modeling: Methodology for Large-scale Systems. McGraw-Hill.
compute_reachability for computing reachability matrices,
plot_ism for visualization,
plot_interactive_ism for interactive visualization,
micmac_analysis for MICMAC analysis.
# Create adjacency matrix adj_matrix <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) rownames(adj_matrix) <- colnames(adj_matrix) <- c("A", "B", "C", "D") # Compute reachability matrix reach_mat <- compute_reachability(adj_matrix) # Perform level partitioning levels <- level_partitioning(reach_mat) print(levels) # Access specific levels levels[[1]] # Top level elements (outcomes) levels[[length(levels)]] # Bottom level elements (root causes)# Create adjacency matrix adj_matrix <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) rownames(adj_matrix) <- colnames(adj_matrix) <- c("A", "B", "C", "D") # Compute reachability matrix reach_mat <- compute_reachability(adj_matrix) # Perform level partitioning levels <- level_partitioning(reach_mat) print(levels) # Access specific levels levels[[1]] # Top level elements (outcomes) levels[[length(levels)]] # Bottom level elements (root causes)
Performs MICMAC (Cross-Impact Matrix Multiplication Applied to Classification) analysis on a reachability matrix to classify elements based on their driving power and dependence power.
micmac_analysis(reach_matrix)micmac_analysis(reach_matrix)
reach_matrix |
A square reachability matrix (n x n) with 0/1 entries,
typically computed using |
MICMAC analysis is a complementary technique to ISM that helps identify the key drivers and dependent variables in a system.
Driving Power: The number of elements that a given element can reach (row sum of reachability matrix).
Dependence Power: The number of elements that can reach a given element (column sum of reachability matrix).
Elements are classified into four clusters based on whether their driving and dependence powers are above or below the median values.
An object of class micmac_result, which is a data frame with:
node: node index
label: node label (from matrix dimnames or numeric)
driving_power: number of elements this node can reach
dependence_power: number of elements that can reach this node
cluster: classification into one of four clusters
The four clusters are:
Low driving power, low dependence. Disconnected from system.
Low driving power, high dependence. Outcomes/results.
High driving power, high dependence. Unstable, key connectors.
High driving power, low dependence. Root causes/drivers.
Duperrin, J. C., & Godet, M. (1973). Methode de hierarchisation des elements d'un systeme. Rapport economique du CEA, R-45-41.
Warfield, J. N. (1974). Developing interconnection matrices in structural modeling. IEEE Transactions on Systems, Man, and Cybernetics, SMC-4(1), 81-87. doi:10.1109/TSMC.1974.5408524
plot_micmac for visualization,
compute_reachability for computing reachability matrices,
level_partitioning for hierarchical decomposition.
# Create adjacency matrix adj <- matrix(c(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 5, byrow = TRUE) rownames(adj) <- colnames(adj) <- paste0("F", 1:5) # Compute reachability and MICMAC reach <- compute_reachability(adj) micmac <- micmac_analysis(reach) print(micmac) # View cluster distribution table(micmac$cluster)# Create adjacency matrix adj <- matrix(c(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 5, byrow = TRUE) rownames(adj) <- colnames(adj) <- paste0("F", 1:5) # Compute reachability and MICMAC reach <- compute_reachability(adj) micmac <- micmac_analysis(reach) print(micmac) # View cluster distribution table(micmac$cluster)
Generates interactive Interpretive Structural Model diagrams with node dragging, zooming, and level-based filtering capabilities. Requires the visNetwork package (suggested dependency).
plot_interactive_ism( reach_matrix, node_labels = NULL, level_result = NULL, show_transitive = FALSE, direction = c("UD", "LR", "DU", "RL") )plot_interactive_ism( reach_matrix, node_labels = NULL, level_result = NULL, show_transitive = FALSE, direction = c("UD", "LR", "DU", "RL") )
reach_matrix |
A reachability matrix (n x n) representing the ISM relationships. |
node_labels |
A character vector of length n specifying custom node
labels. If |
level_result |
A list of class |
show_transitive |
Logical. If |
direction |
Layout direction for visualization. Options:
|
This function requires the visNetwork package. If viridis is available, it will be used for level-based coloring; otherwise, a default color palette is used.
The interactive visualization provides several features:
Drag nodes: Click and drag to reposition nodes
Zoom: Use mouse wheel or navigation buttons
Highlight: Hover over nodes to highlight connections
Filter: Select nodes by ID or filter by level group
Keyboard navigation: Use arrow keys to navigate
By default, transitive edges are removed using extract_direct_edges
to produce cleaner diagrams. Set show_transitive = TRUE to show all edges.
An interactive visNetwork object that can be displayed in
RStudio Viewer, Shiny apps, or web browsers.
plot_ism for static visualization,
level_partitioning for computing hierarchical levels,
compute_reachability for computing reachability matrices,
extract_direct_edges for transitive reduction.
# Create sample data adj_matrix <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) rownames(adj_matrix) <- colnames(adj_matrix) <- LETTERS[1:4] reach_matrix <- compute_reachability(adj_matrix) levels <- level_partitioning(reach_matrix) # Basic interactive plot (requires visNetwork) if (requireNamespace("visNetwork", quietly = TRUE)) { plot_interactive_ism(reach_matrix) # With custom labels and levels plot_interactive_ism(reach_matrix, node_labels = c("Factor A", "Factor B", "Factor C", "Factor D"), level_result = levels) }# Create sample data adj_matrix <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) rownames(adj_matrix) <- colnames(adj_matrix) <- LETTERS[1:4] reach_matrix <- compute_reachability(adj_matrix) levels <- level_partitioning(reach_matrix) # Basic interactive plot (requires visNetwork) if (requireNamespace("visNetwork", quietly = TRUE)) { plot_interactive_ism(reach_matrix) # With custom labels and levels plot_interactive_ism(reach_matrix, node_labels = c("Factor A", "Factor B", "Factor C", "Factor D"), level_result = levels) }
Visualizes the Interpretive Structural Model (ISM) as a hierarchical diagram. By default, only essential edges are shown (transitive edges removed) for cleaner visualization suitable for publications.
plot_ism( reach_matrix, levels = NULL, show_transitive = FALSE, use_igraph = FALSE, node_labels = NULL, main = "ISM Hierarchical Structure", ... )plot_ism( reach_matrix, levels = NULL, show_transitive = FALSE, use_igraph = FALSE, node_labels = NULL, main = "ISM Hierarchical Structure", ... )
reach_matrix |
A square reachability matrix (n x n) with 0/1 entries,
typically computed using |
levels |
Optional. An object of class |
show_transitive |
Logical. If |
use_igraph |
Logical. If |
node_labels |
Optional character vector of node labels. If NULL, uses matrix row names or numeric indices. |
main |
Title for the plot. Default is "ISM Hierarchical Structure". |
... |
Additional arguments passed to plotting functions. |
The function performs transitive reduction by default, removing edges that can be inferred from other paths. This produces cleaner diagrams that are more suitable for academic publications and presentations.
Two plotting backends are available:
Base R (default): No additional packages required. Nodes are arranged in horizontal levels with arrows showing relationships.
igraph: Requires the igraph package. Provides more sophisticated graph layouts and styling options.
Invisibly returns a list containing:
levels: the level partitioning result
edges: data frame of edges used in the plot
reduced_matrix: the adjacency matrix after transitive reduction
plot_interactive_ism for interactive visualization,
compute_reachability for computing reachability matrices,
level_partitioning for hierarchical decomposition,
extract_direct_edges for transitive reduction.
# Create adjacency matrix adj <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) rownames(adj) <- colnames(adj) <- c("A", "B", "C", "D") # Compute reachability reach <- compute_reachability(adj) # Plot ISM structure (base R, transitive edges removed) plot_ism(reach) # Show all edges including transitive ones plot_ism(reach, show_transitive = TRUE) # Use igraph if available plot_ism(reach, use_igraph = TRUE)# Create adjacency matrix adj <- matrix(c(0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 4, byrow = TRUE) rownames(adj) <- colnames(adj) <- c("A", "B", "C", "D") # Compute reachability reach <- compute_reachability(adj) # Plot ISM structure (base R, transitive edges removed) plot_ism(reach) # Show all edges including transitive ones plot_ism(reach, show_transitive = TRUE) # Use igraph if available plot_ism(reach, use_igraph = TRUE)
Creates a scatter plot showing the MICMAC classification of elements based on their driving power and dependence power.
plot_micmac(micmac_result, show_labels = TRUE, main = "MICMAC Analysis", ...)plot_micmac(micmac_result, show_labels = TRUE, main = "MICMAC Analysis", ...)
micmac_result |
An object of class |
show_labels |
Logical. If |
main |
Title for the plot. Default is "MICMAC Analysis". |
... |
Additional arguments passed to |
The plot is divided into four quadrants:
Autonomous variables - weak drivers, weak dependence
Dependent variables - weak drivers, strong dependence
Linkage variables - strong drivers, strong dependence
Independent variables - strong drivers, weak dependence
Invisibly returns the micmac_result object.
micmac_analysis for computing MICMAC results.
adj <- matrix(c(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 5, byrow = TRUE) rownames(adj) <- colnames(adj) <- paste0("F", 1:5) reach <- compute_reachability(adj) micmac <- micmac_analysis(reach) plot_micmac(micmac)adj <- matrix(c(0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 5, byrow = TRUE) rownames(adj) <- colnames(adj) <- paste0("F", 1:5) reach <- compute_reachability(adj) micmac <- micmac_analysis(reach) plot_micmac(micmac)
Print method for objects of class ism_levels created by
level_partitioning.
## S3 method for class 'ism_levels' print(x, ...)## S3 method for class 'ism_levels' print(x, ...)
x |
An object of class |
... |
Additional arguments (ignored) |
Invisibly returns the input object
Print MICMAC Results
## S3 method for class 'micmac_result' print(x, ...)## S3 method for class 'micmac_result' print(x, ...)
x |
An object of class |
... |
Additional arguments (ignored) |
Invisibly returns the input object
Print SSIM Matrix
## S3 method for class 'ssim_matrix' print(x, ...)## S3 method for class 'ssim_matrix' print(x, ...)
x |
An object of class |
... |
Additional arguments passed to print.default |
Invisibly returns the input object
Converts a Structural Self-Interaction Matrix (SSIM) with V/A/X/O notation to a binary adjacency matrix suitable for ISM analysis.
ssim_to_matrix(ssim, validate = TRUE)ssim_to_matrix(ssim, validate = TRUE)
ssim |
A square character matrix with V/A/X/O values in the upper triangle.
Can be created using |
validate |
Logical. If |
The conversion rules are:
Sets adj[i,j] = 1 (i influences j)
Sets adj[j,i] = 1 (j influences i)
Sets adj[i,j] = 1 AND adj[j,i] = 1 (mutual influence)
No edges added
A square numeric adjacency matrix where:
1 at position (i,j) indicates element i influences element j
0 indicates no direct influence
create_ssim for creating SSIM templates,
compute_reachability for the next step in ISM analysis.
# 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)# 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)
Summary of ISM Levels
## S3 method for class 'ism_levels' summary(object, ...)## S3 method for class 'ism_levels' summary(object, ...)
object |
An object of class |
... |
Additional arguments (ignored) |
A data frame with level information