View source: R/reporting_graph_ind.R
reporting_graph.imperfect_reporting_ind | R Documentation |
Create a reporting graph with attributes added to vertices in the network that have aggregate relational reports. Incorporate imperfect reporting (i.e., false positives and negatives) at the individual level (varying from person to person).
## S3 method for class 'imperfect_reporting_ind'
reporting_graph(reporting.params, sim.graph, stochastic = FALSE)
reporting.params |
the reporting parameters |
sim.graph |
the |
stochastic |
if TRUE, then treat the reporting parameters as expected values from bernoulli trials for whether or not each edge is observed; otherwise, reporting params are deterministic (but since edges are discrete, this could lead to rounding issues – ie, tau=0.8 for 3 edges would produce 2 edges observed) |
Note that this function relies upon the fact that the igraph object
sim.graph
will have an attribute called 'sim.settings'
,
which is a list with parameters describing the simulation.
For now, the only simulation parameter that makes a difference is
\tau
. For this individual-level imperfect reporting, the
entry in the reporting.params
list called tau
should
be a function that takes two arguments: a vertex id and a graph.
It should return a value from 0 to 1, which is the tau for reports
from the given vertex.
the igraph
object for the directed reporting graph
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.