permPower              package:GraphAT              R Documentation

_F_u_n_c_t_i_o_n _t_o _c_o_m_p_u_t_e _e_s_t_i_m_a_t_e_d _p_r_o_b_a_b_i_l_i_t_y _o_f _d_e_t_e_c_t_i_n_g _p_r_e_f_e_r_e_n_t_i_a_l
_c_o_n_n_e_c_t_i_o_n _o_f _i_n_t_r_a_c_l_u_s_t_e_r _n_o_d_e_s

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

     This function simulates graphs from the alternative hypothesis of
     preferential connection of intracluster nodes.  For each graph, it
     runs a node and edge permutation test.  The estimated ``power'' of
     each test is the proportion of graphs that the test rejects the
     null hypothesis of no preferential connection of intracluster
     edges.

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

     permPower(psi=1,clsizes, nedge, nhyper=100, nperms=1000)

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

     psi: The non-centrality parameter for the noncentral
          hypergeometric distribution used to simulate the graphs.

 clsizes: A vector of cluster sizes.

   nedge: The number of edges in each graph.

  nhyper: The number of noncentral hypergeometric graphs simulated to
          estimate "power".

  nperms: The number of permutations used for each run of the edge and
          node permutation tests.

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

     The function first generates nhyper realizations of a noncentral
     hypergeometric(nedge,n,k,psi) random variable, where n is the
     number of node pairs and k is the number of intracluster node
     pairs.  For each realization x, a graph with n edges, x of which
     are intracluster, is generated.  The edge and node permutation
     tests (with nperms permutations each) are performed on each graph.
      The estimated ``power'' of each test is the proportion of graphs
     for which the test rejects the null hypothesis of no preferential
     connection of intracluster nodes (at the 5% level).  The 95%
     confidence intervals for the power levels are also computed.

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

     A list with four components: 

power.permedge: Estimated ``power'' for edge permutation test.

power.permnode: Estimated ``power'' for node permutation test.

CI.permedge: Vector giving 95% confidence interval for edge permutation
          test power.

CI.permnode: Vector giving 95% confidence interval for node permutation
          test power.

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

     Tom LaFramboise tlaframb@hsph.harvard.edu

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

     'permEdgesM2M', 'permNodesM2M', 'makeClustM'

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

     permPower(psi=5,clsizes=c(1,2,3,4),nedge=10,nhyper=100,nperms=100)

