phyloEmmli: phyloEmmli

Description Usage Arguments Value

Description

Takes landmarks and a phylogeny and then corrects the landmarks for the phylogeny according to one of two methods, and then either returns the corrected landmarks, or calculates the correlation matrix (using dotcorr) and fits EMMLi. Species missing from data or tree are automatically dropped.

Usage

1
phyloEmmli(landmarks, phylo, method = "pgls", EMMLi = FALSE, ...)

Arguments

landmarks

The landmarks. These can be in a 2D format with species as rownames, and x, y, z as columns, or a 3D array with species names in the 3rd ([,,x]) dimension.

phylo

A phylogeny describing the relationship between species in landmarks.

method

Either "pgls" or "ic". If PGLS then corrected data are calculated as the residuals of a phylogenetic least squares regression against 1 (pgls), if IC then independent contrasts (pic).

EMMLi

Logical - if TRUE EMMLi is fit and the results returned as well as the phylogenetically correceted landmarks

...

Extra arguments required for EMMLi (at minimum models, and N_sample)

Value

A 2D or 3D array (depending on input) containing phylogenetically corrected landmarks. If EMMLi = TRUE then the results of the EMMLi model are also returned along with the phylogenetically corrected data in a two element list (data first element, EMMLi output second element).


hferg/EMMLiv2 documentation built on May 28, 2019, 8:55 p.m.