Skip to content

The pcEffect function processes a pattern causality matrix to compute and summarize the effects of positive, negative, and dark causality. It aggregates these causality measures to determine the total received and exerted influence for each item in the matrix, along with the difference between them.

Usage

pcEffect(pcmatrix)

Arguments

pcmatrix

A list containing three matrices (positive, negative, and dark) which represent the respective causality types for different items, as well as an items vector indicating the names of the items.

Value

A list containing three data frames (positive, negative, and dark), each summarizing the causality effects. Each data frame includes columns for the received, exerted, and the difference (Diff) of causality for each item.

Examples

# \donttest{
data(climate_indices)
dataset <- climate_indices[,-1]
pcmatrix <- pcMatrix(dataset, E = 3, tau = 1, metric = "euclidean", h = 1, weighted = TRUE)
#> CAUSE:  AO 
#> EFFECT:  AO 
#> EFFECT:  AAO 
#> EFFECT:  NAO 
#> EFFECT:  PNA 
#> CAUSE:  AAO 
#> EFFECT:  AO 
#> EFFECT:  AAO 
#> EFFECT:  NAO 
#> EFFECT:  PNA 
#> CAUSE:  NAO 
#> EFFECT:  AO 
#> EFFECT:  AAO 
#> EFFECT:  NAO 
#> EFFECT:  PNA 
#> CAUSE:  PNA 
#> EFFECT:  AO 
#> EFFECT:  AAO 
#> EFFECT:  NAO 
#> EFFECT:  PNA 
#> Calculation duration:  7.93310523033142
effects <- pcEffect(pcmatrix)
print(effects)
#> $positive
#>     received   exerted       Diff
#> AO  88.77708  67.40111  21.375968
#> AAO 80.93523 111.22759 -30.292355
#> NAO 73.48978  66.83627   6.653509
#> PNA 84.92457  82.66170   2.262878
#> 
#> $negative
#>     received  exerted       Diff
#> AO  74.39750 81.29800  -6.900503
#> AAO 85.83972 46.51561  39.324108
#> NAO 75.96038 96.37703 -20.416651
#> PNA 73.40194 85.40890 -12.006954
#> 
#> $dark
#>     received  exerted       Diff
#> AO  136.8254 151.3009 -14.475465
#> AAO 133.2251 142.2568  -9.031753
#> NAO 150.5498 136.7867  13.763142
#> PNA 141.6735 131.9294   9.744076
#> 
#> $items
#> [1] "AO"  "AAO" "NAO" "PNA"
#> 
# }