[Picante-commits] r122 - branches/gsoc/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 25 09:18:59 CEST 2008


Author: mrhelmus
Date: 2008-06-25 09:18:59 +0200 (Wed, 25 Jun 2008)
New Revision: 122

Added:
   branches/gsoc/man/phylostruct.Rd
Modified:
   branches/gsoc/man/sppregs.Rd
Log:
Documentation for sppregs and phylostruct

Added: branches/gsoc/man/phylostruct.Rd
===================================================================
--- branches/gsoc/man/phylostruct.Rd	                        (rev 0)
+++ branches/gsoc/man/phylostruct.Rd	2008-06-25 07:18:59 UTC (rev 122)
@@ -0,0 +1,46 @@
+\name{phylostruct}
+\alias{phylostruct}
+\title{ Permutations to Test for Phylogenetic Signal in Community Composition }
+\description{ Randomize sample/community data matrices to create null distributions of given metrics
+}
+\usage{
+phylostruct(samp, tree, env=NULL, metric=c("psv","psr","pse","psc","sppregs"), null.model=c("frequency","richness","both"),
+            runs=10, alpha=0.05, fam="binomial")
+}
+\arguments{
+  \item{samp}{ community data matrix, species as columns, communities as rows }
+  \item{tree}{ phylo tree object or a phylogenetic covariance matrix }
+  \item{env}{ environmental data matrix }
+  \item{metric}{ if \code{metric="psv"}, \code{"psr"}, \code{"pse"}, or \code{"psc"} compares the observed mean of the respective metric to a null distribution at a given alpha; if \code{metric="sppregs"} compares the three correlations produced by \code{\link{sppregs}} to null distributions }
+  \item{null.model}{ permutation procedure used to create the null distribution, see \code{\link{randomizeSample}}}
+  \item{runs}{ the number of permutations to create the distribution, a rule of thumb is (number of communities)/alpha  }
+  \item{alpha}{ probability value to compare the observed mean/correlations to a null distribution }
+  \item{fam}{ as in \code{\link{sppregs}} }
+}
+
+\details{The function creates null distributions for the \code{\link{psd}} set of metrics and for the correlations of \code{\link{sppregs}} from observed community data sets.}
+
+\value{
+\item{metric}{ metric used }
+\item{null.model}{ permutation used }
+\item{runs}{ number of permutations }
+\item{obs}{ observed mean value of a particular metric or the three observed correlations from \code{\link{sppregs}} }
+\item{mean.null}{ mean(s) of the null distribution(s) }
+\item{quantiles.null}{  quantiles of the null distribution(s) to compare to \code{obs}; determined by \code{alpha}}
+\item{phylo.structure}{ if \code{obs} less than (alpha/2), \code{phylo.structure="underdispersed"}; if \code{obs} greater than (1-alpha/2), \code{phylo.structure="overdispersed"}; otherwise \code{phylo.structure="random"} and NULL if \code{metric="sppregs"}}
+\item{nulls}{ null values of the distribution(s)}
+}
+
+\references{ Helmus M.R., Bland T.J., Williams C.K. & Ives A.R. (2007a) Phylogenetic measures of biodiversity. American Naturalist, 169, E68-E83
+\cr
+\cr
+Helmus M.R., Savage K., Diebel M.W., Maxted J.T. & Ives A.R. (2007b) Separating the determinants of phylogenetic community structure. Ecology Letters, 10, 917-925
+\cr
+\cr
+Gotelli N.J. (2000) Null model analysis of species co-occurrence patterns. Ecology, 81, 2606-2621}
+
+\author{ Matthew Helmus \email{mrhelmus at gmail.com} }
+\seealso{ \code{\link{psd}} ,\code{\link{sppregs}}, \code{\link{randomizeSample}} }
+
+\keyword{univar}
+

Modified: branches/gsoc/man/sppregs.Rd
===================================================================
--- branches/gsoc/man/sppregs.Rd	2008-06-25 04:40:59 UTC (rev 121)
+++ branches/gsoc/man/sppregs.Rd	2008-06-25 07:18:59 UTC (rev 122)
@@ -3,21 +3,21 @@
 \alias{plot.sppregs}
 \title{ Regressions to Separate Phylogenetic Attraction and Repulsion }
 \description{
-  Fit regressions on species abundnace or presence/absence across communities and calculate phylogenetic correlations
+  Fit regressions on species abundance or presence/absence across communities and calculate phylogenetic correlations
 }
 \usage{
-sppregs(samp,env,tree=NULL,fam="binomial")
-plot.sppregs(sppreg,rows=c(1,3),cex.mag=1,x.label="phylogenetic correlations",
-              y.label=c("occurrence correlations w/ env","occurrence correlations wo/ env","change in correlations"))
+sppregs(samp, env, tree=NULL, fam="binomial")
+plot.sppregs(sppreg, rows=c(1,3), cex.mag=1, x.label="phylogenetic correlations", 
+y.label=c("occurrence correlations w/ env","occurrence correlations wo/ env","change in correlations"))
 }
 
 \arguments{
-  \item{samp}{ Community data matrix, species as columns, communities as rows }
-  \item{env}{ Environmental data matrix }
-  \item{tree}{ A phylo tree object or a phylogenetic covariance matrix }
+  \item{samp}{ community data matrix, species as columns, communities as rows }
+  \item{env}{ environmental data matrix }
+  \item{tree}{  phylo tree object or a phylogenetic covariance matrix }
   \item{fam}{ with \code{fam = "binomial"} fit logistic regressions with Firth's bias-reduction; also accepts \code{fam = "gaussian"} }
-  \item{sppreg} { object from function \code{sppregs} }
-  \item{rows}{ either \code{c(1,3)} plots in a row or \code{c(3,1)} in a column }
+  \item{sppreg}{ object from function \code{\link[picante]{sppregs}} }
+  \item{rows}{ \code{rows = c(1,3)} plots in a row; \code{rows = c(3,1)} in a column }
   \item{cex.mag}{ value for \code{cex} in \code{par} }
   \item{x.label}{ x axis labels }
   \item{y.label}{ y axis labels }
@@ -27,32 +27,31 @@
           on the environmental variables supplied in \code{env}; and calculates the \code{(n^2-n)/2} pairwise species correlations
           between the residuals of these fits and pairwise species phylogenetic correlations. The residuals can be
           thought of as the presence/absence of species across sites/communities after accounting for how species respond
-          to environmental variation across sites. Each set of coefficents can be tested for phylogenetic signal with, for example, 
-          the function \link[picante]{phylosignal}. 
+          to environmental variation across sites. Each set of coefficients can be tested for phylogenetic signal with, for example, 
+          the function \code{\link{phylosignal}}. 
           \cr
           \cr
           The function \code{plot.sppregs} produces a set of three plots of the correlations of pairwise species phylogenetic correlations versus: 
-          the observed pairwise correlations of species across communities, the residual correlations, and the pariwise differences between (i.e., the 
+          the observed pairwise correlations of species across communities, the residual correlations, and the pairwise differences between (i.e., the 
           change in species co-occurrence once the environmental variables are taken into account). The significance of these correlations can be tested
-          via permutation with the function \code{significance}.
+          via permutation with the function \code{\link{phylostruct}}.
 }
+\note{The function requires the library \code{brglm}}
           
 \value{
-\item{family}{ error distribution used }
-\item{residuals}{ a dataframe of the residuals from each species regression }
-\item{coefficients}{ a dataframe of the estimated coefficients from each species regression that can be tested for phylogenetic signal }
+\item{family}{ the regression error distribution }
+\item{residuals}{ the residuals from each species regression }
+\item{coefficients}{ the estimated coefficients from each species regression }
 \item{std.errors}{ the standard errors of the coefficients }
-\item{correlations}{ correlations of pairwise species phylogenetic correlations between: the observed pairwise correlations of species across communities,
-                    the residual correlations, and the pariwise differences between  }
+\item{correlations}{ correlations of pairwise species phylogenetic correlations between: the observed pairwise correlations of species across communities, the residual correlations, and the pairwise differences between the two }
 \item{cors.pa}{ the observed pairwise correlations of species across communities }
 \item{cors.resid}{ the residual pairwise correlations of species across communities }
 \item{cors.phylo}{ the phylogenetic pairwise correlations among species }
-
 }
 
 \references{ Helmus M.R., Savage K., Diebel M.W., Maxted J.T. & Ives A.R. (2007) Separating the determinants of phylogenetic community structure. Ecology Letters, 10, 917-925 }
 \author{ Matthew Helmus \email{mrhelmus at gmail.com} }
-\seealso{ \code{\link{significance}}, \code{\link{phylosignal}}}
+\seealso{\code{\link{phylostruct}}, \code{\link{phylosignal}}}
+\keyword{univar}
 
-}
 



More information about the Picante-commits mailing list