sig_sq {nichevol}R Documentation

Helper function to get sigma squared values for a given dataset

Description

Sigma squared values for a single niche summary statistic are calculated using fitContinuous.

Usage

sig_sq(tree_data, model = "BM")

Arguments

tree_data

a list of two elements (phy and data) resulted from using the function treedata. NOTE: data must be a single vector (i.e., a single column).

model

model to fit to comparative data; see fitContinuous. Default = "BM".

Value

the sigma squared value (evolutionary rate) for the data, given the tree.

Examples

# a simple tree
data("tree5", package = "nichevol")

# simple data
data <- rnorm(n = length(tree5$tip.label))
names(data) <- tree5$tip.label
# tree with data
treeWdata <- geiger::treedata(tree5, data)

# Estimating sigma squared for the dataset
sig_sq(treeWdata)

[Package nichevol version 0.1.20 Index]