edgeVars: maps a vector of traits onto a reference tree

Description Usage Arguments Value

View source: R/RERfuncs.R

Description

maps a vector of traits onto a reference tree

Usage

1
2
edgeVars(mastertree, tip.vals, metric = "diff", se.filter = -1,
  return.var = F)

Arguments

mastertree

the tree species the topology of the output tree and the branch lengths are used to infer ancestral states

tip.vals

the trait/phenotype/character value at the tip, names(tip.vals) should match some of the mastertree$tip.label, though a perfect match is not required

metric

The metric used to translate node values into branch values. "Diff" takes the difference and makes the result phylogenetically independent. Other possible values are "mean" (the mean of the two values) and "last" the value of the most recent species on the branch. The last two options are not phylogenetically independent and downstream computations for those are not yet implemented

se.filter

Will remove branch values that are not at least se.filter*edge.se away from 0 (where edge.se is the standard error in the estimate for the edge value). Only implemented for metric="diff". Set se.filter to a positive value to filter. By default no filtering is done.

return.var

Returns the variance instead of the mean. Useful for seeing which estimates have high confidence.

Value

A phylo tree with branch values computed from the input tip.values


nclark-lab/RERconverge documentation built on Dec. 3, 2018, 7:12 p.m.