Description Usage Arguments Details Value Author(s) See Also Examples

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.

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

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

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.

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

Tom LaFramboise tlaframb@hsph.harvard.edu

`permEdgesM2M`

, `permNodesM2M`

, `makeClustM`

1 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.