Skip to content

Creates a pattern causality matrix object. This function constructs an object of class pc_matrix containing the positive, negative, and dark causality matrices, along with item names.

Usage

pc_matrix(
  positive = NULL,
  negative = NULL,
  dark = NULL,
  items = NULL,
  verbose = TRUE
)

Arguments

positive

Positive causality matrix.

negative

Negative causality matrix.

dark

Dark causality matrix.

items

Names of items in the matrices.

verbose

Logical, whether to print progress information.

Value

An object of class "pc_matrix".

Examples

data(climate_indices)
dataset <- climate_indices[, -1]
pc_matrix_obj <- pcMatrix(dataset, E = 3, tau = 1, 
  metric = "euclidean", h = 1, weighted = TRUE, 
  verbose = FALSE)
print(pc_matrix_obj)
#> Pattern Causality Matrix Analysis:
#> 
#> Number of items: 4 
#> 
#> Positive causality matrix:
#>             AO       AAO       NAO       PNA
#> AO          NA 0.4470570 0.1426120 0.3362232
#> AAO 0.31787881        NA 0.2950807 0.2185726
#> NAO 0.07403504 0.3259937        NA 0.3150331
#> PNA 0.32414421 0.3234224 0.2080319        NA
#> 
#> Negative causality matrix:
#>            AO       AAO       NAO       PNA
#> AO         NA 0.1379654 0.3660466 0.2072300
#> AAO 0.1937603        NA 0.2996719 0.3336452
#> NAO 0.3602206 0.1442329        NA 0.2829851
#> PNA 0.2300383 0.2211237 0.3063649        NA
#> 
#> Dark causality matrix:
#>            AO       AAO       NAO       PNA
#> AO         NA 0.4149776 0.4913415 0.4565468
#> AAO 0.4883609        NA 0.4052474 0.4477822
#> NAO 0.5657443 0.5297734        NA 0.4019818
#> PNA 0.4458175 0.4554539 0.4856031        NA