# pic.ortho

From ape v2.7-3
0th

Percentile

##### Phylogenetically Independent Orthonormal Contrasts

This function computes the orthonormal contrasts using the method described by Felsenstein (2008). Only a single trait can be analyzed; there can be several observations per species.

Keywords
regression
##### Usage
pic.ortho(x, phy, var.contrasts = FALSE, intra = FALSE)
##### Arguments
x
a numeric vector or a list of numeric vectors.
phy
an object of class "phylo".
var.contrasts
logical, indicates whether the expected variances of the contrasts should be returned (default to FALSE).
intra
logical, whether to return the intraspecific contrasts.
##### Details

The data x can be in two forms: a vector if there is a single observation for each species, or a list whose elements are vectors containing the individual observations for each species. These vectors may be of different lengths.

If x has names, its values are matched to the tip labels of phy, otherwise its values are taken to be in the same order than the tip labels of phy.

##### Value

• either a vector of contrasts, or a two-column matrix with the contrasts in the first column and their expected variances in the second column (if var.contrasts = TRUE). If the tree has node labels, these are used as labels of the returned object.

If intra = TRUE, the attribute "intra", a list of vectors with the intraspecific contrasts or NULL for the species with a one observation, is attached to the returned object.

##### References

Felsenstein, J. (2008) Comparative methods with sampling error and within-species variation: Contrasts revisited and revised. American Naturalist, 171, 713--725.

pic, varCompPhylip

• pic.ortho
##### Examples
tr <- rcoal(30)
### a single observation per species:
x <- rTraitCont(tr)
pic.ortho(x, tr)
pic.ortho(x, tr, TRUE)
### different number of observations per species:
x <- lapply(sample(1:5, 30, TRUE), rnorm)
pic.ortho(x, tr, intra = TRUE)
Documentation reproduced from package ape, version 2.7-3, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.22048918902873993, "perplexity": 5716.9226331530745}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540481281.1/warc/CC-MAIN-20191205164243-20191205192243-00154.warc.gz"}