pmdc: Partial Martingale Difference Correlation (pMDC)

View source: R/pmdc.R

pmdcR Documentation

Partial Martingale Difference Correlation (pMDC)

Description

pmdd measures conditional mean dependence of Y given X, adjusting for the dependence on Z.

Usage

pmdc(X, Y, Z)

Arguments

X

A vector or matrix where rows represent samples and columns represent variables.

Y

A vector or matrix where rows represent samples and columns represent variables.

Z

A vector or matrix where rows represent samples and columns represent variables.

Value

Returns the squared partial martingale difference correlation of Y given X, adjusting for the dependence on Z.

References

Park, T., Shao, X., and Yao, S. (2015). Partial martingale difference correlation. Electronic Journal of Statistics, 9(1), 1492-1517. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/15-EJS1047")}.

Examples

# Generate example data
set.seed(123)
n <- 50
x <- matrix(rnorm(n * 5), nrow = n)  # explanatory variables
y <- matrix(rnorm(n), nrow = n)      # response variable
z <- matrix(rnorm(n * 2), nrow = n)  # conditioning variables

# Compute partial MDD
pmdd(x, y, z)


MDCcure documentation built on Aug. 8, 2025, 6:10 p.m.