Description Usage Arguments Details Author(s) Examples
Simulates diffusion of a binary trait through a population.
1 |
init_list |
list of simulation parameters and conditions at initialization |
pop_data |
a database of individuals and households for the simulator to use |
quiet |
if FALSE, will print a message every time a simulated census is collected |
cognition |
specifies the basic model form of the probabilistic decision rule for each agent who is able to adopt the trait |
This function will run a simple agent-based simulation of the trait diffusing within a specified population, and collect data on that population at periodic intervals that is returned as output.
Bret Beheim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(hort_village)
init_list <- list(
n_seed_individuals = 5,
seed_network_location = "random",
simulation_duration_years = 1,
phi_radius = 500,
baseline_probability = 1e-05,
kin_network_effect = 5,
town_distance_effect = 0,
neighbor_effect = 5,
wealth_effect = 5,
observation_rate = 30
)
diffuse( init_list, hort_village, cognition="additive" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.