Description Usage Arguments Details Value Examples
View source: R/multivariance-functions.R
Given a dependence structure graph: vertices representing the multivariances of only two vertices can be turned into an edge labeled with the label of the vertex. Moreover, only subsets of the graph can be selected.
1 2 3 4 5 6 | clean.graph(
g,
only.level = NULL,
simplify.pairs = TRUE,
drop.label.pairs = FALSE
)
|
g |
graph, created by |
only.level |
integer vector, if provided all edges and dependency nodes corresponding to dependence orders not given in 'only.level' are removed |
simplify.pairs |
boolean, if true dependency nodes which are only connected to two variables are turned into edges |
drop.label.pairs |
boolean, if true the labels for edges indicating pairwise dependence are removed |
Note: The option 'only.level' works only properly for a full dependence structure graph, in the case of a clustered dependence structure graph dependency nodes representing a cluster might be removed.
graph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | N = 200
y = coins(N,2)
x = cbind(y,y,y)
ds = dependence.structure(x,structure.type = "clustered")
plot(clean.graph(ds$graph))
plot(clean.graph(ds$graph,only.level = 2))
plot(clean.graph(ds$graph,only.level = 3)) # of limited use for a clustered graph,
# i.e., here the three-dependence node without edges indicates that
# all edges were connected to clusters
ds = dependence.structure(x,structure.type = "full")
plot(clean.graph(ds$graph))
plot(clean.graph(ds$graph,drop.label.pairs = TRUE))
plot(clean.graph(ds$graph,only.level = 2))
plot(clean.graph(ds$graph,only.level = 2,drop.label.pairs = TRUE))
plot(clean.graph(ds$graph,only.level = 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.