Description Usage Arguments Value Author(s) See Also Examples
plot.tscgm
is a generic plot function that is adapted
for objects of class sparse.tscgm
.
1 2 |
x |
an object of class |
mat |
Name of matrix to be plotted,i.e., either the precision matrix or vector autoregression matrix. |
... |
Arguments to be passed to graphical parameters (see |
Undirected or directed networks.
Fentaw Abegaz and Ernst Wit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | seed = 321
datas <- sim.data(model="ar1", time=10,n.obs=10, n.var=5,seed=seed,prob0=0.35,
network="random")
data.fit <- datas$data1
res.tscgm <- sparse.tscgm(data=data.fit, lam1=NULL, lam2=NULL, nlambda=NULL,
model="ar1", penalty="scad",optimality="bic_mod",control=list(maxit.out = 10, maxit.in = 100))
#Network visualization
oldpar <- par(mfrow=c(2,1))
plot.tscgm(res.tscgm, mat="precision", main="Undirected network", pad = 0.01,
label.pad = 0.3, label.col = 6, vertex.col = 5,vertex.cex = 1.5,
edge.col = 4, mode = "fruchtermanreingold", interactive=FALSE)
plot.tscgm(res.tscgm, mat="autoregression", main="Directed network", pad = 0.01,
label.pad = 0.3, label.col = 6, vertex.col = 5,vertex.cex = 1.5,
edge.col = 4, mode = "fruchtermanreingold", interactive=FALSE)
par(oldpar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.