Skip to contents

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)

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

Value

Returns a named vector of fit statistics

References

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

Author

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

Examples

# 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)
#>          chisq             df  chisq.p.value          RMSEA RMSEA.95.lower 
#>   4.872873e+02   5.700000e+01   0.000000e+00   7.981465e-02   7.210562e-02 
#> RMSEA.95.upper  RMSEA.p.value            CFI            TLI           SRMR 
#>   8.767329e-02   6.732562e-10   9.512754e-01   8.692128e-01   5.685879e-02 
#>         logLik            AIC            BIC 
#>  -2.601760e+04   5.222720e+04   5.271464e+04 
# Scaled metrics are not yet available for
# dichotomous or polytomous data!