Skip to main content

Implementation of the PROTECT method for proxy-based causal inference

Project description

PROTECT: PRoxy-based individual Treatment EffeCT modeling in cancer

Official implementation of PROTECT

installation

Development version: clone this repository, run

pip install -e .

To be able to run the tutorial notebook, also install the dev dependencies:

pip install -e .[dev]

Usage

For applying PROTECT to your own data, see the notebook tutorials/inference_demo.ipynb To run this, you'll need to install the dev dependencies You'll need to specify these files (as seen in the tutorial directory)

  • model.py you're own bespoke PROTECT model variant
  • metadata.yaml some background information on the model and potential flags to control the model computation
  • priors.csv a csv file that specifies the priors for the model (can also be provided in other formats, see protect/models.py for details)

data formatting

Obligatory variables are

  • tx a binary treatment indicator
  • time_cens: a floating point variable with time_cens = time for patients who had the event, and time_cens = -time for patients who were censored, where:

time_cens = (2*event - 1) * time

You can create this from a time and event variable using protect.utils.time_event_to_time_cens(time,event)

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

causalprotect-0.1.1.tar.gz (62.8 kB view details)

Uploaded Source

Built Distribution

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

causalprotect-0.1.1-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file causalprotect-0.1.1.tar.gz.

File metadata

  • Download URL: causalprotect-0.1.1.tar.gz
  • Upload date:
  • Size: 62.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for causalprotect-0.1.1.tar.gz
Algorithm Hash digest
SHA256 50a6448448207e29df5b9d860c6da3f9e45899010dcb44a622490fc590d4bbce
MD5 1927f768605d94e9a2338857c305a9ff
BLAKE2b-256 afc8891927697d76ee3030876c3a65773262d38e0bf4367acc57d7f5b5f22973

See more details on using hashes here.

File details

Details for the file causalprotect-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for causalprotect-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab6ec2c0e4467e6041dc2a9075937fd6e8241fa16a32d87d7ff0bd13c081f765
MD5 46688ae404c9bea04fd9d621545893aa
BLAKE2b-256 02fb703ff18d716ccc9c4a8ff076c28d891b83165a61f71ef975ea4f5a040e60

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