comet {comets}R Documentation

Covariance measure tests with formula interface

Description

Covariance measure tests with formula interface

Usage

comet(formula, data, test = c("gcm", "pcm"), ...)

Arguments

formula

Formula of the form Y ~ X | Z for testing Y independent of X given Z.

data

Data.frame containing the variables in formula.

test

Character string; "gcm" or "pcm".

...

Additional arguments passed to test.

Details

Formula-based interface for the generalised and projected covariance measure tests.

Value

Object of class "gcm" or "pcm" and "htest". See gcm and pcm for details.

References

Kook, L. & Lundborg A. R. (2024). Algorithm-agnostic significance testing in supervised learning with multimodal data. arXiv preprint. doi: 10.48550/arXiv.2402.14416

Examples

tn <- 3e2
df <- data.frame(y = rnorm(tn), x1 = rnorm(tn), x2 = rnorm(tn), z = rnorm(tn))
comet(y ~ x1 + x2 | z, data = df, test = "gcm")

[Package comets version 0.0-1 Index]