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

getAllCorExtantOnlyR Documentation

Computes the association statistics between RER from getAllResiduals and a phenotype vector for phenotype values at the tips of the tree

Description

Computes the association statistics between RER from getAllResiduals and a phenotype vector for phenotype values at the tips of the tree

Usage

getAllCorExtantOnly(
  RERmat,
  phenvals,
  method = "auto",
  min.sp = 10,
  min.pos = 2,
  winsorizeRER = NULL,
  winsorizetrait = NULL
)

Arguments

RERmat

RER matrix returned by getAllResiduals

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

min.sp

Minimum number of species that must be present for a gene

min.pos

Minimum number of species that must be present in the foreground (non-zero phenotype values)

winsorizeRER

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

winsorizetrait

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

Value

A list object with correlation values, p-values, and the number of data points used for each tree

Note

winsorize is in terms of number of observations at each end, NOT quantiles


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