Learn R Programming

EGAnet (version 2.0.2)

boot.ergoInfo: Bootstrap Test for the Ergodicity Information Index

Description

Tests the Ergodicity Information Index obtained in the empirical sample with a distribution of EII obtained by bootstrap sampling (see Details for the procedure)

Usage

boot.ergoInfo(
  dynEGA.object,
  EII,
  use = c("edge.list", "unweighted", "weighted"),
  iter = 100,
  ncores,
  verbose = TRUE
)

Value

Returns a list containing:

empirical.ergoInfo

Empirical Ergodicity Information Index

boot.ergoInfo

The values of the Ergodicity Information Index obtained in the bootstrap

p.value

The two-sided p-value of the bootstrap test for the Ergodicity Information Index. The null hypothesis is that the empirical Ergodicity Information index is equal to the expected value of the EII with small variation in the population structure

effect

Indicates wheter the empirical EII is greater or less then the bootstrap distribution of EII.

interpretation

How you can interpret the result of the test in plain English

Arguments

dynEGA.object

A dynEGA or a dynEGA.ind.pop object. If a dynEGA object, then level = c("individual", "population") is required

EII

A ergoInfo object used to estimate the Empirical Ergodicity Information Index or the estimated value of EII estimated using the ergoInfo function. Inherits use from ergoInfo. If no ergoInfo object is provided, then it is estimated

use

Character (length = 1). A string indicating what network element will be used to compute the algorithm complexity, the list of edges or the weights of the network. Defaults to use = "edge.list". Current options are:

  • "edge.list" --- Calculates the algorithm complexity using the list of edges

  • "unweighted" --- Calculates the algorithm complexity using the binary weights of the network. 0 = edge absent and 1 = edge present

  • "weighted" --- Calculates the algorithm complexity using the weights of encoded prime-weight transformed network

iter

Numeric (length = 1). Number of replica samples to generate from the bootstrap analysis. Defaults to 100 (recommended)

ncores

Numeric (length = 1). Number of cores to use in computing results. Defaults to ceiling(parallel::detectCores() / 2) or half of your computer's processing power. Set to 1 to not use parallel computing

If you're unsure how many cores your computer has, then type: parallel::detectCores()

verbose

Boolean (length = 1). Should progress be displayed? Defaults to TRUE. Set to FALSE to not display progress

Author

Hudson Golino <hfg9s at virginia.edu> & Alexander P. Christensen <alexander.christensen at Vanderbilt.Edu>

Details

In traditional bootstrap sampling, individual participants are resampled with replacement from the empirical sample. This process is time consuming when carried out across v number of variables, n number of participants, t number of time points, and i number of iterations.

A more efficient process, the approach applied here, is to obtain a sampling distribution of EII values as if all participants in the data have the population network structure. Sampling is not perfect and therefore random noise is added to the edges of the population structure to simulate sampling variability. This noise follows a random uniform distribution ranging from -0.10 to 0.10. In addition, a proportion of edges are rewired to allow for slight variations on the population structure. The proportion of nodes that are rewired is sampled from a random uniform distribution between 0.20 to 0.40. This process is carried out for each participant resulting in n variations of the population structure. Afterward, EII is computed. This process is carried out for i iterations (e.g., 100).

The result is a sampling distribution of EII values that would be expected if the process was ergodic. If the empirical EII value is significantly less than the distribution or not significantly different, then the empirical data can be expected to be generated from an ergodic process and the population structure is sufficient to describe all individuals. If the empirical EII value is significantly greater than the distribution, then the empirical data cannot be described by the population structure -- significant information is lost when collapsing across to the population structure.

References

Original Implementation
Golino, H., Nesselroade, J., & Christensen, A. P. (2022). Toward a psychology of individuals: The ergodicity information index and a bottom-up approach for finding generalizations. PsyArXiv.

See Also

plot.EGAnet for plot usage in EGAnet

Examples

Run this code
# Obtain simulated data
sim.data <- sim.dynEGA

if (FALSE) {
# Dynamic EGA individual and population structures
dyn1 <- dynEGA.ind.pop(
  data = sim.dynEGA[,-26], n.embed = 5, tau = 1,
  delta = 1, id = 25, use.derivatives = 1,
  model = "glasso", ncores = 2, corr = "pearson"
)

# Empirical Ergodicity Information Index
eii1 <- ergoInfo(dynEGA.object = dyn1, use = "edge.list")

# Bootstrap Test for Ergodicity Information Index
testing.ergoinfo <- boot.ergoInfo(
  dynEGA.object = dyn1, EII = eii1,
  ncores = 2
)

# Plot result
plot(testing.ergoinfo)

# Example using `dynEGA`
dyn2 <- dynEGA(
  data = sim.dynEGA, n.embed = 5, tau = 1,
  delta = 1, use.derivatives = 1, ncores = 2,
  level = c("individual", "population")
)

# Empirical Ergodicity Information Index
eii2 <- ergoInfo(dynEGA.object = dyn2, use = "edge.list")

# Bootstrap Test for Ergodicity Information Index
testing.ergoinfo2 <- boot.ergoInfo(
  dynEGA.object = dyn2, EII = eii2,
  ncores = 2
)

# Plot result
plot(testing.ergoinfo2)}

Run the code above in your browser using DataLab