]> git.donarmstrong.com Git - ape.git/blob - man/correlogram.formula.Rd
a04ecd528f962a1c205681caf7d2eb339faec788
[ape.git] / man / correlogram.formula.Rd
1 \name{correlogram.formula}
2 \alias{correlogram.formula}
3 \title{Phylogenetic Correlogram}
4 \usage{
5   correlogram.formula(formula, data = NULL, use = "all.obs")
6 }
7 \arguments{
8   \item{formula}{a formula of the type \code{y1+..+yn ~ g1/../gn}, where
9     the \code{y}'s are the data to analyse and the \code{g}'s are the
10     taxonomic levels.}
11   \item{data}{a data frame containing the variables specified in the
12     formula. If \code{NULL}, the variables are sought in the user's
13     workspace.}
14   \item{use}{a character string specifying how to handle missing
15     values (i.e., \code{NA}). This must be one of  "all.obs",
16     "complete.obs", or "pairwise.complete.obs", or any unambiguous
17     abbrevation of these. In the first case, the presence of missing
18     values produces an error. In the second case, all rows with missing
19     values will be removed before computation. In the last case, missing
20     values are removed on a case-by-case basis.}
21 }
22 \description{
23   This function computes a correlogram from taxonomic levels.
24 }
25 \details{
26   See the vignette in R: \code{vignette("MoranI")}.
27 }
28 \value{
29   An object of class \code{correlogram} which is a data frame with three
30   columns:
31
32   \item{obs}{the computed Moran's I}
33   \item{p.values}{the corresponding P-values}
34   \item{labels}{the names of each level}
35
36   or an object of class \code{correlogramList} containing a list of
37   objects of class \code{correlogram} if several variables are given as
38   response in \code{formula}.
39 }
40 \author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr} and
41   Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
42 \seealso{
43   \code{\link{plot.correlogram}, \link{Moran.I}}
44 }
45 \examples{
46 data(carnivora)
47 ### Using the formula interface:
48 co <- correlogram.formula(SW ~ Order/SuperFamily/Family/Genus,
49       data=carnivora)
50 co
51 plot(co)
52 ### Several correlograms on the same plot:
53 cos <- correlogram.formula(SW + FW ~ Order/SuperFamily/Family/Genus,
54       data=carnivora)
55 cos
56 plot(cos)
57 }
58 \keyword{regression}