Skip to main content
QUICK REVIEW

[Paper Review] copent: Estimating Copula Entropy and Transfer Entropy in R

Jian Ma|arXiv (Cornell University)|May 27, 2020
Statistical Methods and InferenceMathematics27 references4 citations
TL;DR

This paper introduces the R package copent, which implements nonparametric estimation of Copula Entropy (CE) and Transfer Entropy (TE) using k-Nearest Neighbor (kNN) methods. The framework unifies statistical independence and conditional independence testing, demonstrating superior performance in variable selection and causal discovery compared to kernel-based and distance correlation methods on simulated and real-world data, particularly in capturing meaningful temporal causal trends.

ABSTRACT

Statistical independence and conditional independence are two fundamental concepts in statistics and machine learning. Copula Entropy is a mathematical concept defined by Ma and Sun for multivariate statistical independence measuring and testing, and also proved to be closely related to conditional independence (or transfer entropy). As the unified framework for measuring both independence and causality, CE has been applied to solve several related statistical or machine learning problems, including association discovery, structure learning, variable selection, and causal discovery. The nonparametric methods for estimating copula entropy and transfer entropy were also proposed previously. This paper introduces copent, the R package which implements these proposed methods for estimating copula entropy and transfer entropy. The implementation detail of the package is introduced. Three examples with simulated data and real-world data on variable selection and causal discovery are also presented to demonstrate the usage of this package. The examples on variable selection and causal discovery show the strong ability of copent on testing (conditional) independence compared with the related packages. The copent package is available on the Comprehensive R Archive Network (CRAN) and also on GitHub at https://github.com/majianthu/copent.

Motivation & Objective

  • To develop a unified, theoretically sound framework for measuring statistical independence and conditional independence using Copula Entropy (CE).
  • To implement efficient nonparametric estimation methods for CE and TE in R, leveraging k-Nearest Neighbor (kNN) techniques.
  • To provide a practical tool for applications in variable selection, structure learning, and causal discovery.
  • To compare the performance of CE-based estimation with existing kernel-based and distance correlation methods in conditional independence testing.
  • To demonstrate the method's effectiveness on real-world data, particularly in capturing meteorological causal relationships.

Proposed method

  • The package implements nonparametric CE estimation via empirical copula function estimation using rank statistics.
  • Copula Entropy is estimated using the k-Nearest Neighbor (kNN) method proposed by Kraskov et al. (2004).
  • Transfer Entropy (TE) is estimated indirectly by expressing it as a function of CE, based on theoretical equivalence proven in Jian (2019).
  • The package provides high-level functions like `transent()` and `ci()` for direct estimation with time-lagged data.
  • It supports both direct estimation from raw time series and pre-processed data with time lags.
  • The implementation is optimized for computational efficiency and scalability to multivariate settings.

Experimental results

Research questions

  • RQ1Can Copula Entropy provide a unified, nonparametric framework for testing both statistical independence and conditional independence (causality) in multivariate data?
  • RQ2How does the performance of CE-based estimation compare to kernel-based and distance correlation methods in conditional independence testing?
  • RQ3Can the copent package effectively detect meaningful causal relationships in real-world time series, such as meteorological data?
  • RQ4Does the kNN-based nonparametric estimation of CE and TE yield stable and interpretable results across varying time lags?
  • RQ5How well does the CE framework capture temporal causal trends, such as those observed in PM2.5 and atmospheric pressure data?

Key findings

  • The copent package successfully estimates Copula Entropy and Transfer Entropy using a nonparametric kNN-based method, enabling robust independence and causality testing.
  • CE-based estimation captured a clear two-phase trend in TE strength—sharp increase followed by slow decline—when analyzing pressure-to-PM2.5 causality over 1–24 hour lags, aligning with meteorological expectations.
  • The distance correlation-based method produced similar results to the CE-based approach, while the kernel-based method failed to show the same temporal trend.
  • The package demonstrated strong performance in variable selection and causal discovery tasks, outperforming related R packages in conditional independence testing.
  • The implementation is available on CRAN and GitHub, with a corresponding Python package on PyPI, ensuring broad accessibility and reproducibility.
  • The framework is computationally efficient and theoretically well-founded, offering a unified alternative to existing methods based on kernel tricks or distance covariance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.