]> git.donarmstrong.com Git - ape.git/commitdiff
some updates (including new CADM.global.Rd file)
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Mon, 27 Jun 2011 09:18:33 +0000 (09:18 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Mon, 27 Jun 2011 09:18:33 +0000 (09:18 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@163 6e262413-ae40-0410-9e79-b911bd7a66b7

NEWS
R/PGLS.R
man/CADM.global.Rd

diff --git a/NEWS b/NEWS
index 2a2601eed63c5c5303ef39cc0153505399129d6a..a3aa8c97e7ab0d49d29f6711b1a41ed6b5b5a812 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,8 @@ BUG FIXES
 
     o Simulation of OU process with rTraitCont() did not work correctly.
       This now uses formula from Gillespie (1996) reduced to a BM
-      process when alpha = 0 avoiding division by zero.
+      process when alpha = 0 to avoid division by zero. The option
+      'linear' has been removed.
 
 
 
index 510f4017ebb857a51eaba2275d45c3c329deac3f..6b6f4afe05408b8a1885f2ac76aa904edf319234 100644 (file)
--- a/R/PGLS.R
+++ b/R/PGLS.R
@@ -187,8 +187,8 @@ coef.corGrafen <- function(object, unconstrained = TRUE, ...)
 
 compute.brlen <- function(phy, method = "Grafen", power = 1, ...)
 {
-    if (!"phylo" %in% class(phy))
-      stop('object "phy" is not of class "phylo"')
+    if (!inherits(phy, "phylo"))
+        stop('object "phy" is not of class "phylo"')
     Ntip <- length(phy$tip.label)
     Nnode <- phy$Nnode
     Nedge <- dim(phy$edge)[1]
index b6ebddc064844303d5cb0ba2e3970d73cf7572ca..05bf426f42469e478f7461007f6e719e4b0adad5 100644 (file)
@@ -56,7 +56,7 @@ The Bonferonni correction is:
 \code{CADM.post} produces a table stored in element \code{A_posteriori_tests}, containing Mantel.mean, Prob, and Corrected.prob statistics in rows; the columns correspond to the k distance matrices under study, labeled Dmat.1 to Dmat.k.
 If parameter \code{mantel} is TRUE, tables of Mantel statistics and P-values are computed among the matrices.
 
-  \item{W }{Kendall's coefficient of concordance, W (Kendall and Babington Smith 1939). }
+  \item{W }{Kendall's coefficient of concordance, W (Kendall and Babington Smith 1939; see also Legendre 2010). }
   \item{Chi2 }{Friedman's chi-square statistic (Friedman 1937) used in the permutation test of W. }
   \item{Prob.perm }{Permutational probability. }
 
@@ -69,9 +69,9 @@ If parameter \code{mantel} is TRUE, tables of Mantel statistics and P-values are
 }
 
 \references{ 
-Campbell, V., P. Legendre and F.-J. Lapointe. 2009. Assessing congruence among ultrametric distance matrices. Journal of Classification (In press).
+Campbell, V., P. Legendre and F.-J. Lapointe. 2009. Assessing congruence among ultrametric distance matrices. Journal of Classification 26: 103-117.
 
-Campbell, V., P. Legendre and F.-J. Lapointe. Performance of the congruence test among distance matrices in phylogenetic analysis. (Submitted MS).
+Campbell, V., P. Legendre and F.-J. Lapointe. 2011. The performance of the Congruence Among Distance Matrices (CADM) test in phylogenetic analysis. BMC Evolutionary Biology 11: 64. http://www.biomedcentral.com/1471-2148/11/64.
 
 Friedman, M. 1937. The use of ranks to avoid the assumption of normality implicit in the analysis of variance. Journal of the American Statistical Association 32: 675-701.
 
@@ -79,7 +79,7 @@ Kendall, M. G. and B. Babington Smith. 1939. The problem of m rankings. Annals o
 
 Lapointe, F.-J., J. A. W. Kirsch and J. M. Hutcheon. 1999. Total evidence, consensus, and bat phylogeny: a distance-based approach. Molecular Phylogenetics and Evolution 11: 55-66.
 
-Legendre, P. 2008. Coefficient of concordance. In: Encyclopedia of Research Design. SAGE Publications (in press).
+Legendre, P. 2010. Coefficient of concordance. Pp. 164-169 in: Encyclopedia of Research Design, Vol. 1. N. J. Salkind, ed. SAGE Publications, Inc., Los Angeles. 
 
 Legendre, P. and F.-J. Lapointe. 2004. Assessing congruence among distance matrices: single malt Scotch whiskies revisited. Australian and New Zealand Journal of Statistics 46: 615-629. 
 
@@ -97,27 +97,39 @@ Siegel, S. and N. J. Castellan, Jr. 1988. Nonparametric statistics for the behav
 # identical evolutionary parameters (GTR+ Gamma + I). Distance matrices were 
 # computed from the DNA sequence matrices using a p distance corrected with the 
 # same parameters as those used to simulate the DNA sequences. See Campbell et 
-# al. (submitted) for details. 
+# al. (2009) for details.
 
-# First example: five independent additive trees. Data provided by V. Campbell.
+# Example 1: five independent additive trees. Data provided by V. Campbell.
 
 data(mat5Mrand)
 res.global <- CADM.global(mat5Mrand, 5, 50)
 
-# Second example: three partly similar trees, two independent trees. 
+# Example 2: three partly similar trees, two independent trees. 
 # Data provided by V. Campbell.
 
 data(mat5M3ID)
 res.global <- CADM.global(mat5M3ID, 5, 50)
 res.post   <- CADM.post(mat5M3ID, 5, 50, mantel=TRUE)
 
-# Third example: three matrices respectively representing Serological 
+# Example 3: three matrices respectively representing Serological 
 # (asymmetric), DNA hybridization (asymmetric) and Anatomical (symmetric) 
 # distances among 9 families. Data from Lapointe et al. (1999).
 
 data(mat3)
 res.global <- CADM.global(mat3, 3, 9, nperm=999)
 res.post   <- CADM.post(mat3, 3, 9, nperm=999, mantel=TRUE)
+
+# Example 4, showing how to bind two D matrices (cophenetic matrices
+# in this example) into a file using rbind(), then run the global test.
+
+a <- rtree(5)
+b <- rtree(5)
+A <- cophenetic(a)
+B <- cophenetic(b)
+x <- rownames(A)
+B <- B[x, x]
+M <- rbind(A, B)
+CADM.global(M, 2, 5)
 }
 
 \keyword{ multivariate }