Learn R Programming

ggm (version 2.5.4)

Graphical Markov Models with Mixed Graphs

Description

Provides functions for defining mixed graphs containing three types of edges, directed, undirected and bi-directed, with possibly multiple edges. These graphs are useful because they capture fundamental independence structures in multivariate distributions and in the induced distributions after marginalization and conditioning. The package is especially concerned with Gaussian graphical models for (i) ML estimation for directed acyclic graphs, undirected and bi-directed graphs and ancestral graph models (ii) testing several conditional independencies (iii) checking global identification of DAG Gaussian models with one latent variable (iv) testing Markov equivalences and generating Markov equivalent graphs of specific types.

Copy Link

Version

Install

install.packages('ggm')

Monthly Downloads

8,358

Version

2.5.4

License

GPL-2

Maintainer

Giovanni M Marchetti

Last Published

August 4th, 2026

Functions in ggm (2.5.4)

allEdges

All edges of a graph
bfsearch

Breadth first search
blodiag

Block diagonal matrix
blkdiag

Block diagonal matrix
basiSet

Basis set of a DAG
binve

Inverts a marginal log-linear parametrization
conComp

Connectivity components
checkIdent

Identifiability of a model with one latent variable
anger

Anger data
cmpGraph

The complementary graph
derived

Data on blood pressure body mass and age
findPath

Finding paths
diagv

Matrix product with a diagonal matrix
cycleMatrix

Fundamental cycles
drawGraph

Drawing a graph with a simple point and click interface.
fitAncestralGraph

Fitting of Gaussian Ancestral Graph Models
edgematrix

Edge matrix of a graph
glucose

Glucose control
fitCovGraph

Fitting of Gaussian covariance graph models
correlations

Marginal and partial correlations
essentialGraph

Essential graph
fitDag

Fitting of Gaussian DAG models
fundCycles

Fundamental cycles
ggm

The package ggm: summary information
marks

Mathematics marks
isGident

G-identifiability of an UG
marg.param

Link function of marginal log-linear parameterization
makeMG

Mixed Graphs
isADMG

Acyclic directed mixed graphs
dSep

d-separation
msep

The m-separation criterion
isAcyclic

Graph queries
fitmlogit

Multivariate logistic models
mat.mlogit

Multivariate logistic parametrization
null

Null space of a matrix
fitConGraph

Fitting a Gaussian concentration graph model
isAG

Ancestral graph
icf

Iterative conditional fitting
fitDagLatent

Fitting Gaussian DAG models with one latent variable
grMAT

Graph to adjacency matrix
stress

Stress
parcor

Partial correlations
shipley.test

Test of all independencies implied by a given DAG
rnormDag

Random sample from a decomposable Gaussian model
plotGraph

Plot of a mixed graph
rsphere

Random vectors on a sphere
pcor.test

Test for zero partial association
powerset

Power set
surdata

A simulated data set
rcorr

Random correlation matrix
swp

Sweep operator
pcor

Partial correlation
unmakeMG

Loopless mixed graphs components
transClos

Transitive closure of a graph
topSort

Topological sort
triDec

Triangular decomposition of a covariance matrix
MSG

Maximal summary graph
InducedGraphs

Graphs induced by marginalization or conditioning
adjMatrix

Adjacency matrix of a graph
DAG

Directed acyclic graphs (DAGs)
MAG

Maximal ancestral graph
MarkEqRcg

Markov equivalence for regression chain graphs.
In

Indicator matrix
MRG

Maximal ribbonless graph
Utility Functions

Utility functions
Max

Maximisation for graphs
Simple Graph Operations

Simple graph operations
AG

Ancestral graph
MarkEqMag

Markov equivalence of maximal ancestral graphs
RG

Ribbonless graph
DG

Directed graphs
UG

Defining an undirected graph (UG)
RepMarUG

Representational Markov equivalence to undirected graphs.
SG

summary graph
RepMarBG

Representational Markov equivalence to bidirected graphs.
RepMarDAG

Representational Markov equivalence to directed acyclic graphs.