plot.pag: Plot partial ancestral graph (PAG)

View source: R/plot.R

plot.pagR Documentation

Plot partial ancestral graph (PAG)

Description

Plot partial ancestral graph (PAG)

Usage

## S3 method for class 'pag'
plot(x, ...)

Arguments

x

pag object to be plotted (as outputted from fci).

...

Currently not in use.

Value

No return value, the function is called for its side-effects (plotting).

Author(s)

This code is a modification of the fciAlgo plotting method implemented in the pcalg package.

Examples

# simulate linear Gaussian data w unobserved variable L1
n <- 100
L1 <- rnorm(n) 
X1 <- rnorm(n)
X2 <- L1 + X1 + rnorm(n)
X3 <- X1 + rnorm(n)
X4 <- X3 + L1 + rnorm(n)
d <- data.frame(p1_X1 = X1,
                p1_X2 = X2,
                p2_X3 = X3,
                p2_X4 = X4)

# use FCI algorithm to recover PAG                
res <- fci(d, test = corTest)

# plot
plot(res)


causalDisco documentation built on Jan. 20, 2026, 5:09 p.m.