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.

For methodological details, please refer to the following article.

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.

Additionally, an article describing the usage of this package is coming soon.

Citation

Please cite this package as follows:

Mukaigawara M, Zhou L, Papadogeorgou G, Lyall J, Imai K (2024). geocausal: Causal Inference with Spatio-Temporal Data. R package version 0.3.1, https://github.com/mmukaigawara/geocausal

Installation

You can install the package geocausal from GitHub with:

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

and CRAN with:

install.packages("geocausal")

Copy Link

Version

Install

install.packages('geocausal')

Monthly Downloads

335

Version

0.3.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

July 19th, 2024

Functions in geocausal (0.3.2)

get_weighted_surf

Generate average weighted surfaces
get_hist

Obtain histories of treatment or outcome events
plot.im

Plot im
plot.obs

Plot observed densities
sim_power_dens

Simulate power densities
sim_cf_dens

Simulate counterfactual densities
insurgencies

insurgencies
iraq_window

iraq_window
get_window

Generate a window
imls_to_arr

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

Plot estimates
predict_obs_dens

Perform out-of-sample prediction
plot.weights

Plot weights
plot.cate

Plot estimated CATE
summary.est

Summarize results
get_power_dens

Get power densities
pixel_count_ppp

Get number of events in a pixel
summary.obs

Summarize results
smooth_ppp

Smooth outcome events
summary.cate

Summarize results
get_dist_line

Get distance maps from lines and polygons
get_cf_sum_log_intens

Calculate the log counterfactual densities
conv_owin_into_sf

Convert windows into sf objects
airstrikes

airstrikes
get_cate

Generate a Hajek estimator for heterogeneity analysis
get_base_dens

Get the baseline density
get_distexp

Get the expectation of treatment events with arbitrary distances
get_dist_focus

Get distance maps
get_cf_dens

Get counterfactual densities
get_hfr

Create a hyperframe
get_estimates

Generate a Hajek estimator
get_est

Get causal estimates comparing two scenarios
get_var_bound

Calculate variance upper bounds
get_elev

Get elevation data
get_obs_dens

Generate observed densities
get_em_vec

convert a list of im objects to a vector
plot.est

Plot estimates
airstrikes_base

airstrikes_base