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)

