Learn R Programming

geocausal

The goal of the package geocausal is to implement causal inference analytic methods based on spatio-temporal data. Users provide the raw data of locations and timings of treatment and outcome events, specify counterfactual scenarios, and the package estimates causal effects over specified spatial and temporal windows.

Installation

You can install the package geocausal from GitHub with:

# install.packages("devtools")
devtools::install_github("mmukaigawara/geocausal")

and CRAN with:

install.packages("geocausal")

Key publications

General methodological framework (ATE, heterogeneity, and mediation):

Mukaigawara M, Imai K, Lyall J, Papadogeorgou G (2025). Spatiotemporal causal inference with arbitrary spillover and carryover effects. arXiv Preprints. April 4. https://arxiv.org/abs/2504.03464

ATE:

Papadogeorgou G, Imai K, Lyall J, and Li F (2022). Causal inference with spatio-temporal data: Estimating the effects of airstrikes on insurgent violence in Iraq. J R Stat Soc Series B. https://doi.org/10.1111/rssb.12548.

Heterogeneity:

Zhou L, Imai K, Lyall J, Papadogeorgou G (2024). Estimating Heterogeneous Treatment Effects for Spatio-Temporal Causal Inference: How Economic Assistance Moderates the Effects of Airstrikes on Insurgent Violence. arXiv Preprints. Dec 19. https://arxiv.org/abs/2412.15128

Please refer to the following preprint for the user guide.

Mukaigawara M, Zhou L, Papadogeorgou G, Lyall J, and Imai K (2024). Geocausal: An R Package for Spatio-temporal Causal Inference. OSF Preprints. December 16. https://doi.org/10.31219/osf.io/5kc6f.

Citation

Please cite this package as follows:

Mukaigawara M, Imai K, Lyall J, Papadogeorgou G (2025). Spatiotemporal causal inference with arbitrary spillover and carryover effects. arXiv Preprints. April 4. https://arxiv.org/abs/2504.03464

Mukaigawara M, Zhou L, Papadogeorgou G, Lyall J, and Imai K (2024). Geocausal: An R Package for Spatio-temporal Causal Inference. OSF Preprints. December 16. https://doi.org/10.31219/osf.io/5kc6f.

Copy Link

Version

Install

install.packages('geocausal')

Monthly Downloads

264

Version

0.4.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Mitsuru Mukaigawara

Last Published

February 18th, 2026

Functions in geocausal (0.4.0)

plot.hyperframe

Plot estimates
get_weighted_surf

Generate average weighted surfaces
get_var_bound

Calculate variance upper bounds
get_obs_dens

Generate observed densities
plot.est

Plot estimates
get_power_dens

Get power densities
smooth_ppp

Smooth outcome events
sim_power_dens

Simulate power densities
plot.distlist

Plot distance-based expectations
print.cate

Print results
plot.weights

Plot weights
print.est

Print results
sim_cf_dens

Simulate counterfactual densities
summary.obs

Summarize results
plot.im

Plot im
get_distexp

Get the expectation of treatment events with arbitrary distances
iraq_window

iraq_window
plot.list

Plot lists
get_hist

Obtain histories of treatment or outcome events
plot.imlist

Plot im objects (list)
insurgencies_2006

insurgencies_2006
summary.est

Summarize results
plot.cflist

Plot simulated counterfactual densities
pixel_count_ppp

Get number of events in a pixel
summary.cate

Summarize results
plot.cate

Plot estimated CATE
insurgencies

insurgencies
get_dist_focus

Get distance maps
get_cf_sum_log_intens

Calculate the log counterfactual densities
plot.obs

Plot observed densities
get_window

Generate a window
imls_to_arr

convert a list of im objects to a three-dimensional array
plot.powerlist

Plot simulated power densities
plot.ppplist

Plot point pattern (list)
plot.supthin

Plot the results of superthinning tests
get_adaptive_baseline_dens

Generate adaptive intervention densities based on historical data
dx_supthin

Perform superthinning tests
airstrikes_2006

airstrikes_2006
conv_owin_into_sf

Convert windows into sf objects
get_cf_dens

Get counterfactual densities
dx_outpred

Perform out-of-sample prediction
get_cf_dens_adaptive

Get counterfactual densities
get_base_dens

Get the baseline density
get_cate

Generate a Hajek estimator for heterogeneity analysis
get_est

Get causal estimates comparing two scenarios
get_elev

Get elevation data
get_hfr

Create a hyperframe
get_em_vec

convert a list of im objects to a vector
airstrikes

airstrikes
get_estimates

Generate a Hajek estimator
get_dist_line

Get distance maps from lines and polygons