multtest.cor: Univariate correlation test for multiple variables

View source: R/multtest.cor.R

multtest.corR Documentation

Univariate correlation test for multiple variables

Description

Performs correlation tests between one variable and a series of other variables, and corrects p-values.

Usage

multtest.cor(mult.var, uni.var, method = "pearson", p.method = "fdr",
  ordered = TRUE)

## S3 method for class 'multtest.cor'
plot(x, arrows = TRUE, main = NULL, pch = 16,
  cex = 1, col = c("red", "orange", "black"), labels = NULL, ...)

Arguments

mult.var

data frame containing a series of numeric variables.

uni.var

numeric variable (vector).

method

a character string indicating which correlation coefficient is to be computed. See help of cor.

p.method

method for p-values correction. See help of p.adjust.

ordered

logical indicating if variables should be ordered based on correlation values.

x

object returned from multtest.cor.

arrows

logical indicating if arrows should be plotted. If FALSE, points are displayed at the extremity of the arrows.

main

optional title of the graph.

pch

symbol(s) used for points, when points are displayed (see arrows).

cex

size of points and labels (see help of dotchart).

col

vector of three colors: first for variables with P < 0.05, second for variables with 0.05 < P < 0.1, third for variables with P > 0.1. Recycled if only one value.

labels

names of the variables. If NULL (default), labels correspond to names found in mult.var.

...

not used.

Author(s)

Maxime HERVE <maxime.herve@univ-rennes1.fr>

See Also

cor.test

Examples

data(iris)

# Original coordinates
plot(Petal.Length~Sepal.Length,pch=16,col=as.numeric(iris$Species),data=iris)

# New axis
abline(-6,1.6)

# Coordinates on new axis
new.coord <- coord.proj(iris[,c("Sepal.Length","Petal.Length")],1.6)

# Correlation between the whole dataset and new coordinates
mult.cor <- multtest.cor(iris[,1:4],new.coord)
plot(mult.cor)

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.