PhyloRegression: PhyloFactor internal function to prep, find and summarize the...

View source: R/PhyloRegression.R

PhyloRegressionR Documentation

PhyloFactor internal function to prep, find and summarize the best ILR coordinate

Description

PhyloFactor internal function to prep, find and summarize the best ILR coordinate

Usage

PhyloRegression(TransformedData, X, frmla, Grps = NULL,
  contrast.fcn = NULL, choice, treeList = NULL, cl, totalvar = NULL,
  ix_cl, treetips = NULL, grpsizes = NULL, tree_map = NULL,
  nms = NULL, choice.fcn, method = "glm", ...)

Arguments

TransformedData

Transformed data matrix whose rows are species and columns are samples.

X

independent variables for input into glm.

frmla

Formula for input into glm by lapply(Y,FUN = pglm,x=xx,frmla=frmla,choice,...).

Grps

Groups - a list whose elements are two-element lists containing the groups and their compliments for amalgamation into ILR coordinates

contrast.fcn

Function taking as input contrast.fcn(Grps,TransformedData) and returning a matrix with rows corresponding to Grps and columns corresponding to columns in TransformedData. Must work for both list of Grps and a single element, e.g. Grps[[1]]. For advanced phylofactorization with customized choice.fcn, the output from contrast.fcn is input directly into choice.fcn.

choice

Choice function for determining the group maximizing the objective function. Currently the only allowable inputs are 'var' - minimize residual varaince - and 'F' - minimize test-statistic from anova.

treeList

List of trees formed by phylofactorization and cutting trees along factored edges.

cl

phyloFcluster for built-in parallelization of phylofactorization calculations.

totalvar

Total variance of dataset.

ix_cl

Cluster split of nodes in treeList

treetips

Number of tips in treeList for quickly identifying whether nodes correspond to a root

grpsizes

Number of nodes in each tree of treeList

tree_map

Cumulative number of nodes in trees of treeList - allows rapid mapping of nodes in ix_cl to appropriate tree in treeList.

nms

rownames of TransformedData, allowing reliable mapping of rows of data to tree.

choice.fcn

optional customized choice function to choose 'best' edge; see PhyloFactor

method

See PhyloFactor

...

optional input arguments for glm


reptalex/phylofactor documentation built on Feb. 28, 2024, 3:19 p.m.