| comet | R Documentation |
Covariance measure tests with formula interface
comet(formula, data, test = c("gcm", "pcm", "wgcm", "kgcm"), ...)
comets(formula, data, test = c("gcm", "pcm", "wgcm", "kgcm"), ...)
formula |
Formula of the form |
data |
A |
test |
Character string; |
... |
Additional arguments passed to |
Formula-based interface for the generalised (GCM), projected (PCM), weighted
(wGCM), kernel generalised (kGCM) and transformation model generalised
(tram-GCM) covariance measure tests (COMETs). All of these COMETs are
algorithm-agnostic and doubly robust tests of conditional independence, that
is for the null hypothesis that X is independent of Y given Z. In the
formula argument, this can be specified as Y ~ X | Z. The GCM
test supports multivariate X, Y, and Z, while the PCM, wGCM, and kGCM
require a one-dimensional Y.
Object of class "gcm", "wgcm", "kgcm", or
"pcm" and "htest". See gcm, wgcm,
kgcm, pcm for details.
Kook, L. & Lundborg A. R. (2024). Algorithm-agnostic significance testing in supervised learning with multimodal data. Briefings in Bioinformatics, 25(6), 2024. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/bib/bbae475")}
tn <- 1e2
df <- data.frame(y = rnorm(tn), x1 = rnorm(tn), x2 = rnorm(tn), z = rnorm(tn))
comet(y ~ x1 + x2 | z, data = df, test = "gcm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.