A list of all the posts and pages found on the site. For you robots out there is an XML version available for digesting as well.



Presenting results from an arbitrary number of models

The combination of tidyr::nest() and purrr:map() can be used to easily fit the same model to different subsets of a single dataframe. There are many tutorials available to help guide you through this process. There are substantially fewer (none I’ve been able to find) that show you how to use these two functions to fit the same model to different features from your dataframe.

There is as Yet Insufficient Data for a Meaningful Answer

Since taking a job as a data scientist three months ago, I’ve spoken with multiple political science PhD students who are interested in potentially making the same transition. This post synthesizes what I’ve said in those conversations with what I’ve learned in my first three months on the job, and I hope it will be helpful to anyone in the same position I was six months ago.

So it goes

When I was applying to graduate school and asking for letters of recommendation from my undergrad professors, one of them told me to give academia three years, and that if I hadn’t found a permanent position by then, to find another career. It’s been three years, and next week I start a new job as a data scientist. I read a fair bit of quit lit in my first couple years of grad school and always told myself that if I went that same route, I would never pen any of my own…

Regular expressions for replication

As part of the publication process for my recent article on how states preempt separatist conflict, I needed to submit replication materials to the journal. I took my graduate quantitative methods sequence with the late Tom Carsey, so I’ve long been a proponent replicability efforts in social science. I also had an hourly job in grad school replicating quantitative results for multiple political science journals, so I’m very familiar with best practices for replication. Unfortunately, in the four years since I wrote the first line of code for this project, somewhere in between defending my dissertation and starting a new job (ok, fine, almost immediately after writing that first line of code), I got a little lazy.

Faceted maps in R

I recently needed to create a choropleth of a few different countries for a project on targeting of UN peacekeepers by non-state armed actors I’m working on. A choropleth is a type of thematic map where data are aggregated up from smaller areas (or discrete points) to larger ones and then visualized using different colors to represent different numeric values.

Finding Backcountry Campsites with CalTopo, OpenStreetMap, and R

Like many people, I’ve been spending more time outdoors during this pandemic. While this means daily walks in my neighborhood, it also means getting out into the wilderness and sleeping in a tent when I can. Although outdoor recreation is one of the safer ways to entertain yourself these days, it’s not without its own concerns. The difficulty of safely getting to trailheads means that while I’m backpacking more than usual, it’s still not as often as I’d like.

R Markdown, Jekyll, and Footnotes

I use jekyll to create my website. Jekyll converts Markdown files into the HTML that your browser renders into the pages you see. As others and I have written before, it’s pretty easy to use R Markdown to generate pages with R code and output all together. One thing has consistently eluded me, however: footnotes.

Working with Large Spatial Data in R

In my research I frequently work with large datasets. Sometimes that means datasets that cover the entire globe, and other times it means working with lots of micro-level event data. Usually, my computer is powerful enough to load and manipulate all of the data in R without issue. When my computer’s fallen short of the task at hand, my solution has often been to throw it at a high performance computing cluster. However, I finally ran into a situation where the data proved too large even for that approach.

Jekyll and HTML Widgets

I’m currently compiling a list of university-affiliated programs designed to help prepare students for graduate study in political science and assist them in the process of applying to graduate school (a labyrinthine and opaque process in many regards). Since travel costs can be a deciding factor for some students when deciding whether to apply to these programs, I thought it would be nice to also put them on a map.

Extracting UN Peacekeeping Data from PDF Files

Some coauthors and I recently published a piece in the Monkey Cage on the recent military coup in Mali and the overthrow of president Ibrahim Boubacar Keïta. We examine what the ouster of Keïta means for the future of MINUSMA, the United Nations peacekeeping mission in Mali. One of my contributions that didn’t make the final cut was this plot of casualties to date among UN peacekeepers in the so-called big 5 peacekeeping missions .

Adding Content to an Academic Website

One thing I haven’t covered in my previous posts on creating and customizing an academic website is how to actually add content to your site. You know, the stuff that’s the reason why people go to your website in the first place? If you’ve followed those guides, your website should be professional looking and already feeling a little bit different from the stock template. However, adding new pages or tweaking the existing pages can be a little intimidating, and I realized I should probably walk through how to do so. Luckily Jekyll’s use of Markdown makes it really easy to add new content!

Customizing an Academic Website

This is a followup to my previous post on creating an academic website. If you’ve followed that guide, you should have a website that’s professional-looking and informative, but it’s probably lacking something to really make it feel like your own. There are an infinite number of ways you could customize the academicpages template (many of them far, far beyond my abilities) but I’m going to walk you through the process I used to start tweaking my website. The goal here isn’t to tell you how you should personalize your website, but to give you the tools to learn how to implement whatever changes you want to make.

Building an Academic Website

If you’re an academic, you need a website. Obviously I agree with this since you’re reading this on my website, but if you don’t have one, you should get one. Most universities these days provide a free option, usually powered by WordPress (both WashU and UNC use WordPress for their respective offerings). While these sites are quick to set up and come with the prestige of a .edu URL, they have several drawbacks that have been extensively written on.

Visualizing Police Militarization

Much has been written lately about the increasing militarization of US law enforcement. One of the most visible indicators of this shift in recent decades is the increased frequency of tactical gear and equipment worn and carried by police officers. However, this pales in comparison to images of police departments bringing armored vehicles to peaceful protests.

Counting Words in a Snap

14 pt periods. 1.05” margins. 2.1 spaced lines. Times Newer Roman. I’ve seen them all, and I’m tired of trying to catch them. So, I’ve stopped assigning papers in terms of page length and switched to word counts. Unfortunately, counting words is more time-intensive than counting pages.

Better Beamer Presentations the Easy Way

Everyone knows that Beamer makes frankly terrible presentations without a good deal of help. A well crafted Beamer presentation can be a thing of beauty, especially since you can use knitr or R Markdown to automatically generate tables and figures, but it takes a lot of work.

Checking Progress with Bash

I’m currently cleaning and wrangling a large (> 2 billion observations) dataset. Due to its size, I’m running code in batch mode on a remote cluster. Not running interactively makes it harder for me to check on my code’s progress.

Fancy Icons and LaTeX Quirks

I recently updated my CV to add my ORCiD identifier to it up top among the other places to find me online. An ORCiD is an online identifier that persists through any changes to your name, institution, or email address throughout your life.

Combining PDF Documents the Smarter Way

My previous post on combining multiple PDF files had an important caveat that things would end up in the wrong order if you had files with leading ID numbers that started at 1 and ended at 12, you’d end up with PDFs combined in the order 1, 10, 11, 12, 2, 3, …, 9.

Combining PDF Documents

How many times have you found that your institution has access to a digital version of a book you need only to discover that it comes in 15 different PDF files?





Testing the bargaining vs. inclusive fitness models of suicidal behavior against the ethnographic record.

Kristen L. Syme, Zachary H. Garfield, and Edward H. Hagen. (2016). "Testing the bargaining vs. inclusive fitness models of suicidal behavior against the ethnographic record." Evolution and Human Behavior. 37(3).

Suicidal behavior by younger, healthy adults in the context of fitness threats, such as forced or thwarted marriages, physical or sexual abuse, or loss of a mate; social conflict, such as severe disagreements with parents and other authority figures; and powerlessness to improve one's situation, is ubiquitous in the ethnographic record.

A cross-cultural analysis of hunter-gatherer social learning

Zachary H. Garfield, Melissa J. Garfield, and Barry S. Hewlett. (2016). "A cross-cultural analysis of hunter-gatherer social learning." Social Learning and Innovation in Contemporary Hunter-Gatherers.

We provide greater external validity to observational research and theoretical literature highlighting the importance of teaching across a wide range of cultures and cultural domains while also supporting the finding that vertical transmission is dominant early in life with various forms of oblique transmission being more important throughout life in hunting and gathering societies.

Is male androphilia a context-dependent cross-cultural universal?

Raymond B. Hames, Zachary H. Garfield, and Melissa J. Garfield. (2017). "Is male androphilia a context-dependent cross-cultural universal?" Archives of sexual behavior. 46(1).

Our results show that male same sex behavior as well as male androphilia is much more common than previously estimated in the SCCS. With our findings, we make an argument that male androphilia is a context-dependent cross-cultural universal.

The evolutionary anthropology of political leadership

Zachary H. Garfield, Christopher Von Rueden, and Edward H. Hagen. (2019). "The evolutionary anthropology of political leadership." The Leadership Quarterly. 30(1).

For the study of leadership, we see tremendous benefits to integrating diverse sources of evidence from studies of animal behavior, paleoanthropology, ethnography, psychology, political science, and other social sciences. The challenge will be to identify and explain universal patterns of human leadership systems while still doing justice to their diversity.

Evolutionary models of leadership: Tests and synthesis

Zachary H. Garfield, Robert H. Hubbard, and Edward H. Hagen. (2019). "Evolutionary models of leadership: Tests and synthesis." Human Nature. 30(1).

We found that improving collective actions, having expertise, providing counsel, and being respected, having high neural capital, and being polygynous are common properties of leaders, which warrants a synthesis of the collective action, prestige, and neural capital and reproductive skew models. We sketch one such synthesis involving high-quality decision-making and other computational services.

Investigating evolutionary models of leadership among recently settled Ethiopian hunter-gatherers

Zachary H. Garfield and Edward H. Hagen (2020). "Investigating evolutionary models of leadership among recently settled Ethiopian hunter-gatherers." The Leadership Quarterly. 31(2).

The high colinearity of the diverse traits measured here suggests that each of the domains of leadership traits that we investigated — cognition, sociality, productivity, reproduction, and dominance — are potentially important in understanding variation between leaders and non‐leaders. To systematically overlook any of these domains may be a severe methodological limitation and this strong positive covariation of most leadership traits warrants further investigation.

Universal and variable leadership dimensions across human societies

Zachary H. Garfield, Kristen L. Syme, and Edward H. Hagen. (2020). "Universal and variable leadership dimensions across human societies." Evolution and Human Behavior. 41(5).

Leaders across cultures rely on a range of individual competencies, including cognitive, supernatural, material, social, and physical endowments, to organize group members, implement strategic actions, provide prosocial services to the group, and impose costs, all while conforming to cultural norms. Currently, no single theoretical perspective has yet captured the ethnographic reality of human leadership.

Correlates of conflict resolution across cultures

Zachary H. Garfield (2021). "Correlates of conflict resolution across cultures." Evolutionary Human Sciences. 3(E45).

Interpersonal skills and fairness were the only leader qualities predictive of conflict resolution. This supports links between effective conflict resolution and moral evaluations of social justice, suggesting that individuals who conform to and embody such traits are preferred as mediators. Effective mediators of conflict then are not necessarily leaders who can be conceptualised as particularly prestigious or dominant but are more likely to be individuals who effectively identify overlapping interests between individuals with distinct priorities fairly, consistent with emerging views on leadership and followership focused on the process and outcomes over individual trait.

The content and structure of reputation domains across human societies: a view from the evolutionary social sciences

Zachary H. Garfield, Ryan Schacht, Emily R. Post, Dominique Ingram, Andrea Uehling, and Shane J. Macfarlan (2021). "The content and structure of reputation domains across human societies: a view from the evolutionary social sciences." Philosophical Transactions of the Royal Society B. 376(1838).

We hypothesize reputations for cultural group unity will be a context-independent universal, likely to manifest in all human societies, whereas reputations for social and material success, neural capital, and dominance are more likely to be context-dependent universals, promoted or suppressed by socio-ecological or cultural evolutionary processes.

Religion: the WEIRDest concept in the world?

Aaron D. Lightner, Zachary H. Garfield & Edward H. Hagen (2022). "Religion: the WEIRDest concept in the world?" Religion, Brain & Behavior. 12(3), 290-298.

Henrich's view of religions as distinct, formal social institutions represents only some of the evidence on “religions” across cultures. Knowledge specialists who help clients are widespread in the ethnographic record. Their practical services can be misconstrued as religious rituals, and their abstract explanations as doctrinal beliefs in the supernatural..

Hunter-gatherer genomes reveal diverse demographic trajectories during the rise of farming in Eastern Africa

Shyamalika Gopalan, Richard E.W. Berl, Justin W. Myrick, Zachary H. Garfield, Austin W. Reynolds, Barnabas K. Bafens, Gillian Belbin, Mira Mastoras, Cole Williams, Michelle Daya, Akmel N. Negash, Marcus W. Feldman, Barry S. Hewlett, and Brenna M. Henn (2022). "Hunter-gatherer genomes reveal diverse demographic trajectories during the rise of farming in Eastern Africa." Current Biology. 32.

By analyzing eleven Eastern African populations, we find evidence for divergent demographic trajectories among hunter-gatherer-descendant groups. Our results illustrate that although foragers respond to encroaching agriculture and pastoralism with multiple strategies, including cultural adoption of agropastoralism, gene flow, and economic specialization, they often face population decline.

Evidence for third-party mediation but not punishment in Mentawai justice

Manvir Singh and Zachary H. Garfield (2022). "Evidence for third-party mediation but not punishment in Mentawai justice." Nature Human Behavior. 6.

We found no evidence that third parties directly punished transgressors, such as by demanding that transgressors pay tulou or seizing resources from them after they refused to pay. Several researchers have argued that, even if third parties do not directly punish violations, they engage in second-order or indirect enforce- ment, such as by avoiding non-punishers as social partners. We did not find evidence of such higher-order or indirect sanctions.

Norm violations and punishments across human societies

Zachary H. Garfield, Erik J. Ringen, William Buckner, Dithapelo Medupe, Richard W. Wrangham, and Luke Glowacki (2023). "Norm violations and punishments across human societies." Evolutionary Human Sciences. 5.

Accounting for the phylogenetic relationships among our cross-cultural sample, as well as correlations between evidence for punishment types, we found that egalitarianism (i.e. absence of social stratification) strongly predicted evidence for reputational punishments, whereas the presence of social stratification moderately predicted evidence for execution punishments.

Interpersonal conflicts and third-party mediation in a pastoralist society

Zachary H. Garfield and Luke Glowacki (2023). "Interpersonal conflicts and third-party mediation in a pastoralist society." Evolution and Human Behavior.

Our results suggest Hamar maintain cooperative and peaceful communities primarily through social structures, high within-clan cohesion, and gendered divisions of social and economic life, more so than through direct third-party mediation. Third parties, however, play a crucial role, especially in mediating social conflicts, and their involvement is often an effective and necessary solution for resolving severe interpersonal conflicts.

Cross-societal variation in norm enforcement systems

Catherine Molho, Francesca De Petrillo, Zachary H. Garfield and Sam Slewe (2024). "Cross-societal variation in norm enforcement systems." Philosophical Transactions of the Royal Society B: Biological Sciences.

...Our review reveals that evidence on the role of these socio-ecological and cultural factors remains mixed and fragmented, partly because different studies focus on distinct subsets of variables putatively explaining variation in norm enforcement, while excluding other important variables.



Teaching assistant – Washington State University, Department of Anthropology

Undergraduate anthropology courses, Washington State University, Department of Anthropology, 2012

Teaching assistant for ANTH 316 Gender in Cross Cultural Perspective/ANTH 405 Medical Anthropology, Fall 2015; ANTH 203 Peoples of the World, Fall 2013; ANTH 203 Peoples of the World/ANTH 309 Cultural Ecology, Fall 2012. Responsibilities included assisting with course content development, designing evaluation metrics, lecturing, and grading student writing.

Laboratory instructor – ANTH 260 Introduction to Physical Anthropology

Lab section, Washington State University, Department of Anthropology, 2013

I was the lab instructor for the Introduction to Physical Anthropology course at WSU for five semesters, which involved two three-hour lab sessions per week. I independently designed a unique lab focused on collaboratively conducting novel biocultural research. This lab included training in scientific methods, research ethics, theory evaluation, statistical analyses in R, and scientific writing. I regularly lectured on specific scientific theories as well as the scientific process. The students and I conducted two novel research projects each semester, which required hands-on, collaborative work.

Professor – BEH603 Human Behavior and Ecology

Graduate course, University Mohammed VI Polytechnic, Faculty of Governance, Economics and Social Sciences, 2023

The behavioral science of sustainability and environmentalism, with a focus on the interdisciplinary approaches of ecological anthropology, environmental psychology, human geography, and cross-cultural/cross-national variability.

Professor – RES 501 Quantitative Research Methods for Social Sciences 1

Graduate course, University Mohammed VI Polytechnic, Faculty of Governance, Economics and Social Sciences, 2023

The primary objective of RES501 is to provide students with a solid foundation in quantitative research methods and statistical analysis techniques. By the end of the course, students will be equipped with the necessary knowledge and skills to understand, apply, and critically evaluate statistical methodologies commonly used in social science research. Additionally, the course aims to foster a deep appreciation for the role of data analysis in informing evidence-based decision-making and hypothesis testing.

Professor – ANT 002E Leadership, Power and Inequality

Elective course (Undergraduate and Graduate), University Mohammed VI Polytechnic, Faculty of Governance, Economics and Social Sciences, 2024

Leadership, Power, and Inequality is an integrative anthropology course designed for both undergraduate and master’s students. This course delves into the multifaceted realms of leadership, power dynamics, and social inequality, drawing upon insights from cultural and evolutionary anthropology, psychology, political science, sociology, economics, and history.