reparameterise_phylogenetic_ou: Reparameterise phylogenetic Ornstein-Uhlenbeck

View source: R/reparameterise_phylogenetic_ou.R

reparameterise_phylogenetic_ouR Documentation

Reparameterise phylogenetic Ornstein-Uhlenbeck

Description

Reparameterise a phylogenetic OU process as a Gauss-Markov process over a phylogeny.

Usage

reparameterise_phylogenetic_ou(
  phy,
  heritable_amplitude = 1,
  length_scale = 2,
  environmental_amplitude = 0,
  perform_checks = TRUE
)

Arguments

phy

An object of class "phylo".

heritable_amplitude

A positive real-valued scalar. The amplitude of the phylogenetic OU process. Note that this is the square root of the variance and so should be thought of as a standard deviation parameter.

length_scale

A positive real number. The length-scale of the Ornstein-Uhlenbeck process.

environmental_amplitude

A positive real-valued scalar. The amplitude of non-phylogenetic variation in the traits of extant taxa. N Note that this is the square root of the variance and so should be thought of as a standard deviation parameter.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

A 2n - 1 \times 2 matrix of positive real values, where n the the number of terminal nodes on a bifurcating tree. The first column is the weight of the parent node to the expected value, while the second is the conditional standard deviation given the parent.

Examples

S <- 100
tr <- ape::rtree(S)
par <- reparameterise_phylogenetic_ou(tr)

jpmeagher/vbar documentation built on Nov. 22, 2022, 5:48 a.m.