Learn R Programming

EGAnet (version 2.4.0)

network.fit: Traditional Fit Metrics for Networks

Description

Computes several traditional fit metrics for networks including

  • chi-square (\(\chi^2\))

  • root mean square error of approximation (RMSEA) with confidence intervals

  • confirmatory fit index (CFI)

  • Tucker-Lewis inded (TLI)

  • standardized root mean residual (SRMR)

  • log-likelihood

  • Akaike's information criterion (AIC)

  • Bayesian information criterion (BIC)

Usage

network.fit(network, n, S, ci = 0.95)

Value

Returns a named vector of fit statistics

Arguments

network

Matrix or data frame. A p by p sqaure network matrix

n

Numeric (length = 1). Sample size

S

Matrix or data frame. A p by p sqaure zero-order correlation matrix corresponding with the input network

ci

Numeric (length = 1). Confidence interval for RMSEA

Author

Hudson Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>

References

Epskamp, S., Rhemtulla, M., & Borsboom, D. (2017). Generalized network psychometrics: Combining network and latent variable models. Psychometrika, 82(4), 904–927.

Examples

Run this code
# Load data
wmt <- wmt2[,7:24]

# Obtain correlation matrix
S <- auto.correlate(wmt)

# EBICglasso (default for EGA functions)
glasso_network <- network.estimation(
  data = wmt, model = "glasso"
)

# Obtain fit (expects continuous variables!)
network.fit(network = glasso_network, n = nrow(wmt), S = S)
# Scaled metrics are not yet available for
# dichotomous or polytomous data!

Run the code above in your browser using DataLab