make_prior_pephylo: Anagenetic and cladogenetic rate priors for PEPHYLO

Description Usage Arguments Value Note Author(s)

View source: R/make_prior_pephylo.R

Description

This function writes a table with prior rates of anagenetic and cladogenetic evolution. The prior for sa2 is calculated by dividing interspecific variance for each dependent variable by the age of the clade. The prior for sc2 is calculated by dividing the same interspecfic variance by the number of species. Saves an output file with four colums filled with zeros (unwanted parameters), plus two columns with sa2 and sc2 rate priors. One row per dependent variable.

Usage

1
make_prior_pephylo(meantraits, age, outpath)

Arguments

meantraits

A matrix or data frame with mean traits for each species (rows), for each dependent variable (columns).

age

The age of the clade (in Myr).

outpath

A string. The path to the folder where the output file is to be saved.

Value

Returns 1 if succeeds. Saves the output file into the specified folder.

Note

The amount of evolutionary change along a branch in a phylogeny is assumed to be normally distributed with mean zero and variance sa2 t + sc2 S, with t the age of the clade and S the number of speciation events. sa2 represents the rate of change expected over 1 Myr. sc2 represents the rate of change upon speciation e.g. change with mean zero and variance sc2 upon speciation.

Author(s)

Raphael Scherrer


rscherrer/bop documentation built on May 22, 2019, 3:54 p.m.