NetLogo User Community Models
(back to the NetLogo User Community Models)
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled because this model uses extensions.)
This model aims to represent the diffusion of an idea, a state of humour, a decision within a social context where community members place their beliefs on other community members.
The structure used to represent the social context is the network characterized by the presence of weighted and directed links.
## How it works
The simulation uses real-world network models to connect members:
<ol><li> The <b>preferencial attachment network</b> generates a network of members that have a skewed population with a few highly-connected nodes and a lot of loosely-connected nodes, this type of network is generally taken into consideration to represent the social influence in real-world (district, small city, neighbourhood).</li>
<li> The <b> Watts-Strogatz network </b>generates a small-world network that has concise paths between any connected network members, and it applies to real and virtual social networks and physical networks such as airports or electricity of web-traffic routings.</li>
<li> The <b>random network</b> generates a network in which each member has certainty probability to be connected. This applies in those contexts which involve a high tendency of individuals to associate and bond with similar others, which results in similar properties among neighbours.</li></ol>
The simulation starts with direct links with a randomly assigned weight between 0 and 1 and a certain number of members randomly choosing "p" probability ( -1 means not to choose the red idea, 1 means to choose the red idea).
Step 1) Insert the number of members in the input box
Step 2) Select the network model
Step 3) Click on the "Run the experiment" button to start the simulation
Step 4.1) Switch on the label bar to display the number of each turtle (who value) and weights values
Step 4.2) Switch on the watch? bar to display a single individual's behavior
Step 4.3) Set a decision threshold, lower threshold means that individuals are highly influenciable, at the contrary, higher threshold means that individuals get influence only from person who they trust the most.
## Results 
The results section contains four different types of plots:
<ol><li>The <b>distribution of idea</b> represents the summation of the whole probabilities</li>
<li>The <b>frequency of weight</b> is a histogram that represents the links' weights</li>
<li>The <b>individual utility</b> represents the utility function of a single individual, wether the watch? bar is switched-on. It can be written as y(i) = max p(i) * w(i)</li>
<li>The <b>social utility</b> represents the social utility function as a summation of the individuals' utilities and it can be written as Y = summation y(i).
As the curve goes above the threshold, the agents' utility will be more significant to choose red; instead, if the curve goes below the threshold, the agents' utility will be more significant not to choose red.
## Measures 
<ol><li>The <b>modularity</b> measures the strength of division of the network into clusters</li>
<li> The <b>"detect communities" button</b> detects the community structure present in the social network by highlighting with different color</li>
<li> The <b>betweeness centrality</b> measures the sum of the proportion of shortest paths between members of any other pairs that passes through each node</li>
<li> The <b>eigenvector centrality</b> measures the amount of influence that a member reaches from the social context and goes from 0 to 1</li>
<li> The <b>closeness centrality</b> measures the inverse of the average of each member's distances to all other members</li>
<li> The <b>"print adjacency matrix" button</b> saves a .txt file with a matrix representing the nodes and its connection </li>
## CREDITS AND REFERENCES
 Goldenberg D. (2021). "Social Network Analysis: From Graph Theory to Applications with Python". Available online at: https://towardsdatascience.com/social-network-analysis-from-theory-to-applications-with-python-d12e9a34c2c7
 Jackson M.O (2008). "Social and economic networks". Princeton University Press. Pp 287 - 327
 Uri Wilensky. "Nw General Examples". Available online at: https://ccl.northwestern.edu/netlogo/models/NWGeneralExamples