Learn R Programming

SEMgraph

Network Analysis and Causal Learning with Structural Equation Modeling

SEMgraph Estimate networks and causal relations in complex systems through Structural Equation Modeling (SEM). SEMgraph comes with the following functionalities:

  • Interchangeable model representation as either an igraph object

or the corresponding SEM in lavaan syntax. Model management functions include graph-to-SEM conversion, automated covariance matrix regularization, graph conversion to DAG, and tree (arborescence) from correlation matrices.

  • Heuristic filtering, node and edge weighting, resampling and

parallelization settings for fast fitting in case of very large models.

  • Automated data-driven model building and improvement, through causal

structure learning and bow-free interaction search and latent variable confounding adjustment.

  • Perturbed paths finding, community searching and sample scoring,

together with graph plotting utilities, tracing model architecture modifications and perturbation (i.e., activation or repression) routes.

Installation

The latest stable version can be installed from CRAN:

install.packages("SEMgraph")

The latest development version can be installed from GitHub:

# install.packages("devtools")
devtools::install_github("fernandoPalluzzi/SEMgraph")

Do not forget to install the SEMdata package too! It contains useful high-throughput sequencing data, reference networks, and pathways for SEMgraph training:

devtools::install_github("fernandoPalluzzi/SEMdata")

Copy Link

Version

Install

install.packages('SEMgraph')

Monthly Downloads

322

Version

1.2.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Barbara Tarantino

Last Published

January 29th, 2025

Functions in SEMgraph (1.2.3)

SEMtree

Tree-based structure learning methods
SEMgsa

SEM-based gene set analysis
SEMbap

Bow-free covariance search and data de-correlation
SEMpath

Search for directed or shortest paths between pairs of source-sink nodes
SEMdag

Estimate a DAG from an input (or empty) graph
SEMdci

SEM-based differential network analysis
alsData

Amyotrophic Lateral Sclerosis (ALS) dataset
Shipley.test

Missing edge testing implied by a DAG with Shipley's basis-set
SEMace

Compute the Average Causal Effect (ACE) for a given source-sink pair
SEMrun

Fit a graph as a Structural Equation Model (SEM)
clusterScore

Module scoring
factor.analysis

Factor analysis for high dimensional data
ancestry

Node ancestry utilities
gplot

Graph plotting with renderGraph
colorGraph

Vertex and edge graph coloring on the base of fitting
extractClusters

Cluster extraction utility
cplot

Subgraph mapping
clusterGraph

Topological graph clustering
graph2dag

Convert directed graphs to directed acyclic graphs (DAGs)
dagitty2graph

Graph conversion from dagitty to igraph
graph2dagitty

Graph conversion from igraph to dagitty
graph2lavaan

Graph to lavaan model
kegg

KEGG interactome
kegg.pathways

KEGG pathways
localCI.test

Conditional Independence (CI) local tests of an acyclic graph
lavaan2graph

lavaan model to graph
mergeNodes

Graph nodes merging by a membership attribute
modelSearch

Optimal model search strategies
pairwiseMatrix

Pairwise plotting of multivariate data
orientEdges

Assign edge orientation of an undirected graph
transformData

Transform data methods
sachs

Sachs multiparameter flow cytometry data and consensus model
summary.GGM

GGM model summary
pathFinder

Perturbed path search utility
summary.RICF

RICF model summary
parameterEstimates

Parameter Estimates of a fitted SEM
weightGraph

Graph weighting methods
resizeGraph

Interactome-assisted graph re-seizing
properties

Graph properties summary and graph decomposition