plot.cggm {cglasso} | R Documentation |
Plot Method for a ‘cggm
’ Object
Description
The plot.cggm
produces graphs from an R object of class ‘cggm
’.
Usage
## S3 method for class 'cggm'
plot(x, type, weighted = FALSE, simplify = TRUE, ...)
Arguments
x |
an R object of class ‘ |
type |
a description of the required graph. Default depends on the type of fitted model, that is, |
weighted |
logical. Should weighted graphs be created? Default is |
simplify |
logical. Should isolated vertices be removed from the graph? Default is |
... |
additional graphical arguments passed to the functions |
Author(s)
Luigi Augugliaro (luigi.augugliaro@unipa.it)
See Also
cggm
, to_graph
, getGraph
and plot.cglasso2igraph
.
Examples
set.seed(123)
# Y ~ N(XB, Sigma) and
# 1. probability of left/right censored values equal to 0.05
# 2. probability of missing-at-random values equal to 0.05
n <- 100L
p <- 3L
q <- 2L
b0 <- runif(p)
B <- matrix(runif(q * p), nrow = q, ncol = p)
X <- matrix(rnorm(n * q), nrow = n, ncol = q)
rho <- 0.3
Sigma <- outer(1L:p, 1L:p, function(i, j) rho^abs(i - j))
Z <- rcggm(n = n, b0 = b0, X = X, B = B, Sigma = Sigma, probl = 0.05, probr = 0.5,
probna = 0.05)
out <- cglasso(. ~ ., data = Z)
out.mle <- cggm(out, lambda.id = 3L, rho.id = 3L)
plot(out.mle, type = "Gyy")
plot(out.mle, type = "Gxy")
plot(out.mle, type = "both")
[Package cglasso version 2.0.7 Index]