gcov
finds the covariances between the adjacency matrices of graphs indicated by g1
and g2
in stack dat
(or possibly dat2
). Missing values are permitted.gcov(dat, dat2=NULL, g1=c(1:dim(dat)[1]), g2=c(1:dim(dat)[1]),
diag=FALSE, mode="digraph")
dat
reflecting the first set of graphs to be compared; by default, all members of dat
are includeddat
(or dat2
, if applicable) reflecting the second set of graphs to be compared; by default, all members of dat
are includeddiag
is FALSE
by default.mode
is set to "digraph" by default.Note that gcov
computes only the covariance between uniquely labeled graphs. For the more general case, gscov
is recommended.
gscov
, gcor
, gscor
#Generate two random graphs each of low, medium, and high density
g<-rgraph(10,6,tprob=c(0.2,0.2,0.5,0.5,0.8,0.8))
#Examine the covariance matrix
gcov(g)
Run the code above in your browser using DataLab