netcancor
finds the canonical correlation(s) between the graph sets x
and y
, testing the result using either conditional uniform graph (CUG) or quadratic assignment procedure (QAP) null hypotheses.netcancor(y, x, mode="digraph", diag=FALSE, nullhyp="cugtie",
reps=1000)
mode
is set to "digraph" by default.diag
is FALSE
by default.cugtest
) controlling for order only; "netcancor
with the following properties:mva
netcancor
routine is actually a front-end to the mva
library's cancor
routine for computing canonical correlations between sets of vectors. netcancor
itself vectorizes the network variables (as per its graph type) and manages the appropriate null hypothesis tests; the actual canonical correlation is handled by cancor
. Canonical correlation itself is a multivariate generalization of the product-moment correlation. Specifically, the analysis seeks linear combinations of the variables in y
which are well-explained by linear combinations of the variables in x
. The network version of this technique is performed elementwise on the adjacency matrices of the graphs in question; as usual, the result should be interpreted with an eye to the relationship between the type of data used and the assumptions of the underlying model.
Intelligent printing and summarizing of netcancor objects is provided by print.netcancor
and summary.netcancor
.
gcor
, cugtest
, qaptest
, cancor
#Generate a valued seed structure
cv<-matrix(rnorm(100),nrow=10,ncol=10)
#Produce two sets of valued graphs
x<-array(dim=c(3,10,10))
x[1,,]<-3*cv+matrix(rnorm(100,0,0.1),nrow=10,ncol=10)
x[2,,]<--1*cv+matrix(rnorm(100,0,0.1),nrow=10,ncol=10)
x[3,,]<-x[1,,]+2*x[2,,]+5*cv+matrix(rnorm(100,0,0.1),nrow=10,ncol=10)
y<-array(dim=c(2,10,10))
y[1,,]<--5*cv+matrix(rnorm(100,0,0.1),nrow=10,ncol=10)
y[2,,]<--2*cv+matrix(rnorm(100,0,0.1),nrow=10,ncol=10)
#Perform a canonical correlation analysis
nc<-netcancor(y,x,reps=100)
summary(nc)
Run the code above in your browser using DataLab