Skip to contents

Standardized Direct Effect Centrality

Usage

DirectCentralStd(phi, sigma, delta_t, tol = 0.001)

Arguments

phi

Numeric matrix. The drift matrix (\(\boldsymbol{\Phi}\)). phi should have row and column names pertaining to the variables in the system.

sigma

Numeric matrix. The process noise covariance matrix (\(\boldsymbol{\Sigma}\)).

delta_t

Vector of positive numbers. Time interval (\(\Delta t\)).

tol

Numeric. Smallest possible time interval to allow.

Value

Returns an object of class ctmedmed which is a list with the following elements:

call

Function call.

args

Function arguments.

fun

Function used ("DirectCentralStd").

output

A matrix of standardized direct effect centrality.

Details

Standardized direct effect centrality is the sum of all possible standardized direct effects between different pairs of variables in which a specific variable serves as the only mediator.

Author

Ivan Jacob Agaloos Pesigan

Examples

phi <- matrix(
  data = c(
    -0.357, 0.771, -0.450,
    0.0, -0.511, 0.729,
    0, 0, -0.693
  ),
  nrow = 3
)
colnames(phi) <- rownames(phi) <- c("x", "m", "y")
sigma <- matrix(
  data = c(
    0.24455556, 0.02201587, -0.05004762,
    0.02201587, 0.07067800, 0.01539456,
    -0.05004762, 0.01539456, 0.07553061
  ),
  nrow = 3
)

# Specific time interval ----------------------------------------------------
DirectCentralStd(
  phi = phi,
  sigma = sigma,
  delta_t = 1
)
#> Call:
#> DirectCentralStd(phi = phi, sigma = sigma, delta_t = 1)
#> 
#> Direct Effect Centrality
#>      interval      x       m      y
#> [1,]        1 0.5494 -0.2858 0.3888

# Range of time intervals ---------------------------------------------------
direct_central_std <- DirectCentralStd(
  phi = phi,
  sigma = sigma,
  delta_t = 1:30
)
plot(direct_central_std)


# Methods -------------------------------------------------------------------
# DirectCentralStd has a number of methods including
# print, summary, and plot
direct_central_std <- DirectCentralStd(
  phi = phi,
  sigma = sigma,
  delta_t = 1:5
)
print(direct_central_std)
#> Call:
#> DirectCentralStd(phi = phi, sigma = sigma, delta_t = 1:5)
#> 
#> Direct Effect Centrality
#>      interval      x       m      y
#> [1,]        1 0.5494 -0.2858 0.3888
#> [2,]        2 0.6044 -0.3429 0.5053
#> [3,]        3 0.4999 -0.3114 0.4936
#> [4,]        4 0.3686 -0.2537 0.4293
#> [5,]        5 0.2555 -0.1954 0.3508
summary(direct_central_std)
#> Call:
#> DirectCentralStd(phi = phi, sigma = sigma, delta_t = 1:5)
#> 
#> Direct Effect Centrality
#>      interval      x       m      y
#> [1,]        1 0.5494 -0.2858 0.3888
#> [2,]        2 0.6044 -0.3429 0.5053
#> [3,]        3 0.4999 -0.3114 0.4936
#> [4,]        4 0.3686 -0.2537 0.4293
#> [5,]        5 0.2555 -0.1954 0.3508
plot(direct_central_std)