Learn R Programming

L0ggm (version 0.1.2)

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 index (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

A named numeric vector of traditional and likelihood-based fit indices. The vector always contains the following elements:

chisq

Chi-square statistic (\(\chi^2 = n \cdot F_{ML}\)), where \(F_{ML}\) is the maximum likelihood discrepancy function between the model-implied and empirical correlation matrices

df

Degrees of freedom: total number of unique off-diagonal correlations minus the number of non-zero edges in network

chisq.p.value

p-value for the chi-square test of exact fit (H0: model-implied covariance equals the population covariance)

RMSEA

Root mean square error of approximation. Values \(\leq\) 0.05 indicate close fit; values \(\leq\) 0.08 indicate acceptable fit

RMSEA.XX.lower, RMSEA.XX.upper

Lower and upper bounds of the ci-level confidence interval for RMSEA, where XX is the integer percentage (e.g., RMSEA.95.lower and RMSEA.95.upper for a 95% CI)

RMSEA.p.value

p-value for the one-sided test of close fit (H0: RMSEA \(\leq\) 0.05)

CFI

Comparative fit index, comparing the target model to an independence (null) baseline. Values \(\geq\) 0.95 indicate acceptable fit

TLI

Tucker-Lewis index (non-normed fit index). Values \(\geq\) 0.95 indicate acceptable fit; can fall outside \([0, 1]\) for severely misspecified models

SRMR

Standardized root mean residual: the root mean squared difference between the model-implied and observed correlation matrices. Values \(\leq\) 0.08 indicate acceptable fit

logLik

Gaussian log-likelihood of the model-implied correlation matrix, assuming zero mean structure (means are not estimated)

AIC

Akaike's information criterion: \(-2 \cdot \log L + 2 \cdot E\), where \(E\) is the number of non-zero edges in network

BIC

Bayesian information criterion: \(-2 \cdot \log L + E \cdot \log(n)\)

Arguments

network

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

n

Numeric (length = 1). Sample size

S

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

ci

Numeric (length = 1). Confidence interval for RMSEA. Defaults to 0.95

Author

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
# Obtain correlation matrix
S <- auto_correlate(basic_smallworld)

# Obtain Weibull network
weibull_network <- network_estimation(data = basic_smallworld, LLA = TRUE)

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

Run the code above in your browser using DataLab