delaneau.test: Test association between correlation sturucture and variable

Description Usage Arguments Details Value See Also Examples

View source: R/other_corr_tests.R

Description

Score impact of each sample on correlation sturucture and then peform test of association with variable using Kruskal-Wallis test

Usage

1
delaneau.test(Y, variable, method = c("pearson", "kendall", "spearman"))

Arguments

Y

data matrix with samples on rows and variables on columns

variable

variable with number of entries must equal nrow(Y). Can be discrete or continuous.

method

specify which correlation method: "pearson", "kendall" or "spearman"

Details

The statistical test used depends on the variable specified. if variable is factor with multiple levels, use Kruskal-Wallis test if variable is factor with 2 levels, use Wilcoxon test if variable is continuous, use Wilcoxon test

Value

list of p-value, estimate and method used

See Also

delaneau.score sle.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# load iris data
data(iris)

# variable is factor with multiple levels
# use kruskal.test
delaneau.test( iris[,1:4], iris[,5] )

# variable is factor with 2 levels
# use wilcox.test
delaneau.test( iris[1:100,1:4], iris[1:100,5] )

# variable is continuous
# use cor.test with spearman
delaneau.test( iris[,1:4], iris[,1] )

GabrielHoffman/decorate documentation built on July 26, 2021, 12:18 a.m.