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

View source: R/RERfuncs.R

correlateWithBinaryPhenotypeR Documentation

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

Description

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

Usage

correlateWithBinaryPhenotype(
  RERmat,
  charP,
  min.sp = 10,
  min.pos = 2,
  weighted = "auto"
)

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

min.pos

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

weighted

perform weighted correlation. This option turns on weighted correlation that uses the weights computed by foreground2Tree(wholeClade=T). This setting will treat each clade a single observation for the purpose of p-value estimation. The function will guess automatically if the charP vector is of "weighted" type and there should be not need to set this parameter.

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.