What is psychonetrics?

psychonetrics is an R package that unifies structural equation modeling (SEM) and network analysis under a single framework. The core innovation is simple but powerful: any variance-covariance matrix in a model can be parameterized as a Gaussian Graphical Model (GGM), where edges represent partial correlations—i.e., conditional independence relationships between variables.

This means that standard psychometric models—confirmatory factor analysis, structural equation models, vector autoregressive models—can all be extended with network structures. A latent covariance matrix can become a latent network. Residual covariances can become a residual network. The package provides maximum likelihood estimation, model fit testing, and automated model search for all of these models.

More generally, any variance-covariance structure Σ in the model can be decomposed in one of five ways:

TypeDecompositionInterpretation
covΣ (direct)Covariance matrix
cholΣ = LLCholesky decomposition
precΣ = K−1Precision (inverse covariance) matrix
ggmΣ = Δ(IΩ)−1ΔGaussian Graphical Model (network)
corΣ = SD · P · SDCorrelation matrix

Furthermore, the package includes powerful exploratory search algorithms and offers novel modeling capabilities for longitudinal data (vector-autoregression), binary data (Ising model), and ill-defined latent variable models (Cholesky decomposition).

Key Features

Confirmatory Network Modeling

Specify, estimate, and test hypothesized network structures with full model fit statistics.

Multi-Group Analysis

Compare networks and SEM models across groups with flexible equality constraints and invariance testing.

Multiple Estimators

ML, FIML (missing data), PML/PFIML (penalized)*, WLS, DWLS, and WLSMV* estimation.

Automated Model Search

Pruning, stepwise search, and combined strategies guided by modification indices and information criteria.

Penalized Estimation*

LASSO, Ridge, and Elastic Net regularization with automatic penalty selection via EBIC.

Multiple Data Types

Continuous, ordinal*, and binary data. Cross-sectional, time-series, and panel data. Raw data or summary statistics.

Missing Data Handling

Full Information Maximum Likelihood (FIML) for handling missing data without listwise deletion.

High Performance

Core computations in C++ via Rcpp and RcppArmadillo for fast estimation, even with large models.

* Experimental feature — not yet fully validated.

Model Families

Varcov Family

Models a variance-covariance matrix directly. Use the GGM parameterization to estimate network models of observed variables, including multi-group comparisons.

Wrappers: ggm(), precision(), cholesky(), corr()

Learn more →

LVM Family

Latent variable models (CFA / SEM) where latent and residual covariances can be modeled as networks. Supports bifactor models and latent growth curves.

Wrappers: lnm(), rnm(), lrnm(), bifactor(), latentgrowth()

Learn more →

Ising Model

Network model for binary/dichotomous data based on the Ising model from statistical physics. Models pairwise interactions between binary nodes.

Function: Ising()

Learn more →

Var1 Family

Lag-1 vector autoregressive models for time-series data. The contemporaneous covariance structure can be modeled as a GGM (graphical VAR). Extracts temporal (PDC) and contemporaneous (PCC) networks.

Wrappers: gvar()

Learn more →

DLVM1 Family

Dynamic latent variable models for panel data. Decomposes temporal dynamics, within-person contemporaneous relations, and between-person individual differences into separate network structures.

Wrappers: panelgvar(), panelvar(), panellvgvar()

Learn more →

Installation

# Install from CRAN:
install.packages("psychonetrics")

# Or install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("SachaEpskamp/psychonetrics")

# Load the package:
library("psychonetrics")

Quick Start

The typical psychonetrics workflow follows a pipe-based pattern:

library("psychonetrics")
library("dplyr")

# 1. Specify a model (e.g., a Gaussian Graphical Model):
model <- ggm(data, vars = vars, omega = "full")

# 2. Estimate:
model <- model %>% runmodel

# 3. Inspect results:
model %>% fit          # Fit indices (chi-square, CFI, RMSEA, BIC, ...)
model %>% parameters   # Parameter estimates with SEs and p-values
model %>% MIs          # Modification indices

# 4. Modify and compare:
model_pruned <- model %>% prune(alpha = 0.01)   # Remove non-significant edges
model_final  <- model_pruned %>% stepup          # Add edges by modification index

compare(saturated = model, pruned = model_pruned, final = model_final)

See the General Tutorial for a comprehensive walkthrough.

Citations

If you use psychonetrics in your research, please cite the following papers:

Epskamp, S. (2020). Psychometric network models from time-series and panel data. Psychometrika, 85(1), 206–231. DOI: 10.1007/s11336-020-09697-3
Epskamp, S., Isvoranu, A. M., & Cheung, M. W.-L. (2022). Meta-analytic Gaussian network aggregation. Psychometrika, 87(1), 12–46. DOI: 10.1007/s11336-021-09764-3

BibTeX entries:

@article{epskamp2020psychometric,
  author = {Epskamp, Sacha},
  title = {Psychometric network models from time-series and panel data},
  journal = {Psychometrika},
  volume = {85},
  number = {1},
  pages = {206--231},
  year = {2020},
  doi = {10.1007/s11336-020-09697-3}
}

@article{epskamp2022meta,
  author = {Epskamp, Sacha and Isvoranu, Adela-Maria and Cheung, Mike W.-L.},
  title = {Meta-analytic {G}aussian network aggregation},
  journal = {Psychometrika},
  volume = {87},
  number = {1},
  pages = {12--46},
  year = {2022},
  doi = {10.1007/s11336-021-09764-3}
}