Learn R Programming

ggm (version 2.5.2)

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

4,089

Version

2.5.2

License

GPL-2

Maintainer

Giovanni M Marchetti

Last Published

July 25th, 2025

Functions in ggm (2.5.2)

SG

summary graph
RepMarBG

Representational Markov equivalence to bidirected graphs.
RG

Ribbonless graph
UG

Defining an undirected graph (UG)
Simple Graph Operations

Simple graph operations
RepMarUG

Representational Markov equivalence to undirected graphs.
Utility Functions

Utility functions
RepMarDAG

Representational Markov equivalence to directed acyclic graphs.
cmpGraph

The complementary graph
Max

Maximisation for graphs
adjMatrix

Adjacency matrix of a graph
basiSet

Basis set of a DAG
bfsearch

Breadth first search
anger

Anger data
allEdges

All edges of a graph
blkdiag

Block diagonal matrix
dSep

d-separation
binve

Inverts a marginal log-linear parametrization
checkIdent

Identifiability of a model with one latent variable
conComp

Connectivity components
essentialGraph

Essential graph
findPath

Finding paths
blodiag

Block diagonal matrix
edgematrix

Edge matrix of a graph
fitConGraph

Fitting a Gaussian concentration graph model
icf

Iterative conditional fitting
fitAncestralGraph

Fitting of Gaussian Ancestral Graph Models
diagv

Matrix product with a diagonal matrix
isADMG

Acyclic directed mixed graphs
fitDag

Fitting of Gaussian DAG models
grMAT

Graph to adjacency matrix
fitCovGraph

Fitting of Gaussian covariance graph models
drawGraph

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

Ancestral graph
rnormDag

Random sample from a decomposable Gaussian model
ggm

The package ggm: summary information
stress

Stress
glucose

Glucose control
null

Null space of a matrix
msep

The m-separation criterion
derived

Data on blood pressure body mass and age
marks

Mathematics marks
fitmlogit

Multivariate logistic models
shipley.test

Test of all independencies implied by a given DAG
cycleMatrix

Fundamental cycles
fitDagLatent

Fitting Gaussian DAG models with one latent variable
topSort

Topological sort
isAcyclic

Graph queries
correlations

Marginal and partial correlations
makeMG

Mixed Graphs
rsphere

Random vectors on a sphere
mat.mlogit

Multivariate logistic parametrization
fundCycles

Fundamental cycles
transClos

Transitive closure of a graph
triDec

Triangular decomposition of a covariance matrix
parcor

Partial correlations
powerset

Power set
marg.param

Link function of marginal log-linear parameterization
unmakeMG

Loopless mixed graphs components
pcor

Partial correlation
rcorr

Random correlation matrix
isGident

G-identifiability of an UG
pcor.test

Test for zero partial association
surdata

A simulated data set
plotGraph

Plot of a mixed graph
swp

Sweep operator
AG

Ancestral graph
MSG

Maximal summary graph
MRG

Maximal ribbonless graph
In

Indicator matrix
InducedGraphs

Graphs induced by marginalization or conditioning
DG

Directed graphs
MAG

Maximal ancestral graph
MarkEqMag

Markov equivalence of maximal ancestral graphs
DAG

Directed acyclic graphs (DAGs)
MarkEqRcg

Markov equivalence for regression chain graphs.