reporting_graph.imperfect_reporting_ind: Create a reporting graph from a social network

View source: R/reporting_graph_ind.R

reporting_graph.imperfect_reporting_indR Documentation

Create a reporting graph from a social network

Description

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

Usage

## S3 method for class 'imperfect_reporting_ind'
reporting_graph(reporting.params, sim.graph, stochastic = FALSE)

Arguments

reporting.params

the reporting parameters

sim.graph

the igraph object with the social network

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)

Details

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.

Value

the igraph object for the directed reporting graph


dfeehan/nrsimulatr documentation built on Feb. 27, 2024, 3:18 a.m.