netcancor                package:sna                R Documentation

_C_a_n_o_n_i_c_a_l _C_o_r_r_e_l_a_t_i_o_n _f_o_r _L_a_b_e_l_e_d _G_r_a_p_h_s

_D_e_s_c_r_i_p_t_i_o_n:

     `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.

_U_s_a_g_e:

     netcancor(y, x, mode="digraph", diag=FALSE, nullhyp="cugtie", 
         reps=1000)

_A_r_g_u_m_e_n_t_s:

       y: First data array to be analyzed.  By assumption, the first
          dimension of the array indexes the graph, with the next two
          indexing the actors.  Missing values are not allowed. 

       x: Second data array to be analyzed.  By assumption, the first
          dimension of the array indexes the graph, with the next two
          indexing the actors.  Missing values are not allowed. 

    mode: 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. 

    diag: 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. 

 nullhyp: 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. 

    reps: 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. 

_D_e_t_a_i_l_s:

     The `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'.

_V_a_l_u_e:

     An object of class `netcancor' with the following properties:

   xdist: Array containing the distribution of the X coefficients under
          the null hypothesis test. 

   ydist: Array containing the distribution of the Y coefficients under
          the null hypothesis test. 

   cdist: Array containing the distribution of the canonical
          correlation coefficients under the null hypothesis test. 

     cor: Vector containing the observed canonical correlation
          coefficients. 

   xcoef: Vector containing the observed X coefficients. 

   ycoef: Vector containing the observed Y coefficients. 

  cpgreq: Vector containing the estimated upper tail quantiles (p>=obs)
          for the observed canonical correlation coefficients under the
          null hypothesis. 

  cpleeq: Vector containing the estimated lower tail quantiles (p<=obs)
          for the observed canonical correlation coefficients under the
          null hypothesis. 

  xpgreq: Matrix containing the estimated upper tail quantiles (p>=obs)
          for the observed X coefficients under the null hypothesis. 

  xpleeq: Matrix containing the estimated lower tail quantiles (p<=obs)
          for the observed X coefficients under the null hypothesis. 

  ypgreq: Matrix containing the estimated upper tail quantiles (p>=obs)
          for the observed Y coefficients under the null hypothesis. 

  ypleeq: Matrix containing the estimated lower tail quantiles (p<=obs)
          for the observed Y coefficients under the null hypothesis. 

  cnames: Vector containing names for the canonical correlation
          coefficients. 

  xnames: Vector containing names for the X vars. 

  ynames: Vector containing names for the Y vars. 

 xcenter: Values used to adjust the X variables. 

 xcenter: Values used to adjust the Y variables. 

 nullhyp: String indicating the null hypothesis employed. 

_R_e_q_u_i_r_e_s:

     `mva'

_N_o_t_e:

     This will eventually be replaced with a superior cancor procedure
     with more interpretable output; the new version will handle
     arbitrary labeling as well.

_A_u_t_h_o_r(_s):

     Carter T. Butts ctb@andrew.cmu.edu

_R_e_f_e_r_e_n_c_e_s:

     Butts, C.T., and Carley, K.M.  (2001).  ``Multivariate Methods for
     Interstructural Analysis.''  CASOS working paper, Carnegie Mellon
     University.

_S_e_e _A_l_s_o:

     `gcor', `cugtest', `qaptest', `cancor'

_E_x_a_m_p_l_e_s:

     #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)

