correlateWithContinuousPhenotype: Computes the association statistics between RER from...

View source: R/RERfuncs.R

correlateWithContinuousPhenotypeR Documentation

Computes the association statistics between RER from getAllResiduals and a phenotype paths vector for a continuous phenotype made with char2Paths

Description

Computes the association statistics between RER from getAllResiduals and a phenotype paths vector for a continuous phenotype made with char2Paths

Usage

correlateWithContinuousPhenotype(
  RERmat,
  charP,
  min.sp = 10,
  winsorizeRER = 3,
  winsorizetrait = 3
)

Arguments

RERmat

RER matrix returned by getAllResiduals

charP

phenotype vector returned by tree2Paths or char2Paths

min.sp

Minimum number of species that must be present for a gene

winsorizeRER

Winsorize RER values before computing Pearson correlation. winsorizeRER=3 will set the 3 most extreme values at each end of each RER row to the the value closest to 0.

winsorizetrait

Winsorize trait values before computing Pearson correlation. winsorizetrait=3 will set the 3 most extreme values of the trait values to the value closest to 0.

method

Method used to compute correlations. Accepts the same arguments as cor. Set to "auto" to select automatically based on the number of unique values in charP. This will also auto set the winsorization for Pearson correlation. Set winsorizetrait=some number and winsorizeRER=some number to override


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.