Skip to content

The Directed Prediction Index for Causal Direction Inference from Observational Data

0packages depend
2.9Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

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).

Changes in 2026.2
  • Minor changes and improvements.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.9 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 2026.2
READMEYes · 1,301 wordsVignettesNoNEWSYes · 100% structured · mentions 2026.2Citation fileNoWebsiteYes · pkgdown
Help pages
12 (3 internal)includes a package overview page
Examples that run
33%3 run in a plain check · 6 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
92%
Return-value docs
100%
Help pages citing references
17%

Downloads

2.9K
CRAN downloads in the past year
Rank #16,989 · ~8/day · ~240/mo
Daily download trend is not available in this view yet.
30830 days
72690 days
2.9K1 year
Compare downloads with other packages →
Also on1K r2u4 autocran

Repository

4Stars
0Forks
0Open issues
0Open PRs
0Releases
35Commits
1Commit identities
causal-inferencecausalityinfluencelinear-regressionpredictionsimulationstatisticscausal-discovery
License file reads as GPL-3.0 · 35 commits · Last activity 2026-02-26
Responsiveness
not measured
PracticesBeta

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

Checks run against github.com/psychbruce/dpi on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-02-26 · The repository has a site deploy workflow

pkgdown site last built 2026-02-26

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing DPI adds 75 packages (40 with compiled code, 67 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.

Depends (1)
R >= 4.0.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer · added in 2025.8

Maintainer since 2025.6 (2025)

Listed in earlier versions (1)
Han-Wu-Shuang Bao
no longer listed · 2025.6
Releases (7)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 2026.2Latest
    record
    2026-02-26 · current release · diff ↗
  • 2025.11
    record
    2025-11-24 · diff ↗
  • 2025.10-1
    record
    2025-10-23 · diff ↗
  • 2025.10
    record
    2025-10-16 · diff ↗ ·
    removed 3 exports
    cor_network, dag_network, matrix_cor
    added 5 exports
    BNs_dag, DPI_dag, cor_matrix, cor_net, p_to_bf
  • 2025.9
    record
    2025-09-20 · diff ↗ ·
    removed 1 export
    data_random
    added 3 exports
    matrix_cor, sim_data, sim_data_exp
  • 2025.8
    record
    2025-08-20 · diff ↗ ·
    added 1 export
    dag_network
  • 2025.6
    record
    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

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 package has no citation file, so citation() returns this entry built from DESCRIPTION.

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-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, 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