variance.phylog: The phylogenetic ANOVA

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function performs the variance analysis of a trait on eigenvectors associated to a phylogenetic tree.

Usage

1
2
variance.phylog(phylog, z, bynames = TRUE,
 na.action = c("fail", "mean"))

Arguments

phylog

: an object of class phylog

z

: a numeric vector of the values corresponding to the variable

bynames

: if TRUE checks if z labels are the same as phylog leaves label, possibly in a different order. If FALSE the check is not made and z labels must be in the same order than phylog leaves label

na.action

: if 'fail' stops the execution of the current expression when z contains any missing value. If 'mean' replaces any missing values by mean(z)

Details

phylog$Amat defines a set of orthonormal vectors associated the each nodes of the phylogenetic tree.
phylog$Adim defines the dimension of the subspace A defined by the first phylog$Adim vectors of phylog$Amat that corresponds to phylogenetic inertia.
variance.phylog performs the linear regression of z on A.

Value

Returns a list containing

lm

: an object of class lm that corresponds to the linear regression of z on A.

anova

: an object of class anova that corresponds to the anova of the precedent model.

smry

: an object of class anova that is a summary of the precedent object.

Author(s)

Sébastien Ollier sebastien.ollier@u-psud.fr
Daniel Chessel

References

Grafen, A. (1989) The phylogenetic regression. Philosophical Transactions of the Royal Society London B, 326, 119–156.

Diniz-Filho, J. A. F., Sant'Ana, C.E.R. and Bini, L.M. (1998) An eigenvector method for estimating phylogenetic inertia. Evolution, 52, 1247–1262.

See Also

phylog, lm

Examples

1
2
3
4
5
6
7
8
data(njplot)
njplot.phy <- newick2phylog(njplot$tre)
variance.phylog(njplot.phy,njplot$tauxcg)
par(mfrow = c(1,2))
table.phylog(njplot.phy$Ascores, njplot.phy, clabel.row = 0,
 clabel.col = 0.1, clabel.nod = 0.6, csize = 1)
dotchart.phylog(njplot.phy, njplot$tauxcg, clabel.nodes = 0.6)
orthogram(njplot$tauxcg, njplot.phy$Ascores)

Example output

$lm

Call:
lm(formula = fmla, data = df)

Coefficients:
(Intercept)           A1           A2           A3           A4           A5  
 -4.559e-16    2.884e-01    3.291e-01   -1.967e-02    4.661e-02    3.326e-01  
         A6           A7           A8           A9          A10          A11  
  9.722e-02   -4.594e-01    5.077e-02   -2.489e-01    3.056e-01    2.126e-01  
        A12          A13  
 -1.691e-01   -1.293e-01  


$anova
Analysis of Variance Table

Response: z
          Df Sum Sq Mean Sq F value    Pr(>F)    
A1         1 2.9935  2.9935  9.2111  0.006080 ** 
A2         1 3.8986  3.8986 11.9960  0.002209 ** 
A3         1 0.0139  0.0139  0.0429  0.837899    
A4         1 0.0782  0.0782  0.2407  0.628576    
A5         1 3.9834  3.9834 12.2569  0.002019 ** 
A6         1 0.3402  0.3402  1.0469  0.317332    
A7         1 7.5986  7.5986 23.3809 7.855e-05 ***
A8         1 0.0928  0.0928  0.2855  0.598470    
A9         1 2.2304  2.2304  6.8630  0.015646 *  
A10        1 3.3618  3.3618 10.3442  0.003977 ** 
A11        1 1.6270  1.6270  5.0064  0.035705 *  
A12        1 1.0293  1.0293  3.1673  0.088946 .  
A13        1 0.6023  0.6023  1.8532  0.187190    
Residuals 22 7.1498  0.3250                      
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

$sumry
             Df  Sum Sq Mean Sq F value    Pr(>F)    
Phylogenetic 13 27.8502 2.14232  6.5919 6.188e-05 ***
Residuals    22  7.1498 0.32499                      
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

class: krandtest lightkrandtest 
Monte-Carlo tests
Call: orthogram(x = njplot$tauxcg, orthobas = njplot.phy$Ascores)

Number of tests:   4 

Adjustment method for multiple comparisons:   none 
Permutation number:   999 
   Test        Obs    Std.Obs     Alter Pvalue
1 R2Max  0.2171031  0.9393766   greater  0.177
2 SkR2k 10.1048491 -3.3787036      less  0.002
3  Dmax  0.4356543  4.1977680 two-sided  0.001
4   SCE  2.4202208  7.2023896   greater  0.002

Warning message:
This function is now deprecated. Please use the fuction 'orthogram' in adephylo. 

ade4 documentation built on May 2, 2019, 5:50 p.m.

Related to variance.phylog in ade4...