Simulating the influence of terror management strategies on the voter ideological distance using agent-based modeling

This paper simulates the effect of the strategies implemented by politicians after the terrorists attacks in Madrid on 11 March 2004 on the ideological distance between voters and political parties. The attacks took place three days before the elections and changed the campaign’s agenda, which centered around the issue of who was responsible for the attack: ETA or Al Qaeda. It also altered the agenda of the mass media, which focused its informative activity on broadcasting news related to this issue. We did an exhaustive selection process of all the news broadcast on television, radio, and newspapers that made reference to the authorship of the attack. Using these messages we developed an agent-based model for explaining how the political strategies implemented by political parties influenced the ideological distance. The proposed model is based on the ideological proximity model by Downs (1957). After calibrating and validating the model with real data, we simulated the effect of three political strategies from the theory of terror management on the ideological distance between voters and political parties: the rally around the flag, the opinion leadership, and the priming of public opinion and media coverage. The results show that these strategies have a significant and stable impact on the ideological distance. In particular, the rally around the flag can have a lasting effect, capable of changing the ideological distance in the short term after a terrorist attack.


Introduction
Political science shows that terrorism in general, and more particularly terrorist attacks close to elections, have an impact on the vote and campaign strategy of political parties (Berrebi and Klor, 2007;Berrebi and Klor, 2008;Fishman, 2005;Randahl, 2018). The attack on 11 September 2001 in the United States is one of the best known and most studied cases. The literature shows that this terrorist attack influenced the perception that public opinion had of George W. Bush's management and the electoral support of the Republican Party (Randahl, 2018). The elections on 14 March 2004 (14-M) in Spain also constitute a relevant milestone in the history of electoral behavior and the management of terror by political parties due to the attacks on the 11th of March in . Bali (2007) identified two events, which turned this electoral process into something extraordinary. On the one hand, there was a terrorist 2. Background

Theory of terror management and ideological distance
Originally, the theory of terror management focused on the analysis of the efficiency of government policies to combat terrorism since it conditioned the perception that citizens had on their government's management (Willer and Adams, 2008). After the military operations in Iraq and Afghanistan, the terrorist attacks of 9/11 in the US, and the 11-M in Spain, several studies showed that the political division regarding terrorism has increased its influence on public opinion. Within the theory of terror management, a new line of research has emerged analyzing both the relevance of terror and terrorism in the perception of voters for those leaders or parties that manage the defense of the country (Landau et al., 2004).
There are three main approaches explaining the mechanisms that operate in the relationship between terrorism and public opinion: the rally around the flag, the opinion leadership, and the priming of public opinion and media coverage, and all of them will be tackled by the current contribution. First, Mueller defines three criteria for generating a rally effect: "i) it is international, ii) involves the United States and particularly the president directly; and iii) specific, dramatic, and sharply focused" (Mueller, 1973). We can see that the 11-M attacks fit these criteria, and therefore should have generated a rally around the flag effect during the 2004 Spanish elections. This effect indicates that the 11-M attacks put the government of the PP in the focus of attention of national public opinion. Therefore, these attacks should have generated an increase in the PP's voting intention because the government issued several messages guided at generating a patriotic reaction in order to induce the majority of the voters to vote for the PP as the government party was then the most confident to protect the country from a terrorist attack.
In contrast with the rally around the flag, several authors proposed the opinion leadership paradigm (Baker and Oneal, 2001;Hetherington and Nelson, 2003;Colaresi, 2007;Chowanietz, 2011). According to this paradigm, in front of an event such as the terrorist attacks on 11-M, the main leaders in the political opposition should engage in criticizing the government for its management of the crisis. A thorough analysis of the contributions supporting the opinion leadership shows that the nature and scope of the messages emitted by this elite (i.e., relevant leaders from the opposing parties) depend on the coverage provided by the media. In addition, it shows that not all the messages achieve similar relevance to public opinion. The persuasion of messages broadcast by the elite depends on their credibility, which is conditioned by the interaction between sender, receiver, message, and media (Edwards and Swenson, 1997;Colaresi, 2007;Groeling and Baum, 2008;Randahl, 2018).
Finally, the priming theory of public opinion and media coverage is based on the role of the media, which intensifies the news related to political and governmental action during an electoral campaign (Brody and Shapiro, 1989). In the context of the 11-M attacks, the media had a strong incentive to highlight news of interest because the elections were only three days later. This interest can be exploited by the main parties: if the news favored the interests of the ruling party, then its content is emphasized and amplified by the party leaders; if the news damaged the popularity of the government, the opposition leaders found it advantageous to spread them since it would favored their electoral interests (Bali, 2007). These incentives could be consistent with earlier studies on the 11-M attacks: Montalvo (2011) concluded that the attacks altered the election results as the conservative party would have won the elections in its absence. The priming of public opinion and media coverage theory can be differentiated from the former two approaches because the media can influence the perception of the public opinion with respect to how the Government managed the crisis. This differentiation involves highlighting certain news and ignoring others (Edwards et al., 1995;Iyengar, 1994;Krosnick and Brannon, 1993;Zaller, 1992). In addition, in the electoral campaign, the government is an additional actor sharing the leading role with the elite (Bali, 2007).
In view of this background, we can hypothesize that different strategies in terror management can induce different responses on voters' ideological distance through the effect of mass media. Therefore, the role of mass media is essential for developing this relationship, as mass media has proven to have multiple effects on politics (Piolatto and Schuett, 2015;Strömberg, 2015). This ideological distance between the voters and the political parties can be modeled following different approaches. One of the earliest is the proximity voting model by Downs (1957), which considers the Euclidean squared distance between the political position of the voter and the candidate's position. It defines a continuous one-dimensional space where both voters and candidates are located considering their ideological positioning (i.e., left-right). Voters evaluate each party and compute the distance/proximity between each candidate and their personal preferences. The closer the ideological position of a party is to the ideological preferences of the voter, the higher the utility obtained by voting to that specific party. The decision rule of the proximity vote proposed by Downs (1957) is expressed by the utility function P j i , where v i is the ideological positioning of the voter i and p k i is the ideological location of party k.
Later on, Hinich (1984, 1994) developed the spatial theory of voting based on the previous contributions by Downs (1957) and Black et al. (1958). They assumed that the political parties and the voters are placed in a continuum that reflects their positions before a political issue. Therefore, the latter model predicts that each voter votes to the closest party and the political parties try to locate themselves at that point which allows them to maximize the number of votes, driven by the logic of maximizing their electoral support. Rabinowitz and Macdonald (1989) specified a distance-based voting model that reflects the intensity with which voters and candidates want to change their ideological position. Thus, they proposed a model that reflects the intensity with which both voters and candidates hold their preferences for a certain direction of policy making. Finally, a recent development of space theory is Kedar's compensational voting model (Kedar, 2005;Kedar, 2009), an extension of previous proximity and discounting models by including a counterfactual thought-experiment where outcome-oriented voters compare the utility of the current party system with respect to the obtained by a hypothetical one. In this hypothetical system, a given candidate is removed from the policy-making process, and therefore, the difference of these systems represents the utility of the candidate (Kedar, 2009).

Related work in ABM and spatial modeling
ABM is a popular approach for analyzing political scenarios (Fowler and Smirnov, 2005;Kollman et al., 1998;Moya et al., 2017;Muis, 2010;Sudo et al., 2013). Furthermore, there are several contributions exploring the joint use of ABM and spatial theory of voting. From those, there are some studies using a Dowsonian approach like the one followed in the current manuscript (Clough, 2008;Plümper and Martin, 2008). Clough (2008) explores the impact of uncertainty into an ABM, concluding that typical models with complete information do not converge to the median distance but the simulations using higher levels of uncertainty actually do. Plümper and Martin (2008) introduce an ABM using a Dowsonian spatial model with multiple parties and multiple dimensions. They find that the number of competing parties and the likelihood to abstention increases the average distance between the parties and the center of the ideological scale. However, we can see that these studies tackle issues that are not directly linked to our problem, as we here analyze the effects of information broadcast into the ideological distance between voters and political parties.
In addition, another line of research worth mentioning is the one using ABMs and spatial models for analyzing political competition. Laver (2005) explores spatial models of political competition where parties follow adaptive rules. Since voters are modeled to vote for the closest party, parties behave as stickers (who never change their position), aggregators (which aim to the mean preference of the existing voters), hunters (who move greedily for maximizing the number of supporters), or predators (that moves towards the largest party). This work is later extended by Laver and Schilperoord (2007), where the authors study the survival of political parties by considering a dynamic environment where new parties can appear and the existing ones can be extinguished. The results of this model suggest that vote-seeking parties tend to make voters miserable, since their priority is to get new supporters instead of focusing on their current supporters (Laver, 2011). Laver's approach to political competition has been extended by several contributions (Adams and Mayer, 2008;Lehrer and Schumacher, 2018;Wright and Sengupta, 2015). Finally, we can observe how the parties of our study would have been considered as stickers by Laver, since the three of them do not move their position regarding the authority of the attacks, which was the main issue during this period.

Description of the agent-based model for ideological distances
The designed ABM is used for testing our hypothesis: the 11-M attacks and its management by the Spanish government and the opposition influenced the ideological distance between the voters and the political parties. In this influence the mass media played a critical role as they connect the information produced by political parties with the voters. Our approach is to analyze the changes on the ideological distance itself, which makes it the main variable of the model, not to use the ideological distance as a method for explaining the behavior of the voters neither the outcome of the elections. Finally, our model computes the ideological distance following the proximity model by Downs (1957), since the available data does not allow us to reproduce other models based on intensity (this issue is further addressed in Section 4.1).

General structure and agent's state
Our model considers a terminating simulation of 72 steps, which represents the 72 hours between the attacks and the elections (from March 11 at 8:00 AM to March 14 at 8:00 AM) using a time-step of an hour. The model simulates the behavior of N agents representing artificial voters and their reaction to the information received from C mass media channels along with the diffusion of this information through the social network due to a WOM process. The information supplied by the mass media channels contains a polarized message from different political leaders from the P main parties (i.e., PP, PSOE, and IU), which concentrated 85.26% of the total votes. Due to the strong positioning of the parties regarding the authority of the attacks, these messages influence how the agents position the parties in the ideological space.
This message polarization modifies the perception of the agents with respect to the ideological distances between them and the main parties. We model this effect by using the state variable distance, encoded as Λ k i , a real-valued variable, with i ∈ {1, …, N} and k ∈ {1, …, P}. The value of the latter variable changes during the simulation depending on the amount of external influences supplied by the mass media and the other neighboring agents. The distance variable is initialized by using the locations of the ideological space of voters and political parties (CIS, 2004). These data are introduced as v i and p k i using integer values defined in interval [1,10], where v i is the ideological location of the voter i and p k i is the ideological position that i assigns to the party k ∈ {1, …, P}, as P is the number of parties participating in the election. Therefore, we can compute the initial ideological distance as 0,9]. In addition, the state variable Φ i = {0, 1, …, P} represents the political dispositions of each agent i, which identifies it as voter of a particular party (i.e., the agent voted for IU, PP, PSOE, or the remaining parties in the previous elections) or as a non voter (i. e., abstainers). Thus, Φ i takes the value of the party when the agent is a voter and 0 if it is a non-voter or abstainer.

Social behavior of the agents and word-of-mouth
The N agents of the model are connected by an artificial social network (Barabási and Albert, 1999;Watts and Strogatz, 1998) modeled as a scale-free network (Barabási and Albert, 1999). We select the scale-free approach because many real-world networks match this topology (Barabási and Albert, 1999;Newman et al., 2006). The degree distribution of these networks is shaped as a power law, where most nodes have few connections but few nodes have multiple connections, that are referred as the hubs of the network. Barabasi-Albert's preferential attachment algorithm (Barabási and Albert, 1999) allows to generate scale-free networks relying on the parameter m. This parameter modulates the growth rate of the network and its final density (Barabási and Albert, 1999). Barabasi-Albert's algorithm starts with a fully connected graph with m 0 initial nodes. Then, the algorithm iterates by adding a new node to the network and connecting it to m existing nodes which are selected with a probability proportional to their degree. This procedure continues until the network reaches the desired size. The final average degree of the resulting network can be calculated as 〈k〉 = 2m.
Agents can share their perceptions regarding their ideological distances with the main parties. These interactions between the agents can be modeled as a contagion process (Lee and Kim, 2014;Newman et al., 2006) as they spread their distance values through the social network. At every step of the simulation, each agent i considers a talking probability (p i (t) ∈ [0,1]) of spreading its distance values for the different parties (collected in the Λ k i values). Therefore, the agent spreads its values with all of its neighbors each time the probability check is passed. The variable influence (Δ) models the influence of an agent with its neighbors. When an agent shares its perceptions, it does it in a directed-only way (i.e., from the active agent to its neighbors). The update of the distance value due to social interactions is defined by Eq. 2, where Λ k j (t) refers to the distance value of the neighbor agent j of party k when the active agent i shares its perceptions. This equation regulates the final influence using two additional values, since it would not be realistic that agents with very distant ideological positions were to influence each other. First, Θ(x) represents the Heaviside step activation function with returns 1 when x⩾0 and 0 otherwise. Therefore, it disables the WOM influence when the distance difference is greater than a given threshold ψ. Second, voters with different political dispositions (i.e., voters of different political parties or nonvoters) are less likely to influence each other. This is resembled by the parameter ϕ ∈ (0, 1], which regulates the influence when Our model considers an additional parameter referred as influence decay (dΔ) that regulates how social influence erodes over time if it is not reinforced with further stimulus. Therefore, every agent reduces its accumulated social influence at the beginning of each simulation step due to this decay effect. The accumulation of social influence (δ k i (t)) due to WOM interactions follows Eq. 3, which represents the accumulated changes to Λ from the start of the simulation to the current step t. Finally, the distance value change experienced by agent i with respect to party k due to the decay effect is defined in Eq. (4).

External influences using mass media channels
The registered media audience between 11-M and 14-M are the external influences to the agents during the simulation (AIMC, 2004;García, 2004), which can influence any agent during any simulation step. These media, modeled as global mass media (González-Avella et al., 2007), are parameterized for resembling the differences between the multiple channels. These channels are able to reach any agent randomly depending on the audience of the channel for that step. The selected media are written press, radio, and television channels, since the Internet did not have enough influence in 2004. In addition, we model cell phone messages and similar communications using WOM, as it is well known they had a strong activity and voting influence during the studied period (Olmeda, 2005).
The information supplied by the mass media channels considers any message containing information about the attacks, whether it appeared in regular news sessions, were included as special bulletins, or were taken from statements of political figures. This information was selected following three main criteria: diversification (we consider multiple types of mass media channels), scale (we include mass media channels operating nationally), and plurality (messages were included avoiding discrimination of sources). The selected channels are Cadena Ser (radio), El Mundo (written press), El Pais (written press), ABC (written press), Antena 3 (television), Telecinco (television), and TVE (television).
During the simulated period, these selected channels where the most relevant operating in Spain. Thus, its combination considers the main messages produced between the attacks and the elections. The analyzed television channels had more than 75% of share and 45% of radio users listened to Cadena Ser (AIMC, 2004), which is also known for having a relevant role during this political event (Olmeda, 2005). Finally, the selected written press was the most read at the time.
Mass media channels can spread different messages at any step t and can have different values for their parameters despite of belonging to the same media type. Each message transmitted by the media channels considers a polarization value modeled as m c (t) ∈ [ − 2, 2], that models the content of a message broadcast by specific channel c at time-step t (i.e., authority of ETA versus authority of Al Qaeda). m c (t) is set to − 2 in case the message clearly informs that Al Qaeda as the author of the terrorist attack and 2 if it clearly informs of ETA's authority. The values − 1 and 1 are assigned to the interventions of political leaders that either support or criticize the actions and transparency of the Spanish government during the crisis, instead of discussing specifically the authority of the attacks. Since most of the messages from this period are concerned with the authority of the attacks, the messages of the latter category represents around 5% of the total messages and mostly appear in the second half of the simulation. Finally, 0 refers to the message not being biased to any specific terrorist organization. Because the simulation runs hourly, for any time-slot where two or more messages appear the resulting polarization value is computed as the average of these messages.
In addition, because there are two competing frames aligned with the considered parties, the transmitted polarization modifies the distance of parties differently. If the resulting polarization of a message is biased towards ETA (i.e., polarization > 0) then the agent's distance with the PP party is reduced and the distance with the other parties is increased. In contrast, if the message is biased towards Al Qaeda, the perceived distance with the PP party is increased and the distance with the other parties is reduced. Finally, the polarization values were scored by different experts due to the subjectivity of this task and agreeing the final values using the average.
Besides the transmitted message, mass media channels are modeled with respect to their reach, their influence, and their buzz. The reach parameter (r c ∈ [0, 1], ∀c ∈ {1, …, C}) models the maximum percentage of the agent population that each channel can hit in a single step, since some channels can potentially reach to more people than others (Moya et al., 2019). The data for setting this parameter is taken from the Zenith's media track 1 that studies mass media consumption in Spain in 2013. Since it includes data since 2006, we can approximate the reach parameters for the 2004 Spanish elections from the mass media reach values of 2006.
The influence parameter (Δ ′ c ) modulates the influence achieved by a mass media channel after impacting a given agent. This influence works similarly to the produced by WOM interactions, but in this case the distance change is calculated by using the specific change value of the channel c and the polarization of that channel during that time-slot. Since an agent could receive the same message multiple times, the maximum influence is bounded by an overall influence value (Δ max c ). In addition, the influence previously accumulated by the channel (δ ′k c ) is treated similarly to one accumulated by WOM. An agent i experiences a change of its distance values for party k by the influence of a given channel c following Eq. 5, where m k c (t) refers to the resulting polarization for party k in time-step t and Δ max c represents the maximum amount of influence that can be supplied by c. However, as the simulation progresses and new messages are produced by mass media channels, the agents tend to forget previous messages (Moya et al., 2017;Wu and Huberman, 2007;Yang and Leskovec, 2010). We model this effect using the influence decay (dΔ c ) parameter, that regulates the rate at which the agents are forgetting previous influences, analogously to WOM. The distance value update of agent i for party k due to the effect of decay of channel c is defined by Eq. 6.
Additionally, the information supplied during this critical events is likely to trigger a viral buzz effect on the listening agents. Thus, we include a buzz increase parameter (τ c ) for each channel c that increases the agent's talking probability by a given percentage of its initial value (p(0)). However, this buzz effect decreases over time as newer information is spread by the media. The buzz decay parameter (dτ c ) reduces the previously increased talking probability in the agents because of the effect of τ c . Therefore, the talking probability values of an agent i are updated according to Eqs. 7 and 8, respectively.

Model calibration and validation
This section introduces the processes used for calibrating and validating the model along with the employed data. Section 4.1 describes the setup of the simulation and the data used for initializing and adjusting the model. Then, Section 4.2 introduces our automatic calibration approach and discusses its results. Finally, Section 4.3 reviews the different outputs of the calibrated model.

Data description and simulation setup
The ideological positions for the voter agents (v i ) and the ideological position where they allocate the considered parties (p k i ) are taken for the 2553 study of the CIS (2004). This is the pre-elections survey developed between December 8 and 15 of 2003 that considers a sample size of 1,500 interviews. As detailed in the survey, the interviewed individuals were selected using a multistaged, stratified, cluster sampling, with the selection of primary units sampling (municipalities) and the secondary units (neighborhood) proportionally random, and the last units (individuals) by random routes and quotas of sex and age. In addition, we use the 2555 study (the post-elections survey) for calibrating the model 2 . However, in this case we consider the average distance of the interviewed individuals as the target average distance values for the agents. In addition, these surveys does not contain enough information for modeling the ideological distance using the approaches based on intensity, since the post-election survey does not ask how important (intense) the attacks were for the voters' decision.
The polarized values (m k c (t)) of the multiple messages supplied by the different mass media channels are defined using information from different sources. In the case of television we used the informational volume 19-20 from Quaderns del Consell de l'Audiovisual de Catalunya (Consell de l' Audiovisual de Catalunya, 2004). The messages from the radio were analyzed using the audio from Cadena Ser 3 , since this is the only radio channel providing access to their audios for the analyzed period. The written press values (i.e., El País, El Mundo, and ABC) were extracted from the MyNews on-line database 4 . Finally, the assessment of the messages was taken from a previous study (Moya et al., 2017), where several experts already evaluated the polarization of the considered messages.
Using these data, the simulation setup considers a set of N = 21, 280 agents. This population size is set by extending the number of interviews of the pre-elections survey and instancing multiple agents for each of the interviewed voters. In addition, the regulators of the WOM interactions are set to ψ = 3 and ϕ = 0.5, respectively. On the one hand, a value of ψ = 3 disables WOM interactions when the difference in the distance values of the interacting agents is greater than 3 (i.e., a third of the variable's max range). On the other hand, a value of ϕ = 0.5 halves the resulting influence of two agents that represents voters from different political dispositions, offering a good balance by allowing WOM influences between agents from different groups while penalizing these exchanges. Finally, the simulation considers 30 Monte-Carlo runs.

Results of the automatic calibration algorithm
We use automatic calibration for adjusting the parameters of the model. It is an automatic procedure that tunes a selection of the model's parameters using an optimization method and a deviation function which compares the model's simulated output with the target real data. The optimization method minimizes the deviation function iteratively by running independent model simulations for each candidate parameter configuration. After the adjustment the resulting model configuration requires to be reviewed in detail to check its validity, which is performed in the following sections.
The automatic calibration procedure adjusts 35 parameters of the model. These parameters are those regulating the diffusion of information from the C channels, since those are both the hardest to set manually using the available information. For each of the selected mass media channels, we calibrate five of its parameters: its maximum influence (Δ max c ), influence change (Δ c ), influence decay (dΔ c ), buzz increase (τ c ), and buzz decay (dτ c ). These parameters are calibrated within the (0, 1] interval, with the exception of the maximum influence parameters (Δ max c ) which take a value in the (1.5, 2.5] interval. A memetic algorithm (Moscato, 1989) that comprises a steady-state genetic algorithm (Back et al., 1997) and local search refinement is selected as our optimization method. The algorithm is initialized considering a population of 100 feasible solutions that represents valid values for the selected models' parameters using an integer coding. These integer-coded values are the result of splitting the given real-coded intervals of valid parameter values with a size-step of 0.001, as done in . The algorithm iterates until reaching a stopping criteria of 10,000 evaluations. Each evaluation involves running 30 individual Monte-Carlo simulations of the ABM in order to obtain the fitting of a model parameter configuration.
In addition, the algorithm considers 3-tournament selection, uniform random mutation, and a BLX-α crossover (Herrera et al., 1998). The mutation operator has a mutation probability p m = 0.1 of modifying each decision variable. This operator resets the value of the mutated gene by generating a new random value from its specific interval using an uniform distribution. The crossover operator activates with probability p c = 1 and generates two offspring solutions by crossing two existing parent solutions. These Model fitting is computed using the values of the post-electoral survey (CIS, 2004), where the participators were asked to position both themselves and the parties in an ideological scale between 1 and 10. For each participant, the ideological distance is computed as the absolute difference between their position on the ideological continuum and the position of each political party. Therefore, the average values of all the voters' distances are used for evaluating the fitness of a given model configuration by comparing them with the simulated distance values at the end of the simulation. Table 1 shows the fitting results for the calibrated model. In these values, we can observe that the calibrated model obtains an excellent fitting for IU and PP parties, since their absolute deviation error (computed as |o j − s j |, with o j being the observed value and s j 2 Notice that, we are aware that using this source of data to initialize and calibrate our model could be slightly problematic. On the one hand, the ability of the pre-electoral data of the Spanish Center for Sociological Research to predict the election results in Spain has been deceptive in some elections. On the other hand, post-electoral surveys could tend to overestimate the voters for the winning party. Nevertheless, the final goal of our case study is not to predict the results on the elections but to elaborate on the voters' ideological positioning, which should be less sensitive to the latter problems. Besides, the surveys of the Spanish Centre for Sociological Research are the only source including all the required information to build and calibrate our model, and it has been obtained from a representative sample of the population in Spain. 3 http://www.cadenaser.com/static/especiales/2005/sonidos11_14/dia11.html 4 http://ugr.mynews.es/hu/ being the simulated value) is equal to or lower than 0.05 for both parties. If this deviation is translated to a percentage error (100|o j − s j |/o j ) with respect to the actual values from the post-electoral survey (2.43 and 3.42, respectively) the deviation is still lower than a 2%. However, the average distance for the PSOE party results harder to fit, since the absolute deviation is 0.18. As the target value is the lowest of all parties (1.57), the relative error (around a 12%) is greater than the other parties but we can argue that the calibrated result is acceptable. Additionally, we note that no other model configuration can improve the fitting of PSOE's distances without reducing the fitting of the other two parties.

Model's output and analysis
The main output of the model is the evolution of the distance values for each party during the different steps of the simulation. Fig. 1 shows the average of the distance values for the agents of the model by each party at each step of the simulation. These values are computed using the average of the 30 Monte-Carlo runs with a resulting negligible deviation, hence it is not shown in the charts. The overtime values show that the average distance increases during the beginning of the simulation for the IU and PSOE parties and reaches its maximum value at step 16. After this peak, a moment where a significant change in the information broadcast by the mass media arose as a consequence of the findings by the Spanish police, the values decrease until stabilizing during the final steps of the simulation. We can see how the average values have a similar behavior over time for both parties (i.e., IU and PSOE). In contrast, we can see that the average statistics show an opposite behavior for the PP party as they reduce their values during the first steps of the simulation and increase them in the subsequent steps.
Additionally, the social behavior of the agents can be evaluated regarding the number of WOM interactions and the effect those interactions. Fig. 2 shows the average percentage increase on the number of WOM interactions during the simulation, with the blurred areas representing the Monte-Carlo variability. These values show two peaks for each day of the simulation corresponding with the news in the afternoon and in the evening. Hence the news on prime time had the biggest share for the televisions and caused a high buzz for the following steps.
The effect of the agents' social interactions can be approached as the sentiment of WOM. It reflects the impact of these interactions on the agent distance values showing if there is a majority of conversations increasing or decreasing the distance values. Sentiment value indicates the trend of the social interactions and hence an unfavorable sentiment means that there are more conversations increasing the distance values than decreasing them. Therefore, a sentiment value of 5 means that there are 5% more unfavorable WOM interactions than favorable ones (i.e., those decreasing the distance values). Fig. 3 shows the average sentiment of WOM interactions for each party. We can identify how the peaks in the sentiment values match with the timing of the news, as observed in the WOM volume. In addition, we can see how the sentiment trend shifts during the simulation. At the beginning of the simulation, the sentiment for both IU and PSOE parties is unfavorable while the sentiment of PP is favorable. Then, these trends shifts as the mass media polarization changes. This can be also observed in the overall aggregated sentiment behavior.

Analysis of what-if political scenarios
Using our calibrated and validated model we can simulate and analyze the political scenarios from the theory of terror management identified in Section 2.1. Thus, the rally around the flag is analyzed in Section 5.1, the opinion leadership is studied in Section 5.2, and the priming of public opinion and media coverage is tackled in Section 5.3. We can see the impact of these scenarios on the resulting ideological distance values of the artificial voters by analyzing the values obtained at the end of the simulation. Hence, Fig. 10 displays the Table 1 Distance values from the election surveys and simulation results. Additionally, the simulation deviation error is shown both as an absolute value and as a percentage value.  absolute variation of the resulting average distance values with respect to the baseline calibrated model for the multiple Monte-Carlo simulation runs using boxplots.

The rally around the flag
The rally around the flag scenario is simulated by modifying the polarization of the mass media channels to have only those messages that support the government's version towards the authority of the attacks. Therefore, the messages that either blame Al Qaeda or which accuse the government of lying are disabled and do not take effect during the simulation. Fig. 4 shows the average ideological distance values for this scenario. In these values, we can observe that the rally around the flag has a significant impact on the ideological distance values for every party.
The distance values produced by this scenario can be clearly distinguished from the baseline scenario, specially after step 16 where the polarization towards Al Qaeda would have started to become stronger in the baseline scenario (see Fig. 1). We can see that the combined effect produced by the rally around the flag, where all the media channels support the same communicative framework, produces stable values that can resist the accumulated decay effect during the simulation. In view of the results in Fig. 10, we can recognize that this scenario has the highest impact on the parties since the average distance values for each party show a deviation of around 0.5.
Finally, Fig. 5 shows the sentiment of the WOM interactions for this scenario. In these values we can observe that the sentiment trend for the PP party is mostly favorable during the whole simulation, which implies that the distance values of the PP party are constantly being reduced. In contrast, the sentiment values for IU and PSOE are mostly unfavorable or neutral, reflecting a constant increase on their distance values.

The opinion leadership
We can simulate the opinion leadership scenario by reducing the messages of the mass media channels to those statements of opinion leaders that claim that the government lies regarding the authority of the attacks. This is done by disabling the messages that mention the authority of the attacks by either ETA or Al Qaeda as well as the messages supporting the government. Since the remaining messages do not compose a sample with enough size for reproducing the opinion leadership effect, we propose to analyze the hypothetical scenario by inserting additional messages of opposing leaders where they criticize the government. This allows us to analyze the opinion leadership scenario according to the assumptions of the theory of terror management. Thus, we include several messages from this category in the TV channels during their afternoon and evening news. By including these new messages during the TV channels prime time their effects should be observed clearly, since these are the mass media with the highest audience. Fig. 6 shows the average distance values for this scenario. From this figure we can observe that this scenario has noticeable effects on the average distance values for the analyzed parties in the selected time steps. We can see that the accumulated change produced by these new messages involves a stable variation on the average distance for every party, although some change is lost over time due to The effect of these messages can be corroborated by the associated sentiment values, depicted in Fig. 7. We can observe how the newly added messages produce individual spikes in the sentiment values during the corresponding news time step. This involves a strong favorable sentiment for IU and the PSOE party and an unfavorable sentiment for the PP party. However, we can also recognize how the sentiment variation for the PP is lower than the variation shown by the other parties.
As seen in the variation of the distance values for this scenario with respect to the baseline simulation, showed at Fig. 10, this scenario produces a similar effect in all the parties, reducing the distance of IU and PSOE and increasing the distance of the PP party by the same amount. This shows how a systematic appearance of the political leaders criticizing the government during the 2004 Spanish elections would have a strong impact in the ideological distance of the voters and highlights the role of the leaders of opposing parties.

Priming of public opinion and media coverage
The simulation of the priming of public opinion and media coverage scenario is designed by focusing the broadcast information in the messages pointing out Al Qaeda's authority of the attacks. Thus, the messages supporting that ETA is responsible for the attacks and those either blaming or support the Government are disabled. The resulting distance overtime values for this scenario are displayed at Fig. 8. These values resemble a significant impact on the average distance values of the voters with each party: in the cases of the PSOE and IU the average distance is reduced below the values of the baseline; in contrast, for the PP it increases its values beyond the baseline.

Fig. 5.
Average sentiment of WOM interactions for each party for the rally around the flag scenario. Blurred areas represent the maximum and minimum values between the multiple Monte-Carlo repetitions. In addition, the average overall sentiment resulting from aggregating the parties' alues is also included. A dotted line at 0 represents neutral sentiment, separating the favorable and unfavorable sentiment areas. This can also be observed at Fig. 10, which shows a deviation of around a 0.15 for every party in their distance values. Similarly to the results obtained by the rally around the flag scenario, the average distance values at the end of the simulation stay stable and seem to resist to the erosion caused by decay. This suggests that the effect of this scenario could have prolonged over time. In contrast with the results observed in the opinion leadership scenario, the overtime evolution of the average values is constant, instead of being pushed by the information supplied during a specific time-step. This also resembles how the information regarding Al Qaeda's authority of the attacks was constant during the three days period.
The sentiment values for this scenario (shown at Fig. 9) can support the latter conclusion. The observed sentiment values show that the interactions regarding the PP party are mostly unfavorable for the whole simulation, which increase the average distance value. In the case of IU and PSOE, we can see how they maintain a favorable sentiment trend during the simulation, including a maximum favorable sentiment higher than − 5.

Concluding remarks
In this paper we have analyzed the effects of the politicians' management of the 11-M attacks on the ideological distance of voters Fig. 7. Average sentiment of WOM interactions for each party for the opinion leadership scenario. Blurred areas represent the maximum and minimum values between the multiple Monte-Carlo repetitions. In addition, the average overall sentiment resulting from aggregating the parties' values is also included. A dotted line at 0 represents a neutral sentiment, separating the favorable and unfavorable sentiment areas. with PP, PSOE, and IU in the 2004 Spanish elections. We carried out our analysis by designing and implementing an ABM that simulates the three days between the attacks and the elections and includes the information spread by different mass media channels. In our simulation, the artificial voter agents are exposed to both social interactions with other agents within an artificial social network and to the external influences of the main mass media channels in Spain in 2004. We calibrated our ABM with a memetic algorithm which comprises a steady state genetic algorithm with local search refinement.
Multiple model outputs were analyzed for its validation: the average distance for each party (i.e., the main output for our study), the number of WOM interactions in the social network, and the sentiment of the latter interactions. These performance indicators showed how the politicians' management of the 11-M attacks could have influenced the ideological distance between the voters and the PP, PSOE, and IU parties. By using the calibrated and validated model, we were able to analyze three related political scenarios from theory of terror management: the rally around the flag, the opinion leadership, and the priming of public opinion and media coverage.
The simulated scenarios showed how the combined effect produced by all the media channels supporting the same communicative framework produced a significant and stable impact on the distance values of the voting agents. In these scenarios, we have identified that the distance values for both IU and PSOE behave in a similar way, which is consistent with them being in the opposition. On the contrary, the PP shows a different behavior for each scenario, which is consistent with it being the party in government. In addition, the observed impact on the distance values of the voting agents suggests that certain approaches to terror management could have a longterm effect on the ideological distance. Therefore, we have shown that the effects of the politicians' management after a shock like the 11-M attacks can produce a change in the ideological distance in the short term.
Future work will study employing more advanced techniques for modeling these complex political scenarios. For example, the use of fuzzy logic and computing with words (Giráldez-Cru et al., 2020) could improve the modeling and spread of linguistic information like the one describing ideological distance between the voters and the parties. In addition, fuzzy cognitive maps (Papageorgiou, 2013) Fig. 9. Average sentiment of WOM interactions for each party for the priming of public opinion and media coverage scenario. Blurred areas represent the maximum and minimum values between the multiple Monte-Carlo repetitions.In addition, the average overall sentiment resulting from aggregating the parties' values is also included. A dotted line at 0 represents a neutral sentiment, separating the favorable and unfavorable sentiment areas. could be used for modeling the behavior of the voters during these political scenarios.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.