create_ssim: Create SSIM (Structural Self-Interaction Matrix)

View source: R/ssim.R

create_ssimR Documentation

Create SSIM (Structural Self-Interaction Matrix)

Description

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.

Usage

create_ssim(n, labels = NULL)

Arguments

n

Number of elements, or a character vector of element names.

labels

Optional character vector of element labels. If n is a character vector, this parameter is ignored.

Details

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:

V

Element i influences element j (i -> j)

A

Element j influences element i (j -> i)

X

Both elements influence each other (i <-> j)

O

No relationship between elements

Value

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)

See Also

ssim_to_matrix for converting SSIM to adjacency matrix, create_relation_matrix for direct matrix creation.

Examples

# 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)

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