plot.graphlist: Plot Graph via Package 'igraph'

Description Usage Arguments Author(s) References See Also Examples

View source: R/plot.graphlist.R

Description

Plot FANOVA graphs using functions from package igraph.

Usage

1
2
3
## S3 method for class 'graphlist'
plot(x, names = NULL, i2 = NULL, layout = NULL, plot.i1=TRUE, max.thickness=15, 
circle.diameter=40, ...)

Arguments

x

an object of class graphlist as obtained from estimateGraph

names

optional character string, names of vertices, defaults to 1:d

i2

optional vector of second order interaction indices (thickness of inner edges)

plot.i1

optional boolean, if TRUE main effects are drawn in the graph by vertices thicknesses, should be set to FALSE when only total interaction indices are of interest

layout

optional layout for the graph as in igraph, default is layout.fruchterman.reingold

max.thickness

optional value for the maximal line thickness, defaults to 20

circle.diameter

optional value for the circle diameter, defaults to 40

...

additional arguments, passed to plot

Author(s)

J. Fruth, O. Roustant, S. Hess, S. Neumaerker

References

Muehlenstaedt, T.; Roustant, O.; Carraro, L.; Kuhnt, S. (2011) Data-driven Kriging models based on FANOVA-decomposition, Statistics and Computing.

Csardi, G.; Nepusz, T. (2006) The igraph software package for complex network research, InterJournal Complex Systems, Complex Systems, 1695.

See Also

plotGraphChange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
op <- par(no.readonly=TRUE)
g1 <- estimateGraph(f.mat=ishigami.fun, d=3, q.arg=list(min=-pi,max=pi), n.tot=10000)
plot(g1)
plot(g1, names=c("A","B","C"))
plot(g1, names=c("A","B","C"), plot.i1 = FALSE)

# include pure second order indices
g2 <- estimateGraph(f.mat=function(x) x[,1]*x[,2]*x[,3]+x[,2]*x[,3], d=3, 
  q.arg=list(min=-1,max=1), n.tot=10000)

plot(g2)
plot(g2, i2 = c(0.001, 0.001, 0.05))

# equal layouts and different edge thicknesses and circle diameters
g3 <- estimateGraph(f.mat=function(x) x[,1]*x[,2]*x[,3]*x[,4]*x[,5], d=5, 
  q.arg=list(min=-1,max=1), n.tot=10000)

g4 <- estimateGraph(f.mat=function(x) x[,1]*x[,2]*x[,3]+x[,4]*x[,5], d=5, 
  q.arg=list(min=-1,max=1), n.tot=10000)

graphClassIgraph <- graph.full(n = 5, directed = FALSE)
layout <- layout.circle(graphClassIgraph)

plot(g3, max.thickness= 10, circle.diameter= 30, layout=layout)
plot(g4, max.thickness= 30, circle.diameter= 50, layout=layout)

Example output

Loading required package: sensitivity
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: DiceKriging
Warning message:
no DISPLAY variable so Tk is not available 

fanovaGraph documentation built on Oct. 23, 2020, 5:46 p.m.