get.aligned.function.data: Estimate aligned data for function-valued traits

Description Usage Arguments Value Author(s) References Examples

View source: R/phylocurve.R

Description

Estiamtes function data for tip species curves from tip coefficients.

Usage

1
get.aligned.function.data(tip.coefficients, ylength, ymin = 0.01, ymax = 0.99)

Arguments

tip.coefficients

Matrix of estimated regression coefficients of tip curves. Row names should correspond to species names. The first column should contain the logit glm intercept; the second column contains the logit glm slope.

ylength

How many landmarks (points on the curve) to evaluate.

ymin

Because 0 and 1 are undefined for inverse logit functions, the minimum and maximum values are defaulted to .01 and .99. Can be adjusted as needed.

ymax

Because 0 and 1 are undefined for inverse logit functions, the minimum and maximum values are defaulted to .01 and .99. Can be adjusted as needed.

Value

A data frame of aligned X-coordinates for function-valued traits for a given constant Y.

Author(s)

Eric W. Goolsby

References

Goolsby, E.W. 2015. "Phylogenetic comparative methods for evaluating the evolutionary history of function-valued traits." Systematic Biology. In press.

Examples

1
2
3
4
5
6
7
8
9
# simulate evolution of a function-valued trait (glm with logit link)
sim_data <- sim.curves()

# get tip coefficients and aligned function data
tip.coefficients <- get.tip.coefficients(formula = y~x,tree = sim_data$tree,data = sim_data$data)
data <- get.aligned.function.data(tip.coefficients)

# estimate evolutionary rates
evo.model.fitted <- evo.model(sim_data$tree,data)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

phylocurve documentation built on Dec. 16, 2019, 1:35 a.m.