netlm                  package:sna                  R Documentation

_L_i_n_e_a_r _R_e_g_r_e_s_s_i_o_n _f_o_r _N_e_t_w_o_r_k _D_a_t_a

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

     `netlm' regresses the network variable in `y' on the network
     variables in stack `x' using ordinary least squares.  The
     resulting fits (and coefficients) are then tested against the
     indicated null hypothesis.

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

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

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

       y: Dependent network variable.  This should be a matrix, for
          obvious reasons; NAs are allowed, but dichotomous data is
          strongly discouraged due to the assumptions of the analysis. 

       x: Data array containing the stack of independent network
          variables.  By assumption, the first dimension of the array
          indexes the graph, with the next two indexing the actors. 
          Note that NAs are permitted, as is dichotomous data. 

    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.  By default, `reps'=1000. 

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

     Unsurprisingly, `netlm' is really a front-end to the built-in `lm'
     routine.  `netlm' handles vectorization and null hypothesis
     testing; the actual fitting is taken care of by `lm'.  

     Network regression using OLS is directly analogous to standard OLS
     regression elementwise on the appropriately vectorized adjacency
     matrices of the networks involved.  In particular, the network
     regression attempts to fit the model:


            A_y = b_0 A_1 + b_1 A_x1 + b_2 A_x2 + ... + Z


     where A_y is the dependent adjacency matrix, A_xi is the ith
     independent adjacency matrix, A_1 is an n x n matrix of 1's, and Z
     is an n x n matrix of independent normal random variables with
     mean 0 and variance sigma^2.  Clearly, this model is nonoptimal
     when A_y is dichotomous (or, for that matter, categorical in
     general); an alternative such as `netlogit' should be employed in
     such cases.  (Note that `netlm' will still attempt to fit such
     data...the user should consider him or herself to have been
     warned.)

     Null hypothesis tests for the network regression are handled using
     either the conditional uniform graph hypothesis (the default) or
     QAP.  See the help pages for these tests for a fuller description
     of each.  Reasonable printing and summarizing of `netlm' objects
     is provided by `print.netlm' and `summary.netlm', respectively. 
     No plot methods exist at this time, alas.

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

     An object of class `netlm'

_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. 

     Krackhardt, D.  (1987).  ``QAP Partialling as a Test of
     Spuriousness.'' Social Networks, 9 171-186.

     Krackhardt, D.  (1988).  ``Predicting With Networks: Nonparametric
     Multiple Regression Analyses of Dyadic Data.''  Social Networks,
     10, 359-382.

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

     `lm', `netlogit'

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

     #Create some input graphs
     x<-rgraph(20,4)

     #Create a response structure
     y<-x[1,,]+4*x[2,,]+2*x[3,,]   #Note that the fourth graph is unrelated

     #Fit a netlm model
     nl<-netlm(y,x,reps=100)

     #Examine the results
     summary(nl)

