pic_stat_shgt: Relationship between contrasts and node height

View source: R/summary-stats.R

pic_stat_shgtR Documentation

Relationship between contrasts and node height

Description

Fits a linear model between the absolute value of the contrasts and the node height at which they were calculated

Usage

pic_stat_shgt(unit.tree)

Arguments

unit.tree

a unit.tree object

Details

This test statistic is the estimate of the slope from fitting a linear model between the contrasts and the node height (i.e. tree depth) at which they were calculated. It is used to evaluate whether the model is adequately capturing variation relative to tree depth. If the model is adequate, we expect there not to be a relationship between the contrasts and their node height (i.e. slope ~ 0). Note that the node heights being used here are the absolute node ages from the original phylogeny and not the adjusted node ages obtained from computing contrasts (see pic).

The slope of the contrasts and their variances is included as a default test statistic in the function calculate_pic_stat.

The test statistic computed from a single unit.tree can be visualized with the function pic_stat_svar_plot.

Value

s.hgt the estimated slope parameter

See Also

calculate_pic_stat, default_pic_stat, pic_stat_svar_plot, lm

Examples

data(finch)
phy <- finch$phy
dat <- finch$data[,"wingL"]
unit.tree <- make_unit_tree(phy, data=dat)

## estimate slope
pic_stat_shgt(unit.tree)

## visualizaiton
pic_stat_shgt_plot(unit.tree)


mwpennell/arbutus documentation built on Oct. 6, 2022, 10 a.m.