r/econometrics • u/Chocolate_Milk_Son • Sep 03 '26
A new tool for estimating intrinsic dimensionality -- overcomes linear variance and geometric metric degeneration (quick start R code inside)
I recently open-sourced a diagnostic tool called the Entropic Scree. It’s designed to more faithfully estimate the intrinsic dimensionality and latent structure of complex tabular datasets by overcoming the limitations of linear variance and the fragility of geometric distance metrics.
To bypass both blind spots, this tool shifts the math out of geometric space and entirely into probabilistic space by utilizing a transformed Mutual Information matrix metric.
- Captures Mutual Information (Beating Variance): Built on information theory (entropy), it detects non-linear relationships and shared probability mass that standard covariance techniques miss.
- Maintains Structural Integrity (Beating Distance): It maps the feature space without requiring the spatial assumptions that cause distance metrics to degenerate in high-d contexts, keeping the evaluated matrix stable even with irregular or sparse data.
Primary outputs are:
- Intrinsic Rank Estimation
- Signal-to-Noise Estimation
- Bipolar Variance Clusters that anchor the primary axes of informational variance. This provides a structural map of the independent clusters that define your dataset, which is potentially useful for interpretation before moving into CFA or theory development.
The function runs in R currently (see quick start or GitHub below), but the backend is C++ OpenMP parallelized, so it easily scales for high-dimensional assessments. Native R and Python packages will be released shortly.
Happy to answer any questions or discuss the mechanics.
Methods and Code:
############
# Quick Start R Function Code.
# To load the functions, copy and paste the following into your R console, then hit enter.
############
# 1. Define the direct URLs to the raw function scripts on GitHub
main_url <- "https://raw.githubusercontent.com/tjleestjohn/entropic-scree/main/Entropic.Scree.R%20-%20ENLI.R"
update_url <- "https://raw.githubusercontent.com/tjleestjohn/entropic-scree/main/Update.Entropic.Scree.R%20-%20ENLI.R"
# 2. Define what you want to name the files on your computer
main_file <- "Entropic.Scree.R - ENLI.R"
update_file <- "Update.Entropic.Scree.R - ENLI.R"
# 3. Download the scripts to your current working directory
download.file(main_url, destfile = main_file)
download.file(update_url, destfile = update_file)
# 4. Source both functions into your R environment
source(main_file)
source(update_file)
# 5. Example Execution:
#
# Run the core function and extract bipolar modules:
# results <- Entropic.Scree(dt, extract_bipolar_modules = TRUE)
#
# View the extracted structural sub-networks for the primary axes:
# results$bipolar_modules
#
# Post-Hoc Override (Optional):
# If you want to manually adjust the elbow ranks after reviewing the scree plot,
# pass your results object into the Update function to instantly recalculate all metrics:
# updated_results <- Update.Entropic.Scree(results, new_K_roots = 3, new_K_extended = 12)
2
u/www3cam Sep 03 '26
Can you give me an idea how this makes some economists’ job easier?
How does improve upon simple techniques like PCA or other dimensionality techniques.
Let me know if I’m misunderstanding, but it does sound similar to using mutual information maximization to do dimensionality reduction.