nh.test: using the Freckleton and Harvey node-height test

Description Usage Arguments Value Author(s) References See Also Examples

Description

Fits a linear model between the absolute magnitude of the standardized independent contrasts and the height above the root of the node at which they were being compared to identify early bursts of trait evolution.

Usage

1
nh.test(phy, d, regression.type, log = TRUE, rlm.maxit = 20 , show.plot = TRUE, ...)

Arguments

phy

A time calibrated phylogeny in "phylo" format

d

A named vector of trait values.

regression.type

The type of regression to be used. Specify regression.type="lm" to fit a standard linear model or regression.type="rlm" to fit a robust regression model

log

Whether the data should be logged or not.

rlm.maxit

The maximum number of iterations to fit the robust regression model. This is ignored if regression.type="lm".

show.plot

Binary argument indicating whether plot should be made.

...

Additional arguments passed to plot

Value

Function returns a lm or rlm object and outputs a plot if show.plot=TRUE

Author(s)

Graham Slater

References

Slater GJ and MW Pennell (in press) Robust regression and posterior predictive simulation increase power to detect early bursts of trait evolution. Systematic Biology.

Freckleton RP and PH Harvey (2006) Detecting non-brownian evolution in adaptive radiations. PLoS Biology 4:e373.

See Also

pp.mcmc, pic

Examples

1
2
3
4
5
6
7
8
data(whales)

tmp <- treedata(whales$phy, whales$dat[,1])

phy <- tmp$phy
dat <- tmp$data[,1]

nh.test(phy, dat, regression.type="lm", show.plot=TRUE)


Search within the geiger package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.