Abstract
The author analyzes through unsupervised machine learning the content of all Friday khutbas (sermons) read to millions of citizens in thousands of mosques in Turkey between 2015 and 2021. The author focuses on six nonreligious and recurrent topics that feature in the sermons, namely, business, family, nationalism, health, trust, and patience. The author demonstrates that the content of the sermons responds strongly to events of national and political importance. The author then links the Friday sermons with about 4.8 million tweets on these topics. The author finds generally strong associations between the topics of the sermons and of the subsequent tweets, controlling for the tweets posted before the sermons. There is also heterogeneity by topic. The link between sermons and tweets is strongest for nationalism, patience, and health and weakest for business. Overall, these results suggest that religious institutions in Turkey are influential in shaping the public’s social media content on salient issues. More generally, these results show that mass offline religious activity can have strong effects on online social media behavior.
On Fridays at noon, Muslims hold a special mass. Practicing men are required to listen to a khutba, a sermon delivered by the Mosque’s imam. The sermons are religious, but they often feature mundane topics. In Turkey, Friday sermons are written centrally by the Turkish Presidency of Religious Affairs (TPRA). The same text is read in thousands of mosques to millions of citizens. This gives TPRA, and through it the government, a massive platform to deliver key social, political, and economic messages.
On February 28, 2020, TPRA changed the Friday sermon abruptly. The original sermon was on how a good Muslim should legitimately earn a living. But the day before, the Turkish forces in Syria were attacked, which resulted in 33 casualties. The eventual sermon was then titled “Unity and Solidarity on the Path for God” and discussed themes on nationalism, martyrdom, and how God would help Turkey toward victory in Syria. Likewise, in 2018 a sermon treated the evils of financial interest, and another advised for protecting the Turkish lira against the appreciating U.S. dollar. These examples suggest that sermons may respond to difficulties the government tackles.
In this study, I classify through a replicable and transparent unsupervised machine learning technique, the content of all Friday sermons written by TPRA between January 2015 and February 2021. I focus on a selected number of nonreligious and recurrent topics that emerge from the text analysis which are relevant from a sociological perspective. These topics are business, family, nationalism, health, trust, and patience. With a focus on these topics, I analyze how the sermons respond to key events and daily politics. I then study whether the Friday sermons are linked with behavior on Twitter. I test whether and how the topic salience of the khutba of a week is associated with the topics of the tweets following the Friday prayer, after controlling for the content of the tweets posted before the Friday prayer.
The present study offers two main contributions. First, I address a debate over the role of politics and religion in Turkey. Since 2010, the Turkish government has invested heavily in TPRA. From 2010 to 2020 TPRA’s budget increased from 2.65 billion to 11.5 billion Turkish Liras, and the number of religious personnel working at TPRA increased from 80,000 to 120,000 (Aksoy and Gambetta 2021). Öztürk (2016) argued that under Recep Tayyip Erdoğan’s Justice and Development Party (in Turkish, Adalet ve Kalkinma Partisi [AKP]) rule, TPRA has evolved into an ideological state apparatus that imposes the political ideology of the ruling party. TPRA’s arm increasingly extends beyond Turkey to the European countries where many Turks live (Öztürk and Sözeri 2018). It is unclear, however, first if TPRA’s political ideology is represented in the Friday sermons too and, second, if TPRA can affect public values and opinion. Despite the recent surge in TPRA’s reach, religiosity seems to be in decline since 2008 (KONDA 2019). In fact, Çokgezen (2022) argued that the decline is caused by the heavy investment of the Turkish government in religion, for the failings of the government are associated with the religious institutions the government is identified with, and dissatisfaction with the government is then projected on to those institutions. As to the khutbas specifically, a rare systematic study shows that the sermons respond to the “threat salience” (e.g., frequency of terrorism-related news) (Alper et al. 2020). Yet the authors do not analyze the effect of sermons on public attitudes or study other more common threats the government faces such as the economy or the pandemic.
Overall, on one hand, there is an ever increasing governmental investment in religious institutions, particularly in TPRA. On the other hand, individual religiosity seems to have decreased in the recent decades in Turkey. Does this mean that TPRA is ineffective in shaping public opinion and that Turkey’s AKP is facing an uphill battle? Or does religiosity decline despite the influence of TPRA? Understanding the extent to which TPRA influences behavior on social media helps address these questions.
Second, I aim to make a methodological contribution. Text-as-data methods, computational tools, and the availability of big social media data offer new opportunities to address social science questions (Lazer et al. 2017). Such computational methods have been successfully applied to sociological questions in traditionally “quantitative” topics such as social networks, collective behavior, emotions, population (Edelmann et al. 2020), with a particular focus on the Western context (Munger, Guess, and Hargittai 2021). Yet they have not been applied as extensively to topics such as religion, though fruitful applications take place in the study of culture (e.g., DiMaggio, Nag, and Blei 2013; Light and Odden 2017). Moreover, most existing social media research considers patterns of behavior and associations that are restricted to the online medium. Research on spillovers between the online and offline worlds is relatively scarce (Vissers and Stolle 2014). The existing spillover literature mainly focuses on how social media affects protests and social movements (Abdul Reda, Sinanoglu, and Abdalla 2021; Kidds and MacIntosh 2016) or how traces of significant historical turning points can be identified online (e.g., Barrie 2020). The literature is scarce as to how offline routine collective behaviors such as religious rituals shape social media. Applying computational tools to the analysis of hundreds of sermons and millions of tweets, the aim of the present study is to push the boundary of computational social science on the spillover between offline religious activity and online social media, in a non-Western context. Moreover, because of the longitudinal nature of the data (sermons change weekly and are typically written by TPRA several days before the Friday prayer), the present study can account for many confounders of the sermon and the social media contents, for example, by using week “fixed effects” in the statistical models and comparing tweets posted right after the sermon with those tweeted before, conditional on the sermon content. This feature of the study design helps get closer to a causal interpretation of the offline to online spillovers.
This curious interplay between religion and politics in Turkey deserves a detailed discussion of the context, which I offer in the next section.
Religion and Politics in Turkey
In the 2002 parliamentary elections which came in the wake of a homegrown economic crisis, a new party, Recep Tayyip Erdoğan’s AKP obtained 35 percent of the popular votes and became the largest political party of the country. Because of the peculiar features of Turkey’s electoral system, with only 35 percent vote, AKP gained 66 percent of all parliamentary seats. Since then, excluding minor setbacks, AKP has won all parliamentary elections since 2002 and remains the largest political party of the country as of 2023.
AKP originates from the long tradition of Turkey’s political Islam (Mecham 2004; Aksoy and Gambetta 2022). The first explicitly Islamist political party of Turkey was the National Order Party of Necmettin Erbakan, which was founded in 1970 (Özbudun 2006). The National Order Party evolved through Turkey’s secular system into the Welfare Party in 1983 after being shut down repeatedly by the constitutional court and military coups. In 1994 Erdoğan was elected Istanbul’s mayor as the Welfare Party candidate. In 1998 the secular constitutional court shut down once again the Welfare Party for violating the laicite principle of the constitution. Turkey’s political Islam then split into two: AKP, led by Erdoğan, which represented an innovationist line, and the Felicity Party (Saadet Partisi), which represented the traditionalists of the Islamist movement (Özbudun 2006). Although the Felicity Party is now small (it obtained only 1.6 percent of all votes in the 2018 national elections), AKP has been in the government since 2002.
Despite its Islamist roots, AKP started, at least for many outsiders, as a moderate party. During its first decade as the governing party, AKP was seen by many as a democratizing force focused on prosperity. During this time AKP reinforced a capillary system that provided local welfare and assistance to the marginalized and the poor (Aksoy and Billari 2018). After a setback during the 2009 recession and then changing the constitution in the 2010 referendum, however, AKP changed course. It started curtailing Turkey’s secular tradition, investing heavily in religious institutions, and deploying its welfare system in clientelistic fashion (Aksoy and Gambetta 2021; Kuran 2018). In 2012, Erdoğan declared “raising pious generations” as a policy goal.
AKP’s investment in religious institutions after 2010 can be captured by a few key statistics. Figure 1 shows the annual budget (in billions of Turkish liras) of and the number of personnel working for TPRA. The budget figures were obtained from the Turkish Ministry of Treasure and Finance. The annual number of personnel was extracted from TPRA’s annual performance reports that are publicly available. The figure shows that the annual budget of TPRA increased around sixfold from 2006 to 2020. The number of religious personnel working at TPRA also increased strongly from 2010 (~84,000) to a peak in 2014 (~140,000). Interestingly, after peaking in 2014, the number of religious personnel decreased somewhat, but then shot up again in 2019, matching the increase in the budget. 1

Annual budget and the number of personnel of the Turkish Presidency of Religious Affairs.
This investment in religion and TPRA has also changed TPRA’s role in Turkish politics. TPRA was formed in 1924 as a “nonpolitical” state institution to mainly control religion and contain the authority of local religious figures in the newly formed secular republic (Gözaydin 2008). In the early 1980s, TPRA also became more active abroad in countries with large Turkish immigrant populations. After 2010, with the injection of public money and the government’s strong support, TPRA has been transformed into a state apparatus helping implement the political ideology of AKP (Öztürk 2016). Öztürk (2016) gave examples of this political instrumentalization of TPRA by displaying TPRA’s support for Erdoğan’s antiabortion policy, pronatalism, and deunionization of the labor force. TPRA’s foreign weight has also increased after 2010. After interviewing experts from Turkish migrant and Islamic organizations in the Netherlands and Bulgaria and reviewing TPRA’s involvement in these communities, Öztürk and Sözeri (2018) portrayed TPRA as a Turkish foreign policy tool with a long arm.
Overall, AKP’s increasing investment in religious institutions, particularly in TPRA poses interesting questions. Several scholars of religion have identified a widespread secularization trend (Bruce 2011; Norris and Inglehart 2011; Stolz 2020; Voas 2009). Voas (2009) argued that as countries gradually modernize, they undergo a “secular transition” very similar to a demographic transition. The religious cohorts are gradually replaced by moderately religious (“fuzzy”) cohorts, which in turn, are replaced by the nonreligious. This model proposes the secular transition as a global pattern, but it seems to work particularly well in mostly Western European countries. The increasing government investment in religion in Turkey seems to defy this secularization trend. Yet it is not clear if this top-down government intervention has affected much the religiosity of the citizens. Although testing secularization theory in Turkey is beyond the scope of the present study, there is evidence that individual religiosity has not increased under AKP rule. In fact, individual religiosity, measured for example by the frequency of praying, mosque attendance, and veiling, seems to have declined in this period (Çokgezen 2022; Ertit 2018; KONDA 2019).
To summarize, Although investment in TPRA has increased strongly since 2010, in keeping with AKP’s aim of “raising pious generations,” this investment does not appear to have paid off, for religiosity at the individual level seems to have decreased. Does this mean that TPRA is unsuccessful in affecting public opinion and values? We cannot answer this question from just observing the trends in religiosity over time. This is because we do not know the counterfactual, namely, how much religiosity would have declined had the government not invested in TPRA as much. To address the question as to the effectiveness of TPRA in influencing public attitudes, I turn to the question of whether Friday sermons have an effect beyond the mosque, in the digital world.
Data
Khutbas
I scrape all khutbas that are publicly available from the TPRA Web site. 2 I restrict the time frame to January 2015 to February 2021. This is because earlier khutbas are not included in the online TPRA archive. While the earlier khutbas are available in the physical archives of TPRA in Ankara, access requires an in person visit upon permission and the earlier khutbas are not yet digitized, though there is work in progress on digitization (Kahveci 2021). Moreover, the outcome variable is based on Twitter content, and Twitter penetration in Turkey plateaued in 2015 (Isman and Dagdeviren 2018). So earlier khutbas would not have a corresponding Twitter corpus or have a very selected one. In certain weeks when the Friday prayer coincides with Eid, a religious holiday, TPRA publishes two khutbas. For those weeks, the two khutbas are merged. This results in a corpus of 317 khutbas. Each khutba is about one to two pages of text, often stored in PDF format on the TPRA’s Web site.
The analysis below requires a document-term matrix. The cells of the matrix describe whether a word found in the corpus appears in a khutba. As it is common practice in quantitative text analysis, those words are preprocessed (Silge and Robinson 2017). I first remove words that have ignorable information content. These include common stop words in Turkish (e.g., synonyms for and, but, be). I also remove words that appear in almost all sermons (e.g., date, Ankara, religious affairs) or in almost no sermon. I do not stem words, for in Turkish, suffixes may completely change the meaning, and their removal may disturb the meaning. This process results in a set of 1,139 unique words distributed across the 317 sermons. The document-term matrix is thus a 317 × 1,139 matrix.
Twitter Data
I first analyze the khutbas using topic modeling, details of which are presented in the next section. Here, I discuss minimal details that are relevant for Twitter data collection. After analyzing the khutbas, I select six sermon topics and focus on them. These topics are business, family, nationalism, health, trust, and patience. Each sermon topic is associated with several keywords that appear in the sermon. For example, Turkish synonyms for nation, martyr, homeland, and fitna associate strongly with the topic nationalism. I select four such keywords for each topic (see Table 1). These selected keywords have the strongest associations with their respective topic.
Selected Sermon Topics and Top Terms (Keywords) Associated with the Topics.
Note: Original Turkish words are in parentheses.
I then conduct a search on Twitter’s Academic Research Application Programming Interface (API) with the 24 keywords (four keywords for each of the six topics). This search is restricted to tweets posted from January 2015 to February 2021 (the same period as the sermons), in Turkish and from Turkey. The search returns (after nearly a week of run time) 4,766,242 tweets, which comprise the entire universe of tweets from Turkey between 2015 and February 2021 that include at least 1 of the 24 keywords. These tweets constitute the outcome variables in the analyses. Note that access to Twitter’s Academic Research API was free of charge until April 2023. Free access for academics has now been rescinded by Twitter.
There are a few points worth mentioning regarding the Twitter data. Progovernment “bots” and “trolls” have been active on Turkish Twitter (Bulut and Yörük 2017). To contain the effects of these trolls and bots on the Twitter data, I exclude retweets on my search on Twitter’s Academic Research API. In addition, in 2020 Twitter identified 7,340 accounts from Turkey that are linked to state-backed information operations. 3 Twitter has removed from its database these accounts and all tweets and Twitter activity that are linked with these accounts. So, the Twitter data collected here are free from the direct activity of these state-linked accounts. Finally, in my statistical analysis I address confounding which include possible bot and troll activity, for example, by comparing Friday afternoon tweets with those on Friday morning in a model which also includes week “fixed effects.”
Methods and Results
Topic Modeling of Khutbas
Topic modeling, in particular latent Dirichlet allocation (LDA), is an unsupervised machine learning method (Blei, Ng, and Jordan 2003; Roberts et al. 2014). It has already been used to address sociological questions (Bail, Brown, and Mann 2017; DiMaggio et al. 2013; Kennedy et al. 2020; Light and Odden 2017; McFarland et al. 2013). In LDA, each document i (i = 1, 2, . . ., N) is composed of a weighted sum of K topics with weights β i = (βi1, βi2, . . ., β iK ). Each word j in the corpus has a probability µ jk , which describes the probability of using word j in discussing topic k. Then, each of the mth (m = 1, 2, . . ., Mi) word in document i is assumed to have a multinomial distribution, parameters of which are determined by µ and β. This process takes as input a document-term matrix with binary cells indicating whether word j features in document i. The researcher sets K, the number of topics. The parameters to estimate are µ (word-topic associations) and β (document-topic weights), which are assumed to come from a Dirichlet distribution with default priors. LDA returns how much a specific word is associated with a particular topic through µ and the extent to which a particular topic appears in a given document through β. For further technical details, see Grimmer, Roberts, and Stewart (2022).
After the analysis, the researcher interprets each topic on the basis of the words that are most strongly associated with the topic. If for example, the largest µ for a topic is for words such as family, child, mother, father, then this topic can be labeled as “family.” With the topics semantically identified, one can turn to the documents, to identify which topics a document discusses and to what extent.
Validating the emerging topics is important in LDA. There are different ways of validating topics, such as manually inspecting documents that are found to be mainly composed of a topic (semantic validity). Another validation method is to use the topic salience in a document to predict out-of-sample outcomes or using out-of-sample outcomes to predict topic salience (predictive validity) (Grimmer and Stewart 2013). Below I present both types of validation.
I consider LDAs from K = 2 to 100 latent topics and settle on the solution with K = 50 topics. In determining K, I inspect the fit statistics summarized by Nikita (2016). Introducing more than 50 topics does not seem to improve model fit or decrease it (see the Appendix). The exact value of K, however, is not of primary importance in this study. This is because I restrict the analysis to six topics, namely, business, family, nationalism, health, trust, and patience, which appear consistently, independent of K, provided K is large enough.
The reasons for selecting these six topics are as follows. The first is a practical one. As explained above, the Twitter data collection involves a search with the sermon-topic keywords. In principle, one could do a full Twitter search with all keywords of all 50 topics. However, even with the 6 selected topics and four keywords each, this search returns nearly 5 million tweets after a week of runtime. A full search with all 50 topics even with four keywords each would be very impractical. The second reason is a substantive one. Many topics that feature in the sermons are unsurprisingly religious and on specific theological issues, such as Ramadan fasting, life of the Prophet Muhammad, salah prayer (namaz), and others. I am interested in the extent to which TPRA affects social media behavior in topics of sociological interest, rather than specific religious issues. For example, the topics patience and health and the change in their salience in the sermons over time will reveal whether and how TPRA responds to the coronavirus disease 2019 (COVID-19) pandemic. Likewise, nationalism, business, and family are key themes in the political agenda of AKP (Aksoy and Billari 2018). Trust is a topic that is not normally expected to appear in a religious sermon but is of great interest to sociologists.
Table 1 shows the six selected sermon topics and top four terms associated with these topics that emerge from the LDA. As explained above, each topic is a weighted combination of these and other words. Each sermon is, in turn, a mix of the latent topics. One of the most common topics is nationalism. Figure 2 shows the topic probability of nationalism in Friday sermons over time. The figure also includes several key dates of national importance. A date when nationalism consistently spikes in sermons is March 18. This is the date Turkey accepts as the anniversary of the Ottoman victory in the Battle of the Dardanelles in 1915 during the Gallipoli campaign of the Entente powers in World War I. These spikes in nationalism on key dates first validate the LDA procedure: we find nationalism when we expect to see it. Second, the patterns in Figure 2 lead to substantive findings.

Nationalism (topic probability) in Friday khutbas and days of national importance.
During the first several decades of the Turkish republic, which was founded in 1923, the Gallipoli campaign was not regarded as a significant part of national identity (Uyar 2016). In fact, for the founding elite, the war of independence that took place after World War I that led to the foundation of Turkey in 1923 was much more significant. The AKP government, however, mobilized a publicity campaign and a memorialization project around the Dardanelles victory (Uyar 2016). The Battle of the Dardanelles is important for AKP because it signals an emphasis on the prerepublican Ottoman era, and as such Turkey’s influence beyond the current borders, as well as the religious character of the prerepublic war. I quote below parts of a sermon from March 2019, which demonstrates the significance of the Dardanelles for TPRA. The sermon celebrates martyrdom for the “sake of religion, homeland, nation, state, and freedom,” places the event on a centuries long religious struggle, and uses it to boost nationalism today and for future generations.
THE TURKISH VICTORY OF THE BATTLE OF GALLIPOLI AND THE ESPRIT DE CORPS. . . . Honorable Believers! The martyrdom, the name for giving souls for the sake of holy values ordered by Allah (s.w.t.) to be protected, is one of the most supreme positions since a martyr takes the risk of abandoning all such beloved ones as his mother, father, wife, and children for the sake of religion, homeland, nation, state, and freedom. . . . For centuries, our ancestors have protected the lands we live on through their faith in Allah (s.w.t.), their love for homeland, their courage, and sacrifice. . . . Dear Believers! Today, what falls upon us is to comprehend the magnificent spirit having reared in Çanakkale [Dardanelles], to gather around our values that make us “us,” and the nation that we are, and to transfer them to our next generations. (TPRA, Friday khutba, March 15, 2019)
It is also remarkable that we do not observe nationalism in TPRA’s sermons on the Turkish national day (October 29), which marks the foundation of Turkish Republic. October 29 is arguably the most important date for the secular founding elite. Instead, Victory Day (August 30), which commemorates the decisive victory of the Turkish forces in the Greco-Turkish war in 1922 seems to be more important for TPRA.
Figure 2 shows that nationalism in sermons also spikes as a response to serious threats the government faces (Alper et al. 2020). The multiple spikes after the coup attempt on July 15, 2016, are notable. The coup attempt resulted from a power struggle between AKP and other Islamist factions, most notably Gulenists, after they dismantled the old secular establishment (Esen and Gumuscu 2017). The attempt which was mainly concentrated in Ankara and Istanbul failed promptly. AKP heavily used TPRA’s organizational reach in mobilizing anti-coup demonstrations (Esen and Gumuscu 2017). On the night of the coup, TPRA ordered nearly 90,000 mosques in the country to cite the salah prayer as a call to defend the government on religious grounds. The mosques’ role in anti-coup protests was crucial in overturning the attempt (Ünver and Alassaad 2016). In fact, in the history of Turkey mosques have never played as much of a visible role as on the night of the coup attempt (Esen and Gumuscu 2017). I paste below selected parts of the sermon that came right after the coup attempt. The structure is similar as the one above. The sermon places the event in a centuries-old struggle and aims to bolster unity and nationalism: Dear Brothers and Sisters! On the night of July 15, we went through one of the longest and darkest nights in our nation’s history. Lord Almighty granted our nation to stand together with all its segments and we protected what has been entrusted to us. . . . These treacherous attacks also showed this: Those who attempt to repress and defame our glorious nation are doomed to be humiliated and abominated! . . . Esteemed Brothers and Sisters! Infinite thanks to Allah that this country has been a home for Muslims for centuries. This nation is the children of martyrs. . . . O Allah. Save us from all enemies, from within and outside, who may undermine the survival of our state and our nation! (TPRA, Friday khutba, July 22, 2016)
TPRA addresses significant threats to the state and government in other areas too. Figure 3 shows the topics health and patience in the sermons over time. The COVID-19 pandemic started at the end of 2019 but the surge in health and patience in sermons corresponds with the first governmental restrictions (the first lockdown) on March 15, 2020. I translate below parts of the sermons that came right before and after the first lockdown. The sermons include practical tips and public health messages. They also offer solace in religion and God: PRECAUTION IS ON MUSLIMS, JUDGEMENT IS FROM ALLAH. Honorable Muslims! During the history, many diseases have been cured with Allah’s help and humans’ effort. God willing, a cure will also be found for the Coronavirus which has been spread all over the world. . . . To protect ourselves, we should keep ourselves, our clothes, food, and environment clean. . . . God entrusts our health to us. Muslims’ duty is to honour this trust. In doing so, with God’s help we obtain peace. We find cure for our troubles and diseases. (TPRA, Friday khutba, March 13, 2020) BELIEVER DURING HARDSHIP. Honorable Muslims! Humanity is going through a difficult time. . . . May Allah (s.w.t.) have mercy on those who lost their lives, may their families find peace, may patients find cure. . . . One of our most important duties during this outbreak is complying with the directives of authorities. . . . Of course, everything happens within God’s power, wisdom, and knowledge. But humans’ weaknesses and ambition have played an important role in this trouble. . . . Crossing the borders drawn by God is leading humanity to disaster. . . . Another duty of us is to keep our discernment and resilience. . . . Most important means that will give us strength and assurance are taking refuge in God and putting ourselves in God’s hands. (TPRA, Friday khutba, March 27, 2020)
For completeness, Figure 4 shows the topics business, family, and trust in sermons over time. Because of space restrictions, I do not discuss the sermons on these topics in detail. One exception is the topic business, which seems to have become more salient after 2017. Interestingly, Turkey’s gross domestic product growth started to decline during this time. Gross domestic product growth was 7.5 percent in 2017 and dropped to 0.9 percent by 2019. This period also corresponds with a surge in interest rates, which were stable at about 8 percent in 2017, shooting up to 24 percent by the summer of 2019. The sermon in August 2019 addresses this issue: SOCIAL HARMS OF INTEREST. Dear Muslims! Islam declares all kinds of interest as haram definitely. It considers the operations with interest as one of the greatest sins. . . . Interest decreases the baraqah of not only the property but also the life. Interest cause many bankruptcies suicides, dissolution of families, and wasted lives. . . . Then, let us stay away from the disaster of interest which has been one the biggest means of exploitation and oppression in economic life throughout the history. . . . In this temporary world life, let us try to earn halal money. (TPRA, Friday khutba, August 23, 2019)
The foregoing analysis shows that the sermons written by TPRA respond to economic, security, and public health threats the country faces. The sermons aim to alleviate negative effects of shocks, offer solace in religion during hardships, and bolster nationalism, unity, and obedience. In the next section, I will discuss whether these sermons affect social media behavior.

The salience of topics health and patience (topic probabilities) in Friday khutbas over time; the dashed lines indicate the first date of the pandemic lockdowns.

Family, trust, and business (topic probability) in Friday khutbas. Linear trends before and after 2018 are added.
Tweets
Figure 5 shows the weekly number of tweets in each of the six topics over time. Throughout all analyses, a week is constructed to run from Friday to next Thursday, in keeping with the fact that the sermons take place on Fridays. Nationalism, again, appears as one of the most prevalent Twitter topics among the ones sampled here. The increase in tweets on health and patience following the first COVID-19 lockdown in March 2020 is notable. Figure 6 shows the associations between the prevalence of a topic in a sermon, and the number of tweets on that topic in the week following the sermon. Generally, a positive association is observed between tweets on a topic and the sermon topic probability.

Weekly number of tweets per topic over time.

Tweets versus Friday sermon topics.
Note, however, that there might be confounders in those plain binary associations in Figure 6 that affect both the sermon content and tweets. For example, if a week contains, say, the anniversary of the Battle of the Dardanelles (March 18), that week’s sermon may have a more nationalistic tone, while people, independently of the sermon, may tweet more nationalistically in that week too.
To address these potential confounders, which would render the associations in Figure 6 spurious, I fit the following quasi-Poisson regression model that predicts Ntd, which is the number of tweets on topic t = 1, . . ., 6 in week d = 2015/01/02, . . ., 2021/02/05:
In equation 1, θ0t is the topic specific intercept, θ1t is the topic specific coefficient for sermon topic probability beta, θ2 is the coefficient for the number of tweets on topic t in the previous week (capturing path dependency in Twitter trends), and α d is the week “fixed effects.” α d absorbs week-specific events (e.g., Battle of the Dardanelles, Victory Day, general mood of the society, temperature, or Mother’s Day corresponding to a week). Although those week fixed effects control for all observed or unobserved confounders that are constant in a week but may vary week to week, they may not account fully for events that happen exactly on Fridays. Hence, I fit a second version of the model in equation 1 whereby I restrict Ntd to tweets that are tweeted only on Fridays afternoon, controlling for tweets posted on Fridays morning (Ntd−1). Note also that the sermons are typically written several days before the corresponding Friday, hence their content cannot be affected directly by unexpected events that happen exactly on the upcoming Friday.
Figure 7 displays θ1t, the estimated topic specific coefficients for sermon topic probability in the two versions of the model: (1) predicting tweets in the week after the sermon while controlling for tweets before the sermon and (2) predicting tweets on Friday afternoon while controlling for tweets on Friday morning. Figure 7 indeed shows a generally positive effect of sermon topic on tweets. The effects are particularly strong and statistically significant for the topics nationalism, health, and patience. The effects for family and trust, too, are sizable, though they become statistically insignificant when the analysis is restricted to tweets posted only on Fridays.

Coefficients of quasi-Poisson regressions predicting tweet counts by sermon topic.
The estimated effects are generally large. For example, a 0.3-point increase in topic probability of health in a Friday sermon is predicted to double the number of tweets on health (exp[2.3 × 0.3] = 1.99, taking the conservative Friday afternoon versus morning point estimate). There are on average about 3,000 weekly tweets on health, so this would result in 3,000 additional tweets on health. If we take the less conservative point estimate (the week after the sermon versus before), the excess number of health tweets due to the sermon increases to 4,500 (exp[3.9 × 0.3] = 2.5 → 3,000 × 2.5 − 3,000 = 4,500). Figure A1 also shows that the effect of sermons on tweets is not universal. For example, the effect of the sermon topic on tweets for business is small and statistically insignificant.
These results in Figure 7 are robust to (1) not including week fixed effects, (2) not controlling for tweets before the sermon, (3) using the proportion of tweets on a topic rather than the number of tweets in a linear regression specification, and (4) using a standard Poisson regression model rather than a quasi-Poisson regression. Details of these robustness checks and all analyses can be found in the replication package linked with the article.
Before I move on to discussion and conclusions, I include below three anonymized (and translated) tweets. These tweets are on nationalism, health, and patience; the three topics for which the sermons are found to have the strongest effect. The examples below are tweeted right after a Friday sermon that features the same topic as the tweet exemplifies. Note that these are not necessarily representative of the tweets on the same topic (recall that the total number of tweets this study is based on is more than 4 million). Nevertheless, they give an idea as to what type of tweets the sermons may be influencing. For example, the similarity between the tweet on nationalism and the sections of the sermon from the same date quoted above is remarkable.
Nationalism: “Hail to all hearts who, on this holy Friday, said AMEN for the survival of this nation and our state. May you have a holy Friday.” (Tweeted on July 22, 2016 at 2:10 p.m.)
Health: “The greatest blessing is health, the most beautiful prayer is the one we say for our Muslim brothers.” (Tweeted on March 13, 2020 at 2:35 p.m.)
Patience: “Believers! Seek help in patience and in Prayer, Allah is with those that are patient (Baqarah 153). May Allah’s mercy and blessings be upon us. May our Friday be blessed. #HappyFriday” (Tweeted on July 3, 2020 at 12:35 p.m.)
Discussion and Conclusions
In this study, I first analyze through machine learning the content of all Friday khutbas (sermons) written by the TPRA and read to millions of citizens in thousands of mosques between January 2015 to February 2021. I focus on six topics of sociological interest: nationalism, health, patience, trust, business, and family. I find that the khutbas respond strongly to events of national importance and to the threats the government and the country face. Nationalism in sermons, for example, spikes regularly during the anniversaries of the Dardanelles victory, which is a significant date for the ideology of the governing party. Khutbas, however, feature little nationalism during the anniversaries of the Turkish national day (October 29), which was a much more important date for the secular founders of the country. Nationalism in sermons also spikes as a response to significant security threats, such as the coup attempt or during and after Turkey’s offensive in Syria. Similarly, health and patience feature strongly in sermons shortly before and during the COVID-19 lockdown.
I then link the khutbas with more than 4 million tweets posted on the six selected topics between January 2015 and February 2021 to analyze whether the sermons affect behavior on Twitter. To account for confounding factors (e.g., socio-political events, average temperature or seasons, or the general mood of the country) that potentially affect both khutbas and the Twitter content I consider several modeling strategies which include fitting models that absorb observed and unobserved week-specific events through week fixed effects and focusing only on Friday afternoon tweets while controlling for Friday morning tweets (i.e., comparing tweets posted in the same day before and after the sermon is delivered). I find strong and significant effects of the content of the khutbas on tweets, particularly for the topics nationalism, health, and patience. I also find that the effects of khutbas on tweets is not universal, for example, the effect for the topic business is small and statistically insignificant. Overall, these results show that TPRA is influential in shaping the public’s social media content and that this influence is mainly prevalent on salient issues.
In this study I aim to make two contributions. The first one is on the debate on how religion and politics interact in Turkey. Since 2010, the Turkish government invests strongly in religious institutions, in line with an aim of raising a “pious generation.” In this process, as some argue, TPRA has turned into a state apparatus imposing the political ideology of the ruling elite. My results corroborate those arguments, in that the sermon content is very much linked with the agenda of the ruling party. It has been unclear, however, if TPRA has been influential in shaping public values and attitudes. Despite TPRA’s very generous resources, individual religiosity has been in decline. Does this mean that the Turkish government’s heavy investment in religion has not paid off? I here show that TPRA has been influential, particularly on pressing and salient issues. Moreover, I document this influence in a domain which is arguably rather distant from the Mosque, namely in the digital world. One may expect this influence to be even stronger in the offline world where TPRA has a strong presence, such as mosques, Quran courses, and many other events and projects TPRA organizes. Hence, overall, it seems that money spent on TPRA is well spent from the government’s perspective, and one may speculate that if it were not for TPRA’s generous funding, the decline in religiosity would have been even more significant.
Second, this study makes a methodological contribution. The rise of “computational social science” offers opportunities to address long-standing sociological questions in novel ways. However, applications tend to be restricted to traditionally quantitative topics and Western contexts, and are mostly descriptive of trends. Here I apply these tools to analyze hundreds of sermons and millions of tweets, pushing the boundary of computational social science to the study of religion and politics in a non-Western context. Moreover, because of the longitudinal nature of the data, the present study can account for many confounders of the sermon and the social media contents, helping get closer to a causal interpretation of the offline to online spillovers.
Footnotes
Appendix
Acknowledgements
This study benefited from feedback from the 7th International Conference on Computational Social Science and the 2021 annual conference of the European Consortium for Sociological Research. I thank Türkay Salim Nefes, Burak Sönmez, and Tak Wing Chan for their comments on an earlier draft. This article is written using the R Markdown template provided by Bauer (2020). David Schoch is acknowledged for sharing their code for Academic Twitter. Part of the data comprise the full archive of tweets on selected topics, to which Twitter generously gave access until April 2023.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This project is funded by the British Academy through Small Research Grant SRG20\200045.
Ethical Approval
Approval for this research was obtained from the University College London Institute of Education ethics panel (application number REC1432).
