corr_coef: Correlation coefficient

Description Usage Arguments Details Value References Examples

View source: R/corr_coef_class.R

Description

The correlation between features and a set of continuous factor are calculated. Multiple-test corrected p-values are used to indicate whether the computed coefficients may have occurred by chance.

Usage

1
corr_coef(alpha = 0.05, mtc = "fdr", factor_names, method = "spearman", ...)

Arguments

alpha

(numeric) The p-value cutoff for determining significance. The default is 0.05.

mtc

(character) Multiple test correction method. Allowed values are limited to the following:

  • "bonferroni": Bonferroni correction in which the p-values are multiplied by the number of comparisons.

  • "fdr": Benjamini and Hochberg False Discovery Rate correction.

  • "none": No correction.

The default is "fdr".

factor_names

(character) The name of sample meta column(s) to use.

method

(character) Type of correlation. Allowed values are limited to the following:

  • "kendall": Kendall's tau is computed.

  • "pearson": Pearson product moment correlation is computed.

  • "spearman": Spearman's rho statistic is computed.

The default is "spearman".

...

Additional slots and values passed to struct_class.

Details

This object makes use of functionality from the following packages:

Value

A corr_coef object.

References

R Core Team (2020). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
D = MTBLS79_DatasetExperiment(filtered=TRUE)

# subset for this example
D = D[,1:10]

# convert to numeric for this example
D$sample_meta$sample_order=as.numeric(D$sample_meta$sample_order)
D$sample_meta$sample_rep=as.numeric(D$sample_meta$sample_rep)

M = corr_coef(factor_names=c('sample_order','sample_rep'))
M = model_apply(M,D)

structToolbox documentation built on Nov. 8, 2020, 6:54 p.m.