Skip to contents

Standardized Indirect Effect Centrality

Usage

IndirectCentralStd(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 ("IndirectCentralStd").

output

A matrix of standardized indirect effect centrality.

Details

Standardized indirect effect centrality is the sum of all possible standardized indirect 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 ----------------------------------------------------
IndirectCentralStd(
  phi = phi,
  sigma = sigma,
  delta_t = 1
)
#> Call:
#> IndirectCentralStd(phi = phi, sigma = sigma, delta_t = 1)
#> 
#> Indirect Effect Centrality
#>      interval x      m y
#> [1,]        1 0 0.1789 0

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


# Methods -------------------------------------------------------------------
# IndirectCentralStd has a number of methods including
# print, summary, and plot
indirect_central_std <- IndirectCentralStd(
  phi = phi,
  sigma = sigma,
  delta_t = 1:5
)
print(indirect_central_std)
#> Call:
#> IndirectCentralStd(phi = phi, sigma = sigma, delta_t = 1:5)
#> 
#> Indirect Effect Centrality
#>      interval x      m y
#> [1,]        1 0 0.1789 0
#> [2,]        2 0 0.4283 0
#> [3,]        3 0 0.5794 0
#> [4,]        4 0 0.6222 0
#> [5,]        5 0 0.5899 0
summary(indirect_central_std)
#> Call:
#> IndirectCentralStd(phi = phi, sigma = sigma, delta_t = 1:5)
#> 
#> Indirect Effect Centrality
#>      interval x      m y
#> [1,]        1 0 0.1789 0
#> [2,]        2 0 0.4283 0
#> [3,]        3 0 0.5794 0
#> [4,]        4 0 0.6222 0
#> [5,]        5 0 0.5899 0
plot(indirect_central_std)