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)
An object of class netcancor
with the following properties:
Array containing the distribution of the X coefficients under the null hypothesis test.
Array containing the distribution of the Y coefficients under the null hypothesis test.
Array containing the distribution of the canonical correlation coefficients under the null hypothesis test.
Vector containing the observed canonical correlation coefficients.
Vector containing the observed X coefficients.
Vector containing the observed Y coefficients.
Vector containing the estimated upper tail quantiles (p>=obs) for the observed canonical correlation coefficients under the null hypothesis.
Vector containing the estimated lower tail quantiles (p<=obs) for the observed canonical correlation coefficients under the null hypothesis.
Matrix containing the estimated upper tail quantiles (p>=obs) for the observed X coefficients under the null hypothesis.
Matrix containing the estimated lower tail quantiles (p<=obs) for the observed X coefficients under the null hypothesis.
Matrix containing the estimated upper tail quantiles (p>=obs) for the observed Y coefficients under the null hypothesis.
Matrix containing the estimated lower tail quantiles (p<=obs) for the observed Y coefficients under the null hypothesis.
Vector containing names for the canonical correlation coefficients.
Vector containing names for the X vars.
Vector containing names for the Y vars.
Values used to adjust the X variables.
Values used to adjust the Y variables.
String indicating the null hypothesis employed.
one or more input graphs.
one or more input graphs.
string indicating the type of graph being evaluated. "digraph" indicates that edges should be interpreted as directed; "graph" indicates that edges are undirected. mode
is set to "digraph" by default.
boolean indicating whether or not the diagonal should be treated as valid data. Set this true if and only if the data can contain loops. diag
is FALSE
by default.
string indicating the particular null hypothesis against which to test the observed estimands. A value of "cug" implies a conditional uniform graph test (see cugtest
) controlling for order only; "cugden" controls for both order and tie probability; "cugtie" controls for order and tie distribution (via bootstrap); and "qap" implies that the QAP null hypothesis (see qaptest
) should be used.
integer indicating the number of draws to use for quantile estimation. (Relevant to the null hypothesis test only - the analysis itself is unaffected by this parameter.) Note that, as for all Monte Carlo procedures, convergence is slower for more extreme quantiles.
Carter T. Butts buttsc@uci.edu
The netcancor
routine is actually a front-end to the 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
.
Butts, C.T., and Carley, K.M. (2001). ``Multivariate Methods for Interstructural Analysis.'' CASOS working paper, Carnegie Mellon University.
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