macro_pred: Macroevolutionary predictions

Description Usage Arguments Details Value Author(s) Examples

View source: R/macro_pred.R

Description

macro_pred Macroevolutionary predictions

Usage

1
macro_pred(y, V, useLFO = TRUE)

Arguments

y

vector of species means

V

phylogenetic variance matrix, must have same order as y

useLFO

excludes the focal species when calculating the corresponding species' mean. The correct way is to use TRUE, but in practice it has little effect and FALSE will speed up the model fit.

Details

macro_pred Gives a vector of macroevolutionary predictions for each species based on the other species given the phylogeny and a phylogenetic variance matrix.

Value

macro_pred returns a of macroevolutionary predictions at the tips.

Author(s)

Geir H. Bolstad

Examples

1
2
3
4
5
6
7
8
# Trait values
y <- rnorm(3)

# A variance matrix (the diagonal must be the same order as y).
V <- matrix(c(1.0, 0.5, 0.2, 0.5, 1.0, 0.4, 0.2, 0.4, 1.0), ncol = 3)

# Macroevolutionary predictions (output in the same order as y).
macro_pred(y, V)

evolvability documentation built on Dec. 11, 2021, 9:34 a.m.