EVOLUTION-MANAGER
Edit File: scan_stat.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: Scan statistics on a time series of 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 scan_stat {igraph}"><tr><td>scan_stat {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Scan statistics on a time series of graphs</h2> <h3>Description</h3> <p>Calculate scan statistics on a time series of graphs. This is done by calculating the local scan statistics for each graph and each vertex, and then normalizing across the vertices and across the time steps. </p> <h3>Usage</h3> <pre> scan_stat(graphs, tau = 1, ell = 0, locality = c("us", "them"), ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graphs</code></td> <td> <p>A list of igraph graph objects. They must be all directed or all undirected and they must have the same number of vertices.</p> </td></tr> <tr valign="top"><td><code>tau</code></td> <td> <p>The number of previous time steps to consider for the time-dependent normalization for individual vertices. In other words, the current locality statistics of each vertex will be compared to this many previous time steps of the same vertex to decide whether it is significantly larger.</p> </td></tr> <tr valign="top"><td><code>ell</code></td> <td> <p>The number of previous time steps to consider for the aggregated scan statistics. This is essentially a smoothing parameter.</p> </td></tr> <tr valign="top"><td><code>locality</code></td> <td> <p>Whether to calculate the ‘us’ or ‘them’ statistics.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Extra arguments are passed to <code><a href="local_scan.html">local_scan</a></code>.</p> </td></tr> </table> <h3>Value</h3> <p>A list with entries: </p> <table summary="R valueblock"> <tr valign="top"><td><code>stat</code></td> <td> <p>The scan statistics in each time step. It is <code>NA</code> for the initial <code>tau + ell</code> time steps.</p> </td></tr> <tr valign="top"><td><code>arg_max_v</code></td> <td> <p>The (numeric) vertex ids for the vertex with the largest locality statistics, at each time step. It is <code>NA</code> for the initial <code>tau + ell</code> time steps.</p> </td></tr> </table> <h3>See Also</h3> <p>Other scan statistics: <code><a href="local_scan.html">local_scan</a>()</code> </p> <h3>Examples</h3> <pre> ## Generate a bunch of SBMs, with the last one being different num_t <- 20 block_sizes <- c(10, 5, 5) p_ij <- list(p = 0.1, h = 0.9, q = 0.9) P0 <- matrix(p_ij$p, 3, 3) P0[2, 2] <- p_ij$h PA <- P0 PA[3, 3] <- p_ij$q num_v <- sum(block_sizes) tsg <- replicate(num_t - 1, P0, simplify = FALSE) %>% append(list(PA)) %>% lapply(sample_sbm, n = num_v, block.sizes = block_sizes, directed = TRUE) scan_stat(graphs = tsg, k = 1, tau = 4, ell = 2) scan_stat(graphs = tsg, locality = "them", k = 1, tau = 4, ell = 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>