DPI
🛸 The Directed Prediction Index (DPI): Quantifying Relative Endogeneity of Outcome Versus Predictor Variables.
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.7%) to scientific vocabulary
Keywords
Repository
🛸 The Directed Prediction Index (DPI): Quantifying Relative Endogeneity of Outcome Versus Predictor Variables.
Basic Info
- Host: GitHub
- Owner: psychbruce
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://psychbruce.github.io/DPI
- Size: 5.63 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
DPI 
🛸 The Directed Prediction Index (DPI).
The Directed Prediction Index (DPI) is a simulation-based method for quantifying the relative endogeneity (relative dependence) of outcome (Y) versus predictor (X) variables in multiple linear regression models.

Author
Bruce H. W. S. Bao 包寒吴霜
Citation
- Bao, H. W. S. (2025). DPI: The Directed Prediction Index. https://doi.org/10.32614/CRAN.package.DPI
Installation
``` r
Method 1: Install from CRAN
install.packages("DPI")
Method 2: Install from GitHub
install.packages("devtools") devtools::install_github("psychbruce/DPI", force=TRUE) ```
Computation Details
$$ \begin{aligned} \text{DPI}{X \rightarrow Y} & = t^2 \cdot \Delta R^2 \ & = t{\beta{XY|Covs}}^2 \cdot (R{Y \sim X + Covs}^2 - R{X \sim Y + Covs}^2) \ & = t{partial.r{XY|Covs}}^2 \cdot (R{Y \sim X + Covs}^2 - R_{X \sim Y + Covs}^2) \end{aligned} $$
In econometrics and broader social sciences, an exogenous variable is assumed to have a unidirectional (causal or quasi-causal) influence on an endogenous variable ($ExoVar \rightarrow EndoVar$). By quantifying the relative endogeneity of outcome versus predictor variables in multiple linear regression models, the DPI can suggest a more plausible direction of influence (e.g., $\text{DPI}_{X \rightarrow Y} > 0 \text{: } X \rightarrow Y$) after controlling for a sufficient number of potential confounding variables.
- It uses $\Delta R_{Y vs. X}^2$ to test whether $Y$ (outcome), compared to $X$ (predictor), can be more strongly predicted by $m$ observable control variables (included in a regression model) and $k$ unobservable random covariates (specified by
k.cov; see theDPI()function). A higher $R^2$ indicates relatively higher dependence (i.e., relatively higher endogeneity) in a given variable set. - It also uses $t{partial.r}^2$ to penalize insignificant partial correlation ($r{partial}$, with equivalent $t$ test as $\beta_{partial}$) between $Y$ and $X$, while ignoring the sign ($\pm$) of this correlation. A higher $t^2$ (equivalent to $F$ test value when $df = 1$) indicates a more robust (less spurious) partial relationship when controlling for other variables.
- Simulation samples with
k.covrandom covariates are generated to test the statistical significance of DPI.
Owner
- Name: Bruce H.-W.-S. Bao
- Login: psychbruce
- Kind: user
- Location: Shanghai, China
- Company: East China Normal University
- Website: https://psychbruce.github.io
- Twitter: BaoHWS
- Repositories: 15
- Profile: https://github.com/psychbruce
🔮 Computational Intelligent Social Psychology | Assistant Professor @ ECNU
GitHub Events
Total
- Watch event: 1
- Push event: 14
Last Year
- Watch event: 1
- Push event: 14
Packages
- Total packages: 1
-
Total downloads:
- cran 263 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: DPI
The Directed Prediction Index
- Homepage: https://psychbruce.github.io/DPI/
- Documentation: http://cran.r-project.org/web/packages/DPI/DPI.pdf
- License: GPL-3
-
Latest release: 2025.8
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- JamesIves/github-pages-deploy-action v4.5.0 composite
- actions/checkout v4 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- R >= 4.0.0 depends
- cli * imports
- crayon * imports
- ggplot2 * imports
- glue * imports
- qgraph * imports
- bruceR * suggests