Skip to main content

A module for spatial causal inference in Python.

Project description

spycause

Documentation Status

A module for spatial causal inference in Python. Docs are forthcoming.

For the Python package used to run the simulation experiments in Hoffman and Kedron (2023), please see spycause-experiments.

The regression adjustments provided here address data settings with the following graph structure:

image

where $\pi(x, u) = P(Z = 1 \mid X = x, U = u)$ is the propensity score, $X$ is a set of observed confounders, and $U$ stands for all unobserved spatial confounders. $\pi$ is placed in a square node to indicate that it is not a random variable, and rather a deterministic function of random variables $X$ and $U$. We also provide adjustments to correct for spatial interference between locations (not depicted).

Features

  • Simulation code for spatially confounded or interfered data
  • Bayesian estimation routines (using Stan) for ordinary linear regression (OLS), conditional autoregressive models (CAR), and joint models for propensity score and outcome
  • Adjustments for spatial interference
  • Spatial and nonspatial first-stage propensity score estimation (also using Stan)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spycause-0.0.1.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spycause-0.0.1-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file spycause-0.0.1.tar.gz.

File metadata

  • Download URL: spycause-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for spycause-0.0.1.tar.gz
Algorithm Hash digest
SHA256 006ddbe2e17f82933ca487defebd8bd271a5c98bb32b2814fc3c6133d15a8d28
MD5 3ff6a2e5c83b510c83f632f410fdd769
BLAKE2b-256 9e6f472b44711e1bc47f56d6883c72e0872a9d135a8cc7be3447def4644726bf

See more details on using hashes here.

File details

Details for the file spycause-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: spycause-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for spycause-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b720c76060f45daaaee8668c961f3824e39365f20ee89c0f4bc6c69a8f355b51
MD5 17121d0db2781ad01eb378023fad2461
BLAKE2b-256 c1c91d4e38ec7f94dc490303e2a66c5de83c25f9d001b0640627d8eef8c419ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page