Description Usage Arguments Details Value Author(s) References See Also Examples
This function plots an SJ or SJ.dag
1 2 |
x |
an object of class SJ or SJ.dag |
which |
The index of which to plot. If not specified, the penalty with the smallest BIC is used. |
layout |
the layout of the graph to use. If not specified, |
... |
additional parameters to be passed to |
This function plots a graph in SJ or SJ.dags 'graph' field, using some sane degaults for vertex size and color.
returns the layout used, invisibly.
Arend Voorman
Voorman, Shojaie and Witten (2013). Graph Estimation with Joint Additive Models. Submitted to Biometrika. available on ArXiv or from authors upon request
plot.igraph
spacejam
SJ
generate.dag.data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | p <- 100 #variables
n <- 50 #observations
#Generate Data
set.seed(20)
g <- rdag(p,80)
data <- generate.dag.data(g,n,basesd=c(1,0.5,0.5))
X <- data$X
#Fit conditional independence graph for sequence of 10 lambdas
fit1 <- SJ(X, length = 10)
par(mfrow=c(1,2))
layout <- plot(fit1, main = "min BIC")
plot(fit1, which=5, layout = layout, main = paste0("lambda = ",round(fit1$lambda[5],3)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.