% !TEX TS-program = lualatex
% !TEX encoding = UTF-8 Unicode
% !TeX spellcheck = en_GB

\documentclass[article,11pt, authoryear]{elsarticle}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{lineno}
\usepackage{comment}
\usepackage{moresize}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{textgreek}
\usepackage{url}
\usepackage{arydshln}
\usepackage{pdflscape}
\usepackage[markup]{changes}
\usepackage{fullpage}
\usepackage{rotating}
\usepackage{float}
\usepackage{stackengine}
\def\cross{%
	\stackon[1ex]{\rule{0.4pt}{1.5ex}}{\rule{.75ex}{0.4pt}}}
\def\invcross{%
	\stackon[0.5ex]{\rule{0.4pt}{1.5ex}}{\rule{.75ex}{0.4pt}}}
\def\stacktype{L}

\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize % activate!
\usepackage{arydshln}

\usetikzlibrary{external, shapes,decorations,arrows,calc,arrows.meta,fit,positioning}
\tikzexternalize % activate export of tikz figures; requires running with lualatex.exe -shell-escape
\tikzset{
	-Latex,auto,node distance =1 cm and 1 cm,semithick,
	state/.style ={ellipse, draw, minimum width = 0.7 cm},
	point/.style = {circle, draw, inner sep=0.04cm,fill,node contents={}},
	bidirected/.style={Latex-Latex,dashed},
	el/.style = {inner sep=2pt, align=left, sloped}
}

\makeatletter
\def\ps@pprintTitle{%
	\let\@oddhead\@empty
	\let\@evenhead\@empty
	\def\@oddfoot{}%
	\let\@evenfoot\@oddfoot}
\makeatother

\begin{document}
	
	\begin{frontmatter}
		
		\title{Material insecurity and religiosity: A causal analysis\tnoteref{t1}}
		\tnotetext[t1]{Original Article}
		
		\author[label1]{Benjamin Grant Purzycki\corref{cor1}}
		%\author[label2]{Adam Baimel}
		\ead{bgpurzycki@cas.au.dk}
		\cortext[cor1]{Corresponding author}
		\author[label1]{Theiss Bendixen}		
		\address[label1]{Aarhus University, DK}
		%\address[label2]{Oxford-Brookes University, UK}

		
\begin{abstract}
Some cultural evolutionary models predict that under stressful reductions of well-being, individuals will be more attracted and fastidiously adhere to traditional systems of norms that promote solidarity and cooperation. As religious systems can bolster human relationships with a variety of mechanisms, the material insecurity hypothesis of religion posits that individual religiosity will increase under conditions of material insecurity. The bulk of the literature up to this point has been correlational and cross-national. Here, across 14 field sites, we examine the causal role that educational attainment and food insecurity play on religiosity. We find that years of formal education and food insecurity do not consistently contribute to individual religiosity cross-culturally. We conclude with a discussion of some theoretical and methodological implications. As a general workflow for cross-cultural causal research in the quantitative social sciences, the present work is a modest but necessary first step in reliably estimating causation in the material insecurity hypothesis of religiosity.
\end{abstract}

\begin{keyword}
religiosity \sep education \sep material security \sep causal inference
\end{keyword}

\end{frontmatter}

%\linenumbers

\section*{Social Media summary}

\noindent This report finds that education or food security play no cross-culturally robust causal role on individual religiosity.

\section{Introduction}
\noindent Some models of cultural evolutionary processes posit that under stressful conditions, individuals will be attracted to and punish violations of cooperative norms \citep{roos2015societal}. As a cultural system that bolsters cooperation \citep[][cf. Major-Smith, 2023]{lang2019moralizing, sosis2003cooperation, sosis_religious_2003}, we should expect to see that stress and insecurity increases religiosity, defined here as the mental and behavioural commitment to traditions and beliefs associated with spiritual agents. The bulk of the literature assessing this hypothesis typically exploits nation-level data from fully market-integrated societies and has yet to embrace formal causal inference methods. This report introduces causal inference to the material insecurity hypothesis literature and does so by applying it to individual-level data collected across 14 field sites from around the world.

\section{Theory}
\subsection{Cultural evolution of commitment}
\noindent Formal evolutionary game theoretical models show that increased threats to individual well-being contribute to the evolution of cooperative norm strength and policing; sudden reductions in within-group, individual payoffs induce stronger norm adherence and favor more costly punishment of norm violators \citep{roos2015societal}. Empirical evidence is consistent with these models; cross-culturally, such ``cultural tightness'' corresponds to various threats to well-being \citep{gelfand2011differences, jackson2020global}. In general, then, it follows that under threatening conditions, individuals will flock toward and adhere more strongly to cultural systems that are especially adept at alleviating such stress. 

As a social system that can a) soothe anxiety \citep{lang2015effects, pargament1998patterns, sosis2007psalms, sosis2011psalms}; b) bolster within-group cooperation and solidarity \citep{lang2019moralizing, sosis2003cooperation, sosis_religious_2003}, c) flexibly attend to novel perturbations in and threats to cooperation \citep[][cf. \citealt{mcnamara_supernatural_2016}]{purzycki2020breaches, purzycki2022gods}, and d) include beliefs for the punishment of moral and other social norms \citep{johnson2005god, johnson2016god, norenzayan2013big, purzycki_moralization_bias, stark_gods_2001}, religion should be especially attractive for individuals enduring insecurity and stress. In other words, under duress, individuals are likely to intensify their commitment to the kinds of traditional norms and behaviours that have served prior generations and facilitated the kinds of social support that bolsters one's survival and reproduction, and religion has been shown to be especially supportive of these traits \citep{henrich2019war, inglehart2020religion, purzycki_sosis_book, sibley2012faith}. As stressed by \cite{inglehart2020religion}, the kinds of existential security that religion might uphold are both physical and intellectual (i.e., religious worldviews provide answers to life's bigger questions). We focus here on the former, hence, the ``material insecurity hypothesis''.

\subsection{Material insecurity hypothesis}\label{matsechyp}
\noindent While not without complications, a wide-ranging sociological literature is consistent with the material insecurity hypothesis \citep[cf.][]{stark1999secularization}. Yet, a host of socio-demographic factors associated with material insecurity also appear to increase religiosity at the individual and group levels \citep[see][]{storm2017does}. For example, food insecurity, poverty, and wealth inequality have been found to co-vary with religiosity \citep{baimel2022material, hekmatpour2020inequality, hollinger2019religiousness, inglehart2020religion, norris_sacred_2011, purzycki2018material, ruiter2009religious, solt2011economic}, but as we are presently interested in assessing whether or not food security causes a change in religiosity, we must declare a particular causal direction. Furthermore, in addition to the predicted rise in religiosity due to insecurity associated with age and proximity to death \citep{jong2018death}, some cross-cultural evidence suggests that important indices of religious commitment can change across the lifespan in important ways \citep{bengtson2015does, purzycki_bendixen_tuva, shaver2014does}. 

Additionally, sex is variously associated with religiosity \citep{schnabel2018men, vardy2022religiosity, walter1998religiosity} as are fertility and family size \citep{blume2009reproductive, glavatskaya2018urban, inglehart2020religion, shaver2020church}. On evolutionary theoretical grounds, family size in particular has a complicated relationship with material insecurity \citep{lawson2012life, purzycki2018material, strassmann2002life}, but evidence points to a relationship nonetheless. Similarly, education level is directly implicated in the number of children one has \citep{becker2010trade, goodman2012low} and shows a widely touted--but no less complicated--relationship to security and well-being \citep[see][]{boarini2010private, desjardins2008researching, giambona2022does}.

In addition to its role in material security, educational attainment is also of particular interest in the study of religion. Exposure to formal, secular education has long been asserted to weaken religious faith due to the cultivation of critical thinking skills \citep[][]{dawkins2016god, weber1993sociology}. In other words, educational attainment might both directly and indirectly decrease religiosity. However, while some cross-national assessments do indeed show negative associations between years of formal education and religiosity (e.g., \citealp[][pp. 271-274]{inglehart2020religion, norris_sacred_2011}), others reveal that both the magnitude and even direction of the estimated association exhibits substantial cross-cultural variability \citep[e.g.,][]{albrecht1984secularization, pew_research_center_religion_2016, ruiter2009religious, schwadel2011effects, schwadel_explaining_2015}. 

As insightful as this literature is, there are some important avenues worth pursuing. Theoretically, despite the explicit causal language across the theories that motivate this work, there is a distinct lack of causal modelling in the literature. This makes it difficult to synthesize various works into a single causal framework. Indeed, the empirical efforts are primarily correlational and do not formally model the manifold causal pathways by which education and food security could affect individual religious commitments. So, while theory is causal, the models are often informal and analyses typically focus on significant correlations rather than counterfactual states.

In terms of data, the bulk of this work often focuses on group-level relationships. Yet, group-level correlations can mask or muddle individual-level effects \citep[][see the current reports' supplementary section 2 for further discussion and demonstration of this point]{robinson2009ecological, simpson1951interpretation, storm2017does}. As such, individual-level, high-resolution data is important for adequately assessing individual-level hypotheses. In terms of sampling, most of the data that populates these studies are collected among individuals in fully market-integrated industrialized societies. Given the variation in food security and access to education the world exhibits, we should be able to see the anticipated effects of these indices of material security on religiosity across the range of communities. Here, we offer a modest step toward rectifying these issues by a) synthesizing a host of hypotheses into a single causal model; b) being explicit about and simulating the assumptions of our model, c) applying this model to data sampled from a diverse range of societies, and d) attending to individual-level effects using a general and principled causal inference method. 

\section{Assessing Causation}
\subsection{Causal inference}
\noindent Across academic fields, there is increasing recognition that a) causal explanatory accounts of natural phenomena require explicitly derived models and b) estimating causation is best approached from an interventionist perspective (variously known as the \textit{manipulationist}, \textit{counterfactual}, or \textit{potential outcomes} frameworks; \citealt{hernan2020causal, morgan2015counterfactuals, pearl2016causal, woodward2005making}). In this view, establishing causation requires that we not only examine what our data tell us about worlds that exist, but also from deliberately calculated inferences of causal relationships derived from worlds that \textit{would} exist, given particular conditions.

Quite often, the standard procedure of including a statistical model with all variables under consideration simply assumes that all variables are predictive of the dependent variable and ignores any internal causal structure. Yet, ``controlling'' for everything can actually create more problems than it solves because otherwise ignored causal relationships that are internal to those predictors can introduce further confounding effects (e.g., conditioning on a common descendant of the exposure and outcome--\textit{collider bias}) or suppress actual causal effects (e.g., conditioning on a mediator or a post-treatment variable). Put simply, under some conditions, holding some variables constant (i.e., controlling) can be inconsequential, while under others it can be disastrous to inference \citep{achen2005let, cinelli2020crash, westreich2013table, wysocki2022statistical}. The conditions that matter here are the causal structure of variables germane to testing hypotheses. Making these conditions explicit is the task of the researcher.

To obtain our results, we use a general causal inference method for eliciting and contrasting outcomes under hypothetical exposures in observational settings \citep[e.g.,][]{ahern2009estimating, naimi2017introduction, robins1986new, snowden2011implementation}. This method---variously referred to as \textit{g-formula}, \textit{g-computation}, and \textit{standardization} (see \citealp{bendixen-causalwp}; \citealt{hernan2020causal}, ch. 13; \citealt{vanderweele2016causal})---involves three main steps: First, given a well-defined estimand and explicit causal assumptions, an appropriate statistical model is fitted that adjusts for relevant confounding variables. In the context of the present study, this first step is undertaken in Sections \ref{causalmod} and \ref{stat} below. Second, using the fitted model in the first step, we predict (or impute) outcome values under varying hypothetical levels of a focal predictor while holding all other variables as observed. This step follows directly from the interventionist approach to causal inference outlined above, in that it simulates changes in potential outcomes under manipulated, counter-factual exposures. Third, the imputed or predicted values from the previous step are contrasted and summarized by some appropriate inferential statistic, such as the mean and an interval. This step effectively amounts to averaging over the joint distribution of the observed covariates, yielding an \textit{average} or \textit{marginal} effect of the exposure in the sample. For the present analysis, for each individual and outcome response option, we compute the posterior mean under hypothetical exposure levels. For this effect to have a valid causal interpretation, a set of identifiability assumptions need to be met \citep[][]{hernan2020causal}. We discuss these in supplementary section 7. 

\subsection{Causal model}\label{causalmod}
\noindent Our guiding causal model (Figure \ref{DAG}) incorporates the hypotheses examined in the aforementioned literature (Section \ref{matsechyp}). The variables and causal relationships we consider are drawn from predicted directions of previous studies. The model is also informed and constrained by our knowledge of what variables we could use in the data set. 

\begin{figure}[h!]
	\centering
	\begin{tikzpicture}
		\node (religiosity)  at (0, 0) {\textbf{Religiosity}};
		\node (eduamt)  [left = of religiosity] {\textbf{Edu. (Amount)}};
		\node (edutype) at (-4, 1.5) {Edu. (Type)};
		%\node (prime) at (3, 0) {Prime};
		\node (age) at (3, 1.5) {Age};
		\node (sex) at (3, 3) {Sex};
		\node (food) at (0,3) {\textbf{Food insecurity}};
		%\node (food) [left = of sex] {Food insecurity};
		\node (children) [left = of food] {Children};	
		\path (eduamt) edge (religiosity);
		\path (edutype) edge (religiosity);
		%\path (prime) edge (religiosity);
		\path (age) edge (religiosity);
		\path (sex) edge (religiosity);
		\path (food) edge (religiosity);
		\path (children) edge (religiosity);
		\path (age) edge (eduamt);
		\path (age) edge (food);
		\path (sex) edge (eduamt);
		\path (sex) edge (food);
		\path (eduamt) edge (food);
		\path (children) edge (food);
		\path (eduamt) edge [bend left = 80] (children);
		%\node (dag) [below = of religiosity] {\includegraphics[scale=.80]{DAG.pdf}};
	\end{tikzpicture}
	\caption{\textbf{Directed acyclic graph of the assumed causal structure}. Bold variables are focal variables.}
	\label{DAG}
\end{figure}

The focal causal hypotheses are that religiosity increases as a function of exposure to education and food insecurity. To the extent that years of formal education constitute exposure to a particular form of instruction that has some effect on the degree to which one is religious, and concern about access to food approximates material insecurity, we use these direct effects as our focal theoretical predictions and empirical estimands: Education (Amount) $\rightarrow$ Religiosity, and Food Insecurity $\rightarrow$ Religiosity. We also incorporate some of the other aforementioned individual-level predictors into our model, including: sex, age, and number of children. The model wagers that they comprise a causal network of influence between amount of education and religiosity. Specifically, it posits an internal causal structure to these variables: Sex $\rightarrow$ Food Security $\leftarrow$ Age. If Children $\leftarrow$ Food Security, conditioning on children would not be necessary if Food Security were held constant \citep[for an introduction to causal graph analysis, see][]{pearl2016causal}. However, if Children $\rightarrow$ Food Security, this creates a collider bias with Food Security and Education (Amount). We therefore take this more conservative route and hold number of children constant. We also posit that Education (Amount) $\rightarrow$ Children. While this creates an indirect path through Children, as we are conditioning on number of children already and there are no other posited confounds, we are avoiding this problem. Furthermore, the amount of education should contribute to one's food security which should, in turn, contribute to religiosity. Sex and age confound the focal causal path, and there is an indirect effect of education amount on religiosity that runs through food security. 

It is important to note that the \textit{type} of education might matter here. We recognize that individuals could have had religious education in some contexts whether by default or by choice, and that choice could be facilitated by food security, and so forth. In this model, we posit only that it has an effect on religiosity. This is a very important assumption for a couple of reasons. First, this is unmeasured in the data set. According to this model structure, however, its absence is inconsequential to estimating the target effects; we have no need for conditioning on type of education. If we posit that it was caused by food security, not having measured it would be inconsequential to the target estimate as long as we hold food security constant (i.e., the indirect effect through education type would be blocked). However, if the type of education were posited to cause food security, this would both confound the effect through food security, but also open a confounding path between education amount through food security. With this important note in mind, we continue under the assumption that type of education only affects religiosity. In supplementary section 3, we walk through a simulation of this model that shows that we can recover target estimates with and without this particular variable.

\section{Study}
\subsection{Participants}
\noindent We used data from the publicly available \textit{Evolution of Religion and Morality Project} data set \citep[for motivation, design details, and further details about each field site, see][]{lang2019moralizing, purzycki_moralistic_2016, purzycki2018evolution, purzycki_reflect}. The entire data set consists of 2,228 participants from 15 diverse populations around the world (see Fig. \ref{map}), but due to no data on the outcome, we dropped one site (Hadza). Participants were recruited in a variety of ways, some of whom were recruited on the basis of self-identification with a locally relevant religious tradition. There are no indications that recruitment on this basis contributed to the selecting individuals who are more religiously committed. All participants were 17 years of age or older. All participants engaged in a variety of economic game experiments designed to examine the breadth of religiously motivated cooperation. Participants were informed that their participation would be anonymous, any identifying information would be kept under lock and key, and they had the right to withdraw at any point. Table \ref{table:1} details the key descriptive statistics of each field site. Data, code, and supplementary materials are publicly available.

\begin{figure}[h!]
	\centering
	\includegraphics[scale=.54]{map.pdf}
	\label{map}
	\caption{\textbf{Map of 14 field sites.} Note that there are two field sites in Tanna (Inland and Coastal).} 
\end{figure}

\begin{table}[h!]
	\centering
	\scalebox{.84}{
		\begin{tabular}{cccccccc}
			\hline
			\hline
			\textbf{Culture} & \textbf{N} & \textbf{Males} & \textbf{Age} & \textbf{Yrs. Educ.} & \textbf{Mjr. Trad.} & \textbf{Mnr. Trad.} & \textbf{Economy}\\ 
			\hline
			Cachoeira & 274 & 83 & 34.19 (12.87)  & 8.58 (4.02) & Christianity & Candombl\'e & Market  \\
			Coastal Tanna & 178 & 88 & 35.14 (14.33)  & 7.76 (4.22) & Christianity & Traditional & Horticulture  \\ 
			%Hadza & 201 & 101 & 38.82 (13.72) & 1.72 (2.99) & Traditional & Traditional & Hunting \\ 
			Huatasani & 94 & 37 & 38.51 (15.92) & 8.96 (3.80)& Christianity & Traditional & Farming/Herding \\ 
			Inland Tanna & 112 & 57 & 36.25 (15.40) & 0.68 (2.04)& Traditional & Traditional & Horticulture\\ 
			Kananga & 200 & 79 & 38.09 (14.46) & 9.51 (3.32)& Christian & Traditional & Market \\
			Lovu & 76 & 24 & 44.56 (16.94) & 8.77 (3.78) & Hindu &-- & Market  \\ 
			Maraj\'o & 77 & 37 & 34.12 (13.08) & 8.00 (3.53)& Christianity & Hagiolatry & Market\\ 
			Mauritius & 245 & 144 & 36.93 (15.80) & 8.84 (3.57) & Hinduism & Sorcery & Market/Farming  \\
			Mysore & 165 & 94 & 33.56 (12.34) & 13.35 (5.42) & Hinduism & Hinduism & Market \\
			Samburu & 40 & 12 & 51.27 (12.48)& 0.70 (1.76) & Christianity & Traditional & Herding \\ 
			Sursurunga & 163 & 73 & 37.60 (14.13) & 7.51 (2.63)& Christianity & -- & Horticulture \\
			Turkana & 247 & 91 & 38.03 (16.38) & 0.48 (1.23)& Christianity & Traditional& Herding  \\
			Tyva Republic & 81 & 23 & 33.53 (12.52)& 15.44 (2.29) & Buddhism & Shamanism & Market/Herding \\
			Yasawa & 75 & 34 & 38.04 (15.91) & 9.66 (2.42)& Christianity & Traditional & Fishing/Farming \\
			\hline
			\textbf{Total} &2,027 & 876 &  36.82 (14.87) & 7.68 (5.27) & -- & --& --\\
			\hline
			\hline
		\end{tabular}
	}
	\caption{\textbf{Means (standard deviations) for some individual-level demographic variables and group-level properties of communities sampled.} ``Mjr. Trad.'' refers to the major colonial and/or overarching tradition of each site while ``Mnr. Trad.'' refers to relatively minor--but locally salient--traditions in each site.}
	\label{table:1}
\end{table}

\subsection{Methods}
\noindent In addition to our focal variables of formal education, food security, and religiosity, we also include the ancillary demographic factors (sex, age, and number of children). As some traditions emphasize and signal religious commitment variously through a combination of belief and practice \citep{baimel2022material, cohen2003faith}, we consider two questions that represent religiosity or religious commitment. One focuses on intrinsic or ideational commitment: \textit{How often do you think about} [\textit{deity}]\textit{?} The other focuses on extrinsic or behavioural commitment: \textit{How often do you perform activities or practices to talk to or appease} [\textit{deity}]\textit{?} Response options were on a 5-point frequency scale (1 = very rarely/never, 2 = a few times per year, 3 = a few times per month, 4 = a few times per week, 5 = every day or multiple times per day). We measured current food security with a binary, yes/no question (no = 0; yes = 1): \textit{Do you worry that in the next month your household will have a time when it is not able to buy or produce enough food to eat?} \citep{hruschka2014impartial}.

\subsection{Statistical Model}\label{stat}
\noindent To model the level of commitment across the two variables, we used Bayesian ordered-logistic regressions \citep{burkner_vuorre_ordinal}. In each population, $j$, we asked each individual, $i$, the commitment questions, outcomes of which, $K_i$, are ordered categorical responses. As such, we model them using a multilevel ordered categorical likelihood distribution that is parameterized using a linear model term, $\xi_i$, and a vector of random cut-points, $\kappa$:

\begin{equation}
	K_i\sim\text{Ordered Categorical}(\xi_i, \kappa)
\end{equation}

\noindent The linear model $\xi_i$ is then given by:
\begin{equation}\label{corndogsupreme}
	\xi_i = \alpha_{\text{SITE}[i]} + \beta^{M}_{\text{SITE}[i]}M_i + \beta^{A}_{\text{SITE}[i]}A_i + \beta^{S}_{\text{SITE}[i]} S_i +\beta^{E}_{\text{SITE}[i]} E_i + \beta^C_{\text{SITE}[i]}C_i
\end{equation}

\noindent where: $\text{SITE}[i]$ gives the cultural group of individual $i$, $A_i$ is the age of individual $i$, $S_i$ is a variable indicating if individual $i$ is male, $E_i$ is the years of formal education completed by individual $i$, $C_i$ indicates individuals' number of children, and $M_i$ indicates an individual's food insecurity. To account for the fact that increments in the predictor (e.g., an additional year of education and year of age, or an additional child) might have differential associations with the outcome, we model the effects of years of education, age, and number of children monotonically, such that a covariate's $\beta$ coefficient represents the expected average difference between two adjacent levels of the predictor \citep{burkner_modelling_2020}. Note that we also modelled age and years of education with Gaussian processes in supplementary section 4 but found the monotonic model to yield a better fit. Food insecurity and sex are modelled as indicator variables. Since unobserved site-specific factors are likely to affect our predicted effects in different ways across sites, our statistical model fully varies effects across sites. It's plausible that, for example, one year of education in one place deeply affects one's worldview whereas in others, it might have no effect. By-site clustering partly handles site-specific confounds.

We define our priors, which we checked through prior predictive simulation (see supplementary section 4) as follows. The thresholds $\kappa$ are modelled with $\textrm{Normal}(0,10)$, all $\beta$ coefficients with $\textrm{Normal}(0, 0.5)$, and all monotonic covariates with a Dirichlet distribution with $\alpha$ denoting a series of 2's equalling the number of levels of the predictor. The Dirichlet prior encodes the \textit{a priori} assumption that any of the levels of the predictor could be more or less likely than the others \citep[][p. 392-394]{mcelreath_statistical_2020}. Variance components for the varying effects were set at Exponential(1) and the correlation matrix of the variance components to LKJCorr(4) \citep{lewandowski2009generating}. Taken together, the specified set of priors is weakly regularizing. 

We performed all analyses using the \texttt{brms} package \citep{brms2017, brms2018, brms2021} for \texttt{R} \citep{rcitation}, an interface to the probabilistic programming language \texttt{Stan} \citep{stan:2017}. Chain and sampling diagnostics ($\hat{R} < 1.02$), well-mixing trace and rank plots, few divergent transitions, and relatively large effective sample sizes) were acceptable. Supplementary section 8 includes the full list of \texttt{R} packages used for this project as well as their dependencies and version number.

\begin{figure}[h!]
	\centering
	\includegraphics[scale=.82]{mat-think-1.pdf}
	\caption{\label{mat-think}\textbf{Food insecurity and religious ideation}. Posterior means for each individual and outcome response option under hypothetical exposures to food (in)security.} 
\end{figure}

\begin{figure}[h!]
	\centering
	\includegraphics[scale=.82]{mat-perfho-1.pdf}
	\caption{\label{mat-perfho}\textbf{Food insecurity and religious behaviour}. Posterior means for each individual and outcome response option under hypothetical exposures to food (in)security.} 
\end{figure}

\begin{figure}[h!]
	\centering
	\includegraphics[scale=.82]{edu-think-1.pdf}
	\caption{\label{edu-think}\textbf{Years of formal education and religious ideation}. Posterior means for each individual and outcome response option under hypothetical number of years of formal education.} 
\end{figure}

\begin{figure}[h!]
	\centering
	\includegraphics[scale=.82]{edu-perfho-1.pdf}
	\caption{\label{edu-perfho}\textbf{Years of formal education and religious behaviour}. Posterior means for each individual and outcome response option under hypothetical number of years of formal education.} 
\end{figure}

\subsection{Results}
\subsubsection{Food insecurity}
\noindent Figures \ref{mat-think} and \ref{mat-perfho} show predicted (posterior means) individual comparisons between reporting being worried about food and not being worried about food for each site and outcome response option. Consider that if food insecurity predicts religious commitment, we'd expect that the higher outcome response options (i.e., thinking about and performing activities directed at the focal deity more often; the darker line colours) should become \textit{more} probable (i.e., trend upwards), whereas the lower response options (i.e., thinking about and performing activities directed at the focal deity less often; the lighter line colours) should become \textit{less} probable (i.e., trend downward) as a function of reporting food insecurity. Note that while we're plotting the functional relationship between food security and religious commitment linearly, this is for presentational purposes only; we statistically modelled food security as an indicator variable. While we see semblances of this pattern at a few sites (e.g., Figure \ref{mat-think}: Huatasani, Tyva Republic, Yasawa Fiji; Figure \ref{mat-perfho}: Kananga, Turkana), at other sites we see the opposite pattern (e.g., Figure \ref{mat-think}: Coastal and Inland Tanna, Sursurunga) or, most commonly, no particular change in either direction.

\subsubsection{Education}
\noindent Figures \ref{edu-think} and \ref{edu-perfho} show predicted (posterior means) individual comparisons between a range of educational attainment levels for each site and outcome response option. Specifically, we obtained predictions for years of formal education from 0 to 30 years (the observed range in the sample) in increments of five. Here, if educational attainment negatively predicts religious commitment, we'd expect that the higher outcome response options (i.e., thinking about and performing activities directed at the focal deity more often; the darker line colours) become \textit{less} probable (i.e., trend downwards), whereas the lower response options (i.e., thinking about and performing activities directed at the focal deity less often; the lighter line colours) would become \textit{more} probable (i.e., trend upwards) as a function of additional years of formal education. At most sites, we in fact find the opposite of this predicted pattern, such that additional years of formal education predict more religious commitment, although the associations generally seem small or moderate. At a few other sites, we do find the hypothesized pattern (e.g., Figure \ref{edu-think}: Lovu Fiji; Figure \ref{edu-perfho}: Lovu Fiji, Mysore), while at other sites no particular change is observed. Overall, there is no stable relationship.

\section{Discussion}
\noindent Overall and across sites, then, we find little-to-no reliable evidence that food security or educational attainment causes religious commitment. If anything, based on these data and our causal and statistical models, additional years of formal education tend to \textit{increase} religious commitment at several sites, contrary to common theorizing. We see the present work as taking some modest but necessary first steps in reliably estimating the causal relationship between educational attainment, food insecurity, and religiosity specifically, and the material insecurity hypothesis more generally. We also hope this work can motivate a general workflow for cross-cultural causal research in the quantitative social sciences \citep[cf.][]{bulbulia2022workflow, deffner_rohrer_mcelreath_2021, major2023exploring}. As we turn to now, there are some issues from theory and model to analysis, prediction, and inference to which future work should attend.

In terms of modelling, while our statistical model and analyses directly follow from our causal model, our causal model does not directly follow from a formal theoretical model. What theory we do have is informal and recognized as underdeveloped in a host of ways \citep{storm2017does}. Our approach gathered various hypotheses together, forged a synthetic causal model out of verbal theoretical synthesis, and framed that theorizing with an appeal to a set of formal cultural evolutionary models. 

That said, as is often the case, the present study may be susceptible to biases from confounding variables our model did not consider. While it is unclear to us that recruitment was biased in terms of levels of religiosity, education, and the other factors we considered, our model is a necessary simplification of a complex process. Future efforts can build upon our model and consider further factors that may play an important role in estimating how education corresponds to religiosity. We anticipate that our causal model can function as foundation upon which to build. Our hypotheses are restricted to the posited direction of the effect of food security and education, but we have no precise sense of what the magnitude of the effect should be. More precision in theory would help here. It's also important to emphasize that the value of building and presenting a causal model, rather than attempting to get at one ``true'' representation of the world, is to make one's assumptions transparent and explicit.  

Indeed, making assumptions transparent and explicit is a critical step in causal inference, but it is only just a first step. As we showed using \textit{g-computation}, calculating contrasts is a necessary follow-up to establish how outcomes fare in light of manipulating the focal predictor. Another next step is accounting for how generalizable results are. It's therefore important to stress that our main model and predictions yield inferences \textit{for a particular population}, namely the sampled sites and participants with complete-cases for the included variables, when hypothetically manipulating food security and years of formal education. While our dataset is both culturally and demographically diverse, our sample may not necessarily be characteristic of any given population for which one wishes to draw inference. For the sake of illustration, then, we also show how to go about obtaining predictions for a non-sampled but well-defined population using so-called \textit{poststratification} \citep{deffner_rohrer_mcelreath_2021, kennedy_know_2021} in supplementary section 6. Briefly put, poststratification involves re-weighting model-based predictions using weights obtained from external data that are more representative of a population of interest. Drawing from another data sample, we show how to use the model to predict religiosity in the context of a secular, materially secure, and wealthy country (Denmark).

Other steps remain on the horizon. In particular, we anticipate improving inference using different sets of assumptions. In our case, had we found a notable target effect and the issue of education type (or any other missing confounder) was compelling enough, sensitivity analyses might detect how sizeable this unmeasured confound's effects would have to be to upend the estimated causal effect \citep{ding2016sensitivity, vanderweele2017sensitivity}. Recent efforts \citep{major2023exploring} bring a range of sensitivity analyses to bear on inferring causation in observational data of religious prosociality. Of course, more discussion and attention is necessary to determine what exactly qualifies as ``compelling enough'' and what the criteria are by which we arrive at such conclusions.

Methodologically, more robust measures of food and other forms of insecurity would be useful to examine the range of well-being types corresponding to religiosity \citep[for review of various methods, see][]{manikas2023systematic}. Alas, the data set we used offers no such measures. More importantly perhaps is the specific aspects of formal education that might matter when it comes to playing a role in reducing (or increasing) religiosity. While our causal model suggests that we needn't worry about the role of the type of education, there are other aspects of formal education that could play a clearer role in affecting religiosity. Rather than exposure to formal education in years, other individual-level factors such as performance, attendance, and/or general enthusiasm in school might be pivotal for individual commitment to religion. Again, theory should help direct further inquiry.

More pragmatically, our results also have bearing on any potential interventions. For those committed to making higher education more available under the assumption that it will decrease commitment to religion, our results suggest that increasing the amount of education individuals obtain is not likely to do much. If our assumptions are realistic, the model is a worthy candidate for explanation, and our data are representative of the kinds of variation we expect to see in the world, we can conclude that there is no general or reliable effect of education and food security on religiosity. It may be the case that educational attainment might lead to the kinds of social living that relies less on (or has less time for) religion and its benefits \citep{inglehart2020religion}. Our model certaintly oversimplifies this process, but takes the first steps toward formally modelling it in a causal framework. 

In closing, we hope this report usefully provides a template for future work causally investigating the material security hypothesis with either cross-sectional or longitudinal data. With the goal of making causal assumptions, models, and use of theory explicit, we identified areas for future research and outlined a workflow for facilitating inference-making beyond what simple descriptions of data offer.

\section*{Acknowledgments}
\noindent We thank Cristine Legare and the Culture in Schooling team for their feedback and encouragement. We also thank our reviewers and Charles Efferson for their careful and constructive feedback.

\section*{Author Contributions}
\noindent BGP contributed to designing and managing the original project that produced the data used herein, led writing the text, crafted the causal and statistical model, drafted the simulation, and obtained funding for the effort. TB conducted data analysis, crafted results graphs, and contributed to writing.

\section*{Financial Support}
\noindent We acknowledge support from the Aarhus University Research Foundation and a Culture in Schooling Grant (Issachar Fund \#TIF0206) that directly funded this project.

\section*{Conflicts of Interest Declaration}
\noindent The authors declare no conflicts of interests.

\section*{Data Availability}
\noindent The data, code, and supplementary materials for this particular study are hosted at \url{https://github.com/tbendixen/causal-inference-schooling}. The greater project from which the present work drew is hosted at \url{https://github.com/bgpurzycki/Evolution-of-Religion-}\\ 
\url{and-Morality}. 

\bibliography{mbbib}
\bibliographystyle{elsarticle-harv}

\end{document}