procD.pgls(f1, phy, iter = 999, int.first = FALSE, RRPP = FALSE,
verbose = FALSE)
read.tree
in library apegpagen
].
The user must also specify a phylogeny describing the evolutionary relationships among species (of class phylo).
Note that the specimen labels for both x and y must match the labels on the tips of the phylogeny.
From the phylogeny, a phylogenetic transformation matrix is obtained under a Brownian motion model, and used to
transform the x and y variables. Next, the Gower-centered distance matrix is obtained from predicted values from the
model (y~x), from which sums-of-squares, F-ratios, and R^2 are estimated for each factor in the model (see Adams, 2014).
Data are then permuted across the tips of the phylogeny, and estimates of statistical values are obtained for the permuted data,
which are compared to the observed value to assess significance.
Two possible resampling procedures are provided. First, if RRPP=FALSE,
the rows of the matrix of shape variables
are randomized relative to the design matrix. This is analogous to a 'full' randomization. Second, if RRPP=TRUE,
a residual randomization permutation procedure is utilized (Collyer et al. 2014). Here, residual shape values from a reduced model are
obtained, and are randomized with respect to the linear model under consideration. These are then added to
predicted values from the remaining effects to obtain pseudo-values from which SS are calculated. NOTE: for
single-factor designs, the two approaches are identical. However, when evaluating factorial models it has been
shown that RRPP attains higher statistical power and thus has greater ability to identify patterns in data should
they be present (see Anderson and terBraak 2003). Effect-sizes (Z-scores) are computed as standard deviates of the sampling
distributions (of F values) generated, which might be more intuitive for P-values than F-values (see Collyer et al. 2014). In the case
that multiple factor or factor-covariate interactions are used in the model formula, one can specify whether all main effects should be
added to the model first, or interactions should precede subsequent main effects
(i.e., Y ~ a + b + c + a:b + ..., or Y ~ a + b + a:b + c + ..., respectively.)### Example of D-PGLS for high-dimensional data
data(plethspecies)
Y.gpa<-gpagen(plethspecies$land) #GPA-alignment
procD.pgls(Y.gpa$coords ~ Y.gpa$Csize,plethspecies$phy,iter=49)
### Example of D-PGLS for high-dimensional data, using RRPP
procD.pgls(Y.gpa$coords ~ Y.gpa$Csize,plethspecies$phy,iter=49,RRPP=TRUE)
Run the code above in your browser using DataLab