associate | R Documentation |
Statistical test of association between arbitrary vector types.
associate(a, b, ...) ## S4 method for signature 'numeric,numeric' associate(a, b, method = "spearman") ## S4 method for signature 'factor,numeric' associate(a, b) ## S4 method for signature 'numeric,factor' associate(a, b) ## S4 method for signature 'factor,factor' associate(a, b) ## S4 method for signature 'character,ANY' associate(a, b) ## S4 method for signature 'Date,ANY' associate(a, b) ## S4 method for signature 'ANY,Date' associate(a, b) ## S4 method for signature 'ANY,POSIXct' associate(a, b) ## S4 method for signature 'POSIXct,ANY' associate(a, b) ## S4 method for signature 'ANY,POSIXt' associate(a, b) ## S4 method for signature 'POSIXt,ANY' associate(a, b) ## S4 method for signature 'character,character' associate(a, b) ## S4 method for signature 'ANY,character' associate(a, b) ## S4 method for signature 'ANY,factor' associate(a, b) ## S4 method for signature 'logical,ANY' associate(a, b) ## S4 method for signature 'ANY,logical' associate(a, b)
a, b |
Vectors of covariates of arbitrary type. See Details for the specific tests used. |
... |
Passed to specific methods. |
method |
For numeric vs numeric, the correlation method (passed to
|
For numeric vs numeric, a correlation test. For factor vs factor, a chisq test. For numeric vs factor/character/logical, ANOVA.
A p-value of an association test.
a <- rnorm(100) b <- runif(100) c <- sample(letters[1:2], 100, replace = TRUE) d <- sample(letters[3:5], 100, replace = TRUE) associate(a, b) associate(b, a) associate(b, c) associate(b, d) associate(c, d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.