mdc {MDCcure}R Documentation

Martingale Difference Correlation (MDC)

Description

mdc computes the squared martingale difference correlation between a response variable Y and explanatory variable(s) X, measuring conditional mean dependence. X can be either univariate or multivariate.

Usage

mdc(X, Y, center = "U")

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.

center

Character string indicating the centering method to use. One of:

  • "U": U-centering, which provides an unbiased estimator.

  • "D": Double-centering, which leads to a biased estimator.

Value

Returns the squared martingale difference correlation of Y given X.

References

Shao, X., and Zhang, J. (2014). Martingale difference correlation and its use in high-dimensional variable screening. Journal of the American Statistical Association, 109(507), 1302-1318. doi:10.1080/01621459.2014.887012.

See Also

mdd, mdc_test

Examples

# Generate example data
set.seed(123)
n <- 50
x <- matrix(rnorm(n * 5), nrow = n)  # multivariate data with 5 variables
y <- rbinom(n, 1, 0.5)               # binary covariate

# Compute MDC with U-centering
mdc(x, y, center = "U")

# Compute MDC with double-centering
mdc(x, y, center = "D")


[Package MDCcure version 0.1.0 Index]