EVOLUTION-MANAGER
Edit File: sample_pa_age.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: Generate an evolving random graph with preferential...</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_pa_age {igraph}"><tr><td>sample_pa_age {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate an evolving random graph with preferential attachment and aging</h2> <h3>Description</h3> <p>This function creates a random graph by simulating its evolution. Each time a new vertex is added it creates a number of links to old vertices and the probability that an old vertex is cited depends on its in-degree (preferential attachment) and age. </p> <h3>Usage</h3> <pre> sample_pa_age( n, pa.exp, aging.exp, m = NULL, aging.bin = 300, out.dist = NULL, out.seq = NULL, out.pref = FALSE, directed = TRUE, zero.deg.appeal = 1, zero.age.appeal = 0, deg.coef = 1, age.coef = 1, time.window = NULL ) pa_age(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>The number of vertices in the graph.</p> </td></tr> <tr valign="top"><td><code>pa.exp</code></td> <td> <p>The preferential attachment exponent, see the details below.</p> </td></tr> <tr valign="top"><td><code>aging.exp</code></td> <td> <p>The exponent of the aging, usually a non-positive number, see details below.</p> </td></tr> <tr valign="top"><td><code>m</code></td> <td> <p>The number of edges each new vertex creates (except the very first vertex). This argument is used only if both the <code>out.dist</code> and <code>out.seq</code> arguments are NULL.</p> </td></tr> <tr valign="top"><td><code>aging.bin</code></td> <td> <p>The number of bins to use for measuring the age of vertices, see details below.</p> </td></tr> <tr valign="top"><td><code>out.dist</code></td> <td> <p>The discrete distribution to generate the number of edges to add in each time step if <code>out.seq</code> is NULL. See details below.</p> </td></tr> <tr valign="top"><td><code>out.seq</code></td> <td> <p>The number of edges to add in each time step, a vector containing as many elements as the number of vertices. See details below.</p> </td></tr> <tr valign="top"><td><code>out.pref</code></td> <td> <p>Logical constant, whether to include edges not initiated by the vertex as a basis of preferential attachment. See details below.</p> </td></tr> <tr valign="top"><td><code>directed</code></td> <td> <p>Logical constant, whether to generate a directed graph. See details below.</p> </td></tr> <tr valign="top"><td><code>zero.deg.appeal</code></td> <td> <p>The degree-dependent part of the ‘attractiveness’ of the vertices with no adjacent edges. See also details below.</p> </td></tr> <tr valign="top"><td><code>zero.age.appeal</code></td> <td> <p>The age-dependent part of the ‘attrativeness’ of the vertices with age zero. It is usually zero, see details below.</p> </td></tr> <tr valign="top"><td><code>deg.coef</code></td> <td> <p>The coefficient of the degree-dependent ‘attractiveness’. See details below.</p> </td></tr> <tr valign="top"><td><code>age.coef</code></td> <td> <p>The coefficient of the age-dependent part of the ‘attractiveness’. See details below.</p> </td></tr> <tr valign="top"><td><code>time.window</code></td> <td> <p>Integer constant, if NULL only adjacent added in the last <code>time.windows</code> time steps are counted as a basis of the preferential attachment. See also details below.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed to <code>sample_pa_age</code>.</p> </td></tr> </table> <h3>Details</h3> <p>This is a discrete time step model of a growing graph. We start with a network containing a single vertex (and no edges) in the first time step. Then in each time step (starting with the second) a new vertex is added and it initiates a number of edges to the old vertices in the network. The probability that an old vertex is connected to is proportional to </p> <p style="text-align: center;"><i>P[i] \sim (c\cdot k_i^α+a)(d\cdot l_i^β+b)</i></p> <p>. </p> <p>Here <i>k[i]</i> is the in-degree of vertex <i>i</i> in the current time step and <i>l[i]</i> is the age of vertex <i>i</i>. The age is simply defined as the number of time steps passed since the vertex is added, with the extension that vertex age is divided to be in <code>aging.bin</code> bins. </p> <p><i>c</i>, <i>alpha</i>, <i>a</i>, <i>d</i>, <i>beta</i> and <i>b</i> are parameters and they can be set via the following arguments: <code>pa.exp</code> (<i>alpha</i>, mandatory argument), <code>aging.exp</code> (<i>beta</i>, mandatory argument), <code>zero.deg.appeal</code> (<i>a</i>, optional, the default value is 1), <code>zero.age.appeal</code> (<i>b</i>, optional, the default is 0), <code>deg.coef</code> (<i>c</i>, optional, the default is 1), and <code>age.coef</code> (<i>d</i>, optional, the default is 1). </p> <p>The number of edges initiated in each time step is governed by the <code>m</code>, <code>out.seq</code> and <code>out.pref</code> parameters. If <code>out.seq</code> is given then it is interpreted as a vector giving the number of edges to be added in each time step. It should be of length <code>n</code> (the number of vertices), and its first element will be ignored. If <code>out.seq</code> is not given (or NULL) and <code>out.dist</code> is given then it will be used as a discrete probability distribution to generate the number of edges. Its first element gives the probability that zero edges are added at a time step, the second element is the probability that one edge is added, etc. (<code>out.seq</code> should contain non-negative numbers, but if they don't sum up to 1, they will be normalized to sum up to 1. This behavior is similar to the <code>prob</code> argument of the <code>sample</code> command.) </p> <p>By default a directed graph is generated, but it <code>directed</code> is set to <code>FALSE</code> then an undirected is created. Even if an undirected graph is generated <i>k[i]</i> denotes only the adjacent edges not initiated by the vertex itself except if <code>out.pref</code> is set to <code>TRUE</code>. </p> <p>If the <code>time.window</code> argument is given (and not NULL) then <i>k[i]</i> means only the adjacent edges added in the previous <code>time.window</code> time steps. </p> <p>This function might generate graphs with multiple edges. </p> <h3>Value</h3> <p>A new graph. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>See Also</h3> <p><code><a href="sample_pa.html">sample_pa</a></code>, <code><a href="sample_gnp.html">sample_gnp</a></code> </p> <h3>Examples</h3> <pre> # The maximum degree for graph with different aging exponents g1 <- sample_pa_age(10000, pa.exp=1, aging.exp=0, aging.bin=1000) g2 <- sample_pa_age(10000, pa.exp=1, aging.exp=-1, aging.bin=1000) g3 <- sample_pa_age(10000, pa.exp=1, aging.exp=-3, aging.bin=1000) max(degree(g1)) max(degree(g2)) max(degree(g3)) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>