EVOLUTION-MANAGER
Edit File: sample_correlated_gnp_pair.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Sample a pair of correlated G(n,p) random graphs</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for sample_correlated_gnp_pair {igraph}"><tr><td>sample_correlated_gnp_pair {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Sample a pair of correlated G(n,p) random graphs</h2> <h3>Description</h3> <p>Sample a new graph by perturbing the adjacency matrix of a given graph and shuffling its vertices. </p> <h3>Usage</h3> <pre> sample_correlated_gnp_pair(n, corr, p, directed = FALSE, permutation = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>Numeric scalar, the number of vertices for the sampled graphs.</p> </td></tr> <tr valign="top"><td><code>corr</code></td> <td> <p>A scalar in the unit interval, the target Pearson correlation between the adjacency matrices of the original the generated graph (the adjacency matrix being used as a vector).</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>A numeric scalar, the probability of an edge between two vertices, it must in the open (0,1) interval.</p> </td></tr> <tr valign="top"><td><code>directed</code></td> <td> <p>Logical scalar, whether to generate directed graphs.</p> </td></tr> <tr valign="top"><td><code>permutation</code></td> <td> <p>A numeric vector, a permutation vector that is applied on the vertices of the first graph, to get the second graph. If <code>NULL</code>, the vertices are not permuted.</p> </td></tr> </table> <h3>Details</h3> <p>Please see the reference given below. </p> <h3>Value</h3> <p>A list of two igraph objects, named <code>graph1</code> and <code>graph2</code>, which are two graphs whose adjacency matrix entries are correlated with <code>corr</code>. </p> <h3>References</h3> <p>Lyzinski, V., Fishkind, D. E., Priebe, C. E. (2013). Seeded graph matching for correlated Erdos-Renyi graphs. <a href="https://arxiv.org/abs/1304.7844">https://arxiv.org/abs/1304.7844</a> </p> <h3>See Also</h3> <p><code><a href="sample_correlated_gnp.html">sample_correlated_gnp</a></code>, <code><a href="sample_gnp.html">sample_gnp</a></code>. </p> <h3>Examples</h3> <pre> gg <- sample_correlated_gnp_pair(n = 10, corr = .8, p = .5, directed = FALSE) gg cor(as.vector(gg[[1]][]), as.vector(gg[[2]][])) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>