cmdm_test {EDMeasure} R Documentation

## Conditional Mean Independence Tests

### Description

cmdm_test tests conditional mean independence of Y given X conditioning on Z, where each contains one variable (univariate) or more variables (multivariate). All tests are implemented as permutation tests.

### Usage

cmdm_test(X, Y, Z, num_perm = 500, type = "linmdd", compute = "C",
center = "U")


### Arguments

 X A vector, matrix or data frame, where rows represent samples, and columns represent variables. Y A vector, matrix or data frame, where rows represent samples, and columns represent variables. Z A vector, matrix or data frame, where rows represent samples, and columns represent variables. num_perm The number of permutation samples drawn to approximate the asymptotic distributions of mutual dependence measures. type The type of conditional mean dependence measures, including linmdd: martingale difference divergence under a linear assumption; pmdd: partial martingale difference divergence. compute The computation method for martingale difference divergence, including C: computation implemented in C code; R: computation implemented in R code. center The centering approach for martingale difference divergence, including U: U-centering which leads to an unbiased estimator; D: double-centering which leads to a biased estimator.

### Value

cmdm_test returns a list including the following components:

 stat The value of the conditional mean dependence measure. dist The p-value of the conditional mean independence test.

### 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. http://dx.doi.org/10.1080/01621459.2014.887012.

Park, T., Shao, X., and Yao, S. (2015). Partial martingale difference correlation. Electronic Journal of Statistics, 9(1), 1492-1517. http://dx.doi.org/10.1214/15-EJS1047.

### Examples

## Not run:
# X, Y, Z are vectors with 10 samples and 1 variable
X <- rnorm(10)
Y <- rnorm(10)
Z <- rnorm(10)

cmdm_test(X, Y, Z, type = "linmdd")

# X, Y, Z are 10 x 2 matrices with 10 samples and 2 variables
X <- matrix(rnorm(10 * 2), 10, 2)
Y <- matrix(rnorm(10 * 2), 10, 2)
Z <- matrix(rnorm(10 * 2), 10, 2)

cmdm_test(X, Y, Z, type = "pmdd")

## End(Not run)


[Package EDMeasure version 1.2.0 Index]
{"ft_lang_label":"__label__en","ft_lang_prob":0.73868275,"math_prob":0.92763966,"size":1947,"snap":"2022-05-2022-21","text_gpt3_token_len":539,"char_repetition_ratio":0.11219763,"word_repetition_ratio":0.16271186,"special_character_ratio":0.3081664,"punctuation_ratio":0.21276596,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9965181,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-21T11:41:38Z\",\"WARC-Record-ID\":\"<urn:uuid:fcaf3aae-b29f-4ba2-b054-c461953903f6>\",\"Content-Length\":\"5109\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0f281e26-5aa4-4d48-88f8-7b618afe8a90>\",\"WARC-Concurrent-To\":\"<urn:uuid:5ea8b141-9e4b-4e2d-bcd2-4fe41ded73c0>\",\"WARC-IP-Address\":\"137.208.57.46\",\"WARC-Target-URI\":\"https://search.r-project.org/CRAN/refmans/EDMeasure/html/cmdm_test.html\",\"WARC-Payload-Digest\":\"sha1:DBBYAFDMQNZFIOSOYEREXQCIEVFUEHLZ\",\"WARC-Block-Digest\":\"sha1:SBPYZPCO66AI3XXOILXBUDQZAXQNDLHW\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662539101.40_warc_CC-MAIN-20220521112022-20220521142022-00458.warc.gz\"}"}