q-voter model (expressed & private opinions)
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
The q-voter model with independence [3] is a model of opinion dynamics in which each agent verbalizes an opinion on a two-point scale, such as yes/no or for/against. There are two types of social responses in the model, conformity and independence. Conformity means submitting to the influence of others and adopting their opinions. Independence, on the other hand, does not involve considering the opinions of others.
Here, we introduce an extension of the q-voter model with independence, which takes into account that there may be a discrepancy between agents' private opinion (true beliefs) and public opinion (the expressed opinion or behavior). We assume that agents can only see each other's public opinions. If an agent has different opinions on these two levels (private and public), it is in what is called cognitive dissonance. Again, there are two possible responses: conformity and independence, but they are different at the private and public levels. The model we present here is the modification of the model introduced in [4]. This modification of the model is to account for the fact that people usually try to reduce cognitive dissonance [5].
In the case of public opinion, independence means that the agent expresses its true (private) opinion, and thus its public opinion is equal to its private one. Conformity, on the other hand, corresponds to the situation where the agent adapts its behavior to other agents. We randomly choose q neighbors (q-panel) that will be the source of social influence. If an agent is initially in internal harmony, i.e. has the same private and public opinion, it will be less susceptible to social pressure. In this case, unanimity of the q-panel is required. In other words, when q voters express the same opinion, the considered agent changes its public opinion to be the same as theirs, even though this may lead to dissonance. This type of conformity is called compliance in social psychology. On the other hand, if the agent is initially in internal conflict, it will be more willing to change. Thus, it is enough for at least one person to express an opinion that is consistent with the private beliefs of the considered agent in order to encourage it to express them. Thus, we replace the public opinion of the agent with the private one if among the selected q-voters there is at least one who shares the private opinion of the agent. This type of influence is known in psychology as disinhibitory contagion.
Change of private opinion as an independent decision refers to a rethinking of a given issue. In this case, the private opinion changes to the opposite with a probability of 1/2. Conformity at the private level also requires the choice of q neighbors who will be the source of influence. To change the agent's beliefs, not only must q voters behave unanimously, but the agent itself must express the same public opinion as shared by the group. Thus, the agent changes its private opinion to the public opinion shared by a unanimous group formed by the q voters and itself.
We consider two variants of the model: * Act then Think (AT) - agents update first their public opinion, then private one * Think then Act (TA) - agents update first their private opinion, then public one
HOW IT WORKS
We consider a population of agents on a network of size N. In this implementation, we use the Watts-Strogatz network, which is described by two parameters: k (the average degree of the node) and beta (the probability of rewiring). There are two parameters of the model: q (the size of the influence group) and p (the probability of independent behavior). Each agent at both levels can have one of two possible opinions +1 or -1 (e.g., opinion for or against a given issue), which are colored green or red, respectively. The private, or internal, opinion is represented by the inner circle, while the public (or expressed) opinion is represented by the outer circle. In total, there are four possible states of the agent ([+1, +1], [+1, -1], [-1, +1], [-1, -1]).
Time evolution of the systems in AT variant is given by the following ALGORITHM:
0) Set the parameters of the network and of the model, as well as the initial conditions; set the counter time = 0
1) Randomly choose one of the N agents to reconsider its opinion, we will call it the "target", and update the counter: time = time + 1
2) ACT With probability p, the target behaves independently, so it sets public opinion equal to private opinion. With complementary probability (1-p), it is susceptible to the influence of its neighbors (agents directly connected to the target). It chooses q neighbors to form the q-panel - If the target's public opinion is the same as its private opinion: it checks if all agents from the q-panel have the same opinion - if so, it sets the public opinion to the same as its own (compliance) - Otherwise, the target checks if at least one agent from the q-panel has the same opinion as its own, and if so, it sets the public opinion to the same as its private opinion (disinhibitory contagion)
3)THINK With probability p the target behaves independently - with probability 1/2 the private opinion changes to the opposite. With complementary probability (1-p) it randomly selects q panels from its neighbors and checks if they all have the same public opinion as its public one - if so, it sets its private opinion to the same public one
4) Go to 1
The algorithm for TA variant vary only in the changed order of points 2 and 3.
HOW TO USE IT
NETWORK PARAMETERS The model is implemented on the Watts-Strogatz network, therefore first choose parameters of the network:
- N - number of agents
- k - the average degree of the node (note that k should be an even number; in the case of odd number the average degree will be k-1; for complete graph, choose k = N - 1)
- beta - probability of rewiring
MODEL PARAMETERS Choose parameters of the model:
- q - size of the influence group
- p - the probability of independence
INITIAL CONDITIONS The last thing to choose is the initial fraction of agents with positive opinion, with is given by parameter:
- densityofones - the fraction of agents with both opinions equal to 1 (positive opinions) at the beginning of simulations; they are randomly distributed over the whole system. Note that at the beginning all of the agents public opinion equal to private one (nobody is in dissonance).
After choosing values of all parameters click: 1) "setup" - to set all values of parameters (step 0 of the ALGORITHM described in Section HOW IT WORKS) 2) "go-AT" or "go-TA - to see the evolution of the system within single update (steps 1-3 of the ALGORITHM described in Section HOW IT WORKS) 3) "go-AT forever" or "go-TA forever" - to run the model according to steps 1-4 of the ALGORITHM described in Section HOW IT WORKS
Algorithm can be also observed in the step-by-step section by clicking one by one the following buttons: 0) "setup"- to set all values of parameters. Note that this time only public opinion of agents are visible in order to present, what agents really know about each other. Herein some agents may initially be in dissonance to ease observation of possible scenarios 1) "target" - an agent, which opinion will be updated is selected. Thick black lines indicate the target's neighbors. Now target's private opinion is shown 2) "q-panel" - q agents among all target's neighbors are randomly selected, they are marked by increased size 3) "act" - target updates its public opinion according to the ALGORITHM described in Section HOW IT WORKS 4) "think" - target updates its private opinion according to the ALGORITHM described in Section HOW IT WORKS The monitor displays which behavior worked - conformity (compliance/disinhibitory contagion) or independence. (In order to ensure, that you observe conformity set p=0, to guarantee independence set p=1.)
THINGS TO NOTICE
The society described by the model can be in one of two qualitatively different phases: 1) Agreement: there is a majority opinion in the society, which means, for example, that in democratic elections there is a clear winner; in physics we would call such a phase "ordered". 2) Disagreement: the fractions of both opinions are almost equal, which means, for example, that in democratic elections there is no clear winner; in physics we would call such a phase "disordered".
If we change only the independence parameter p and keep all the others fixed, we can observe a phase transition between these phases. This transition occurs for the same value of p at the public and private levels. The character of this transition depends on the parameter q (size of the influence group).
For q < 3, depending on p system will be in one of these states. Disagreement is observed for p > p, above critical point p. In the case of agreement, for p < p*, system randomly chooses the dominating opinion. In the case of systems of finite size (as the one that we can observe here) the majority opinion may change in time - system switches between two states symmetric with respect to 0.5.
For q >= 3 there is such a range of p, plow < p < phigh that both qualitatively different states - agreement and disagreement coexist. The state of the system depends on the initial conditions, what we call hysteresis. However, again for the finite systems there are possible switches between these states.
The top plot shows the concentration of agents with positive opinions on the public and private levels. Note that in the case of the ordered state, the majority on the public level is greater than on the private level, so there are obviously agents in dissonance. However, even in the disordered state, when the concentrations of agents with positive opinions on both the public and private levels oscillate around 0.5, there are still agents in dissonance (note the non-zero values in the lower plot).
THINGS TO TRY
In order to observe that majority on public level is greater than on private set e.g. N = 101, k = 100, q = 2, p = 0.1.
To observe that although there are approximately the same number of positive agents on both levels, some of them are still in dissonance, change p to p=0.5.
To observe coexistence of two qualitatively different phases - ordered and disordered set e.g. N = 101, k = 100, q = 3, p = 0.25. The system will randomly switch majority holding opinion 1 or -1 and disagreement, when fractions supporting each of the options are almost equal.
EXTENDING THE MODEL
One can implement the model on other random networks such as Erdos-Renyi or Barabasi-Albert.
HOW TO CITE
ACKNOWLEDGEMENT
This model was created as part of the project funded by the National Science Center (NCN, Poland) through grant no. 2019/35/B/HS6/02530
CREDITS AND REFERENCES
[1] S. E. Asch (1955), Opinions and social pressure. Scientific American, 193(5), 31–35. [2] C. Castellano, M.A. Muñoz, R. Pastor-Satorras (2009), Nonlinear q-voter model. Physical Review E, 80(4), 041129. [3] P. Nyczka, K. Sznajd-Weron, J. Cisło (2012), Phase transitions in the q-voter model with two types of stochastic driving. Physical Review E,86(1), 011105. [4] A. Jędrzejewski, G. Marcjasz, P. R. Nail, K. Sznajd-Weron (2018), Think then act or act then think? PLoS ONE, 13(11), 1-19. [5] L. Festinger (1957), A Theory of Cognitive Dissonance. California: Stanford University Press.
Comments and Questions
;; Copyright Barbara Kamińska 2024;; ;; implementation of Watts-Strogatz network taken from https://github.com/fsancho/Complex-Networks-Toolbox/blob/master/Complex%20Networks%20Model%206.nlogo globals [diss diss_1000 priv_p_1000 pub_p_1000 avg_priv avg_pub avg_diss target q-voters size_normal size_highlight] turtles-own [priv pub] to setup clear-all set size_normal 2 set size_highlight 3 ask patches [set pcolor white] create-turtles N [ set size size_normal ifelse (random 100) < density_of_ones [ set shape "pp" set priv 1 set pub 1 ] [ set shape "mm" set priv -1 set pub -1 ] ] layout-circle sort turtles 14 ;; initial wiring let neigh (n-values (k / 2) [ [i] -> i + 1 ]) ifelse k < N [ ask turtles [ let tar who foreach neigh [ [i] -> create-link-with (turtle ((tar + i) mod N)) ] ] ;; rewiring ask links [ let if_rewired false if (random-float 1) < beta[ let node1 end1 if [ count link-neighbors ] of node1 < (N - 1) [ let node2 one-of turtles with [ (self != node1) and (not link-neighbor? node1)] ask node1 [ create-link-with node2 [ set if_rewired true ] ] ] ] if (if_rewired)[ die ] ] ][ display user-message (word "Select k < N") ] ask turtles [ set label-color black ] set q-voters nobody set priv_p_1000 [] set pub_p_1000 [] set diss_1000 [] set avg_priv 0 set avg_pub 0 set avg_diss 0 reset-ticks end to setup-algorithm clear-all set size_normal 3 set size_highlight 5 ask patches [set pcolor white] create-turtles N [ set size size_normal ifelse (random 100) < density_of_ones [ set pub 1 ifelse (random-float 1) < 0.5 [set priv 1][set priv -1] ] [ set pub -1 ifelse (random-float 1) < 0.5 [set priv 1][set priv -1] ] ] layout-circle sort turtles 12 ;; initial wiring let neigh (n-values (k / 2) [ [i] -> i + 1 ]) ifelse k < N [ ask turtles [ let tar who foreach neigh [ [i] -> create-link-with (turtle ((tar + i) mod N)) ] ] ;; rewiring ask links [ let if_rewired false if (random-float 1) < beta[ let node1 end1 if [ count link-neighbors ] of node1 < (N - 1) [ let node2 one-of turtles with [ (self != node1) and (not link-neighbor? node1)] ask node1 [ create-link-with node2 [ set if_rewired true ] ] ] ] if (if_rewired)[ die ] ] ][ display user-message (word "Select k < N") ] ask turtles [ set label-color black ] set q-voters nobody set-shape-visible end to set-target set-shape-visible ask links [set color gray set thickness 0.1] set target random N ask turtle target [ set size size_highlight ifelse pub = 1 [ ifelse priv = 1 [set shape "pp"] [set shape "pm"] ][ ifelse priv = 1 [set shape "mp"] [ set shape "mm"] ] ask my-links [set color black set thickness 0.2] ] set q-voters nobody end to q-panel if q-voters != nobody [ ask q-voters[ set size size_normal ] ] ask turtle target [ set size size_highlight if (count link-neighbors) >= q [ set q-voters n-of q link-neighbors ask q-voters [set size size_highlight] ] ] end to act clear-output ;ask q-voters [set size size_highlight] ifelse random-float 1 < p [ ;; independence output-print "Independence" ask turtle target [set pub priv] ] [ ;; conformity ifelse q-voters = nobody [ display user-message (word "Select q-panel") ] [ output-print "Conformity" ask turtle target [ ifelse priv = pub [ output-print "Compliance" if (all? q-voters [pub = 1]) [ask turtle target [set pub 1]] if (all? q-voters [pub = -1]) [ask turtle target [set pub -1]] ] [ output-print "Disinhibitory contagion" ifelse priv = 1 [if (any? q-voters with [pub = 1]) [ask turtle target [set pub 1]]] [if (any? q-voters with [pub = -1]) [ask turtle target [set pub -1]]] ] ] ] ] ask turtle target [ ifelse pub = 1 [ ifelse priv = 1 [set shape "pp"][set shape "pm"] ][ ifelse priv = 1 [set shape "mp"][set shape "mm"] ] ] end to think clear-output ifelse random-float 1 < p [ ;; independence output-print "Independence" ask turtle target [ ifelse random-float 1.0 < 0.5 [set priv 1][set priv -1] ] ] [ ;; conformity ifelse q-voters = nobody [ display user-message (word "Select q-panel") ] [ output-print "Conformity" ask turtle target [ ifelse pub = 1 [ if (all? q-voters [pub = 1]) [ask turtle target [set priv 1]] ] [ if (all? q-voters [pub = -1]) [ask turtle target [set priv -1]] ] ] ] ] ask turtle target [ ifelse pub = 1 [ ifelse priv = 1 [set shape "pp"][set shape "pm"] ][ ifelse priv = 1 [set shape "mp"][set shape "mm"] ] ] end to set-shape-visible ask turtles [set size size_normal] ask turtles [ ifelse pub = 1 [ set shape "p" ][ set shape "m" ] ] end to set-shape ask turtles [set size size_normal] ask turtles [ ifelse pub = 1 [ ifelse priv = 1 [set shape "pp"] [set shape "pm"] ][ ifelse priv = 1 [set shape "mp"] [ set shape "mm"] ] ] end to go-AT ask links [set color gray set thickness 0.1] set-shape set target random N ask turtle target [ ;; ACT ask my-links [set color black set thickness 0.2] ifelse random-float 1.0 < p [ ;; independence ask turtle target [set pub priv] ] [ ;; conformity ifelse (count link-neighbors) >= q [set q-voters n-of q link-neighbors][set q-voters nobody] if q-voters != nobody [ ifelse priv = pub [ if (all? q-voters [pub = 1]) [ask turtle target [set pub 1]] if (all? q-voters [pub = -1]) [ask turtle target [set pub -1]] ] [ ifelse priv = 1 [if (any? q-voters with [pub = 1]) [ask turtle target [set pub 1]]] [if (any? q-voters with [pub = -1]) [ask turtle target [set pub -1]]] ] ] ] ;; THINK ifelse random-float 1 < p [ ;; independence ask turtle target [ ifelse random-float 1.0 < 0.5 [set priv 1][set priv -1] ] ] [ ;; conformity ifelse (count link-neighbors) >= q [set q-voters n-of q link-neighbors] [set q-voters nobody] if q-voters != nobody [ ifelse pub = 1 [if (all? q-voters [pub = 1]) [ask turtle target [set priv 1]]] [if (all? q-voters [pub = -1]) [ask turtle target [set priv -1]]] ] ] ] set diss ((count turtles with [priv = 1 and pub = -1] + count turtles with [priv = -1 and pub = 1]) / N) if(ticks > 1000) [ ifelse (length diss_1000 >= 1000) [ set pub_p_1000 lput (count turtles with [pub = 1] / N) pub_p_1000 set pub_p_1000 (but-first pub_p_1000) set avg_pub ((sum pub_p_1000) / 1000) set priv_p_1000 lput (count turtles with [priv = 1] / N) priv_p_1000 set priv_p_1000 (but-first priv_p_1000) set avg_priv ((sum priv_p_1000) / 1000) set diss_1000 lput diss diss_1000 set diss_1000 (but-first diss_1000) set avg_diss ((sum diss_1000) / 1000) ] [ set pub_p_1000 lput (count turtles with [pub = 1] / N) pub_p_1000 set priv_p_1000 lput (count turtles with [priv = 1] / N) priv_p_1000 set diss_1000 lput diss diss_1000 ] ] tick end to go-TA ask links [set color gray set thickness 0.1] set-shape set target random N ask turtle target [ ;; THINK ifelse random-float 1 < p [ ;; independence ask turtle target [ ifelse random-float 1.0 < 0.5 [set priv 1][set priv -1] ] ] [ ;; conformity ifelse (count link-neighbors) >= q [set q-voters n-of q link-neighbors] [set q-voters nobody] if q-voters != nobody [ ifelse pub = 1 [if (all? q-voters [pub = 1]) [ask turtle target [set priv 1]]] [if (all? q-voters [pub = -1]) [ask turtle target [set priv -1]]] ] ] ;; ACT ask my-links [set color black set thickness 0.2] ifelse random-float 1.0 < p [ ;; independence ask turtle target [set pub priv] ] [ ;; conformity ifelse (count link-neighbors) >= q [set q-voters n-of q link-neighbors][set q-voters nobody] if q-voters != nobody [ ifelse priv = pub [ if (all? q-voters [pub = 1]) [ask turtle target [set pub 1]] if (all? q-voters [pub = -1]) [ask turtle target [set pub -1]] ] [ ifelse priv = 1 [if (any? q-voters with [pub = 1]) [ask turtle target [set pub 1]]] [if (any? q-voters with [pub = -1]) [ask turtle target [set pub -1]]] ] ] ] ] set diss ((count turtles with [priv = 1 and pub = -1] + count turtles with [priv = -1 and pub = 1]) / N) if(ticks > 1000) [ ifelse (length diss_1000 >= 1000) [ set pub_p_1000 lput (count turtles with [pub = 1] / N) pub_p_1000 set pub_p_1000 (but-first pub_p_1000) set avg_pub ((sum pub_p_1000) / 1000) set priv_p_1000 lput (count turtles with [priv = 1] / N) priv_p_1000 set priv_p_1000 (but-first priv_p_1000) set avg_priv ((sum priv_p_1000) / 1000) set diss_1000 lput diss diss_1000 set diss_1000 (but-first diss_1000) set avg_diss ((sum diss_1000) / 1000) ] [ set pub_p_1000 lput (count turtles with [pub = 1] / N) pub_p_1000 set priv_p_1000 lput (count turtles with [priv = 1] / N) priv_p_1000 set diss_1000 lput diss diss_1000 ] ] tick end
There is only one version of this model, created over 1 year ago by Barbara Kamińska.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
q-voter model (expressed & private opinions).png | preview | Preview for 'q-voter model (expressed & private opinions)' | over 1 year ago, by Barbara Kamińska | Download |
This model does not have any ancestors.
This model does not have any descendants.