Beyond Averages: Discovering Who Benefits from Religion?

Day 2: Advanced Methods in Causal Inference

Author
Affiliation

Joseph Bulbulia

Victoria University of Wellington, New Zealand

ImportantVenue

Date: Tuesday, 12 August 2025, 09:00 – 17:00
Location: Seventh College, 15th Floor Meeting Rooms
Building: Tower West, Building 1
Located on the northwest end of campus.

Welcome to SPARCC Day 2

**Beyond Averages: Heterogeneous Treatment Effects*

Tuesday, 12 August 2025 | 09:00 – 17:00

Install R and R Studio

Visit the comprehensive r archive network (cran) at https://cran.r-project.org/ Select the version of r suitable for your operating system (windows, mac, or linux) Download and install it by following the on-screen instructions Install RStudio

Visit rstudio download page at https://www.rstudio.com/products/rstudio/download/ Choose the free version of rstudio desktop, Download it for your operating system Install and open

Optionally install margot

# Manual installation for SPARCC Day 2
if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

# Install causalworkshop (includes all scripts)
devtools::install_github("go-bayes/causalworkshop")

# install margot for advanced workflows OPTIONAL
# warning, this package is being refactored: for demonstration purposes only.
devtools::install_github("go-bayes/margot")
# explanations
devtools::install_github("go-bayes/boilerplate")

This will install causalworkshop along with all required dependencies for the complete workshop experience.

After installation, verify everything works:

# Load the package
library(causalworkshop)

# Check prerequisites
check_workshop_prerequisites()

# Run a quick test
workshop_results <- run_workshop(n = 30000, verbose = FALSE)

Next run get_workshop_scripts() to get the scripts. Run them in order.

library(causalworkshop)

# Copy all workshop scripts to your working directory
get_workshop_scripts()

# See what scripts are available
list_workshop_scripts()

# Work through the scripts in order:
# 01-baseline-adjustment.R    - Foundation concepts
# 02-causal-forest-analysis.R - Core methodology  
# 03-rate-qini-curves.R      - Performance evaluation
# 04-policy-trees.R          - Decision rules
# 05-margot-workflow.R       - Professional analysis
# 06-interpretation.qmd       - Results reporting

:::

Agenda

Table 1: Workshop Schedule
Time Session Learning Goals & Activities
09:00–09:15 Recap of Day 1 Potential Outcomes and Average Treatment Effect: Review of (Day 1)
09:15–09:45 How to Ask a Causal Question Goal: Understand why causal questions in the scientific study of religion require a structured approach: Stating your causal question precisely (and what can go wrong if you don't). Example: Does religious service attendance increase charitable giving?
09:45–10:00 How to Answer a Causal Question Goal: Overview of the workflow steps: state question, state target population, check assumptions (with experts), data, estimation, sensitivity analysis, communicate to audience Illustration: *Which* causal effect of religious service?
10:00–10:30 Activity & Workflow Mapping Activity: Formulate a precise causal question. Following this, select one question and map it through the key workflow steps, identifying potential challenges at each stage.
10:30–10:45 Morning Tea
10:45–11:30 Beyond Averages: Conditional Average Treatment Effects (CATEs) Goal: Introduction to effect heterogeneity. Activity: Identify potential effect modifiers of religion β†’ Donations, Volunteering
11:30–12:30 Why Time-Series Data Are Tricky Goal: Describe why sequential exposures/time-varying exposures (such as causal mediation) is hard . Activity: Imagine cases where the confounder of a mediator might also be affected by the exposure.
12:30–13:30 Lunch
13:30–14:15 Bias in Data: A Structural Approach to Measurement Error Goal: How to use causal diagrams to investigate structural sources of bias Activity: Whiteboard session using graphs to illustrate measurement error (and bias correction).
14:15–15:00 Worked Example: Who does Religious Attendance Affect? Goal: Hands-on demonstration using causal forests to discover subgroups in the religious attendance-prosociality relationship. Activity: Live walkthrough using NZAVS analysis
15:00–15:15 Afternoon Tea
15:15–16:00 Group Exercise: Interpreting Heterogeneous Treatment Effects Goal: Develop skills in translating causal forest results into actionable insights for stakeholders (academic, government, religious groups, etc.). Activity: Teams analyse policy graphs showing which groups show strongest religion-charity, discuss implications.
16:00–16:45 Workflow Synthesis: Your Research Questions Goal: Clarify complete workflows for participants' own research questions about the social consequences of religion. Activity: Participants map their questions through each workflow stage.
16:45–17:00 Wrap-up & Resources Goal: Review: What have we learnt? Activity: Q&A, What Next? Brainstorm next steps: how might we work together?

Workshop Objectives

What You’ll Learn

By the end of this workshop, participants will be able to:

  1. Formulate clear causal questions about the social consequences of religion

  2. Apply the causal inference workflow from question formulation through to communication of results.

  3. Understand Effect Modification and distinguish it from Moderation

  4. Identify and address common pitfalls in causal inference with longitudinal data, including time-varying confounding and measurement error.

  5. Understand modern machine learning methods (such as causal forests) to discover both average and heterogenious causal effects in religion \(\to\) prosociality relationships

  6. Understand how to translate causal findings into meaningful insights for diverse stakeholders (government, institutional leaders, religious communities)

  7. Apply insights to your flagship SPARCC Proposal.

TipPrerequisites
  • Basic familiarity with R and regression analysis (someone on your team)
  • Expertise in the scientific study of religion
  • No prior knowledge of causal inference required beyond SPARCC Day 1
NoteWhat to Bring
  • A laptop or table with access to reference materials on this page, in particular the causal DAG handouts.
TipReference Materials Available

For comprehensive glossary definitions and causal DAG handouts, visit our dedicated Glossary & DAGs Reference Page. This includes 19+ organized handouts covering terminology, common questions, time-series approaches, and advanced methodological topics.

Case Study 1: ATE

πŸ“– View Presentation 1 Average Treatment Effect

This PDF presentation is hosted on Dropbox for optimal performance.


Open in New Tab

Case Study 2: CATE

πŸ“– View Presentation 1 Average Treatment Effect

This PDF presentation is hosted on Dropbox for optimal performance.


Open in New Tab
NoteAlternative Viewing Options
  • Download: Use the download button in Dropbox to save a local copy
  • Full Screen: Open in new tab and use browser’s full screen mode
TipViewing Tips
  • Use browser zoom controls to adjust text size
  • Navigate with page up/down keys or scroll wheel
  • Compatible with all modern browsers

Β© 2025 Joseph Bulbulia. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.