pic_stat_sasr: Relationship between contrasts and inferred ancestral state

View source: R/summary-stats.R

pic_stat_sasrR Documentation

Relationship between contrasts and inferred ancestral state

Description

Fits a linear model between the absolute value of the contrasts and the ancestral state inferred at the node at which the contrast was calculated

Usage

pic_stat_sasr(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 inferred ancestral state at the node at which the contrasts were calculated. It is used to evaluate whether the model is adequately capturing variation relative to ancestral state. The ancestral states are calculated using the contrast based approach and are not technically ancestral state estimates (see Felsenstein 1985 – American Naturalist); this is conceptually and statistically different from the maximum likelihood approach to reconstructing ancestral states. The contrast based approach is used here as there is a clear expectation of the relationship between the the contrasts and trait value. If the model is adequate, we expect there not to be a relationship between the contrasts and their node height (i.e. slope ~ 0).

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_sasr_plot.

Value

s.asr the estimated slope parameter

See Also

calculate_pic_stat, default_pic_stat, pic_stat_sasr_plot, lm, ace

Examples

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

## estimate slope
pic_stat_sasr(unit.tree)

## visualization
pic_stat_sasr_plot(unit.tree)


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