Skip to content

DPI

2026.2

The Directed Prediction Index for Causal Direction Inference from Observational Data

0packages depend
2.9Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Han Wu Shuang BaoFirst published 2025-06-187 releasesCRAN page ↗GitHub ↗

The Directed Prediction Index ('DPI') is a causal discovery method for observational data designed to quantify the relative endogeneity of outcome (Y) versus predictor (X) variables in regression models. By comparing the coefficients of determination (R-squared) between the Y-as-outcome and X-as-outcome models while controlling for sufficient confounders and simulating k random covariates, it can quantify relative endogeneity, providing a necessary but insufficient condition for causal direction from a less endogenous variable (X) to a more endogenous variable (Y). Methodological details are provided at https://psychbruce.github.io/DPI/. This package also includes functions for data simulation and network analysis (correlation, partial correlation, and Bayesian Networks).

Install

Health

CRAN checks
13OK
Slowest check: 3.0 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
8
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-08
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 1,301 wordsVignettesNopkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
44%
Documented parameters
92%
Return-value docs
100%
References docs
17%

Downloads

2.9K
CRAN downloads in the past year
Rank #19,307 · ~8/day · ~238/mo
Daily download trend is not available in this view yet.
15130 days
57090 days
2.9K1 year
Compare downloads with other packages →
Also on1.1K r2u

Repository

Repository
4Stars
0Forks
0Open issues
0Open PRs
0Releases
35Commits
1Contributors
causal-inferencecausalityinfluencelinear-regressionpredictionsimulationstatisticscausal-discovery
License GPL-3.0 · 35 commits · Last activity 2026-02-26

Repository practices

Upstream repositoryBeta

4 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/psychbruce/dpi on 2026-08-09.

Continuous integration (1)
GitHub Actions
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.0.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

People & History

People (1)
Maintainer (1)
Author, Maintainer · added in 2025.8
Authors (1)
Author, Maintainer · added in 2025.8
Listed in earlier versions (1)
no longer listed · 2025.6
Package Timeline

7 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 2026.2Latest
    2026-02-26 · current release · diff ↗
  • 2025.11
    2025-11-24 · diff ↗
  • 2025.10-1
    2025-10-23 · diff ↗
  • 2025.10
    2025-10-16 · diff ↗
  • 2025.9
    2025-09-20 · diff ↗
  • 2025.8
    2025-08-20 · diff ↗
  • 2025.6
    2025-06-18
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-06-18
Total releases
7 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 4.0.0
Download size
32 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("DPI")
Bao, H. W. S. (2026). DPI: The Directed Prediction Index for Causal Direction Inference from Observational Data (Version 2026.2) [Computer software]. https://doi.org/10.32614/CRAN.package.DPI

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for DPI version 2026.2 [Data set]. HJJB, LLC. Data release v2026-08-15. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-15, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy