Two sets of Principal Coordinates are superimposed by Procrustes superimposition. The sum of squared residuals of this superimposition give an indication of how congruent the two datasets are. For example, in a biological system the two sets of Principal Coordinates can be composed from the phylogenetic distance matrices of two interacting groups. The congruence measured by PACo indicates how concordant the two phylogenies are based on observed ecological interactions between them.
PACo(
D,
nperm = 1000,
seed = NA,
method = "r0",
symmetric = FALSE,
proc.warnings = TRUE,
shuffled = FALSE
)
A list of class paco
as returned by paco::add_pcoord
which includes Principal Coordinates for both phylogenetic distance matrices.
The number of permutations to run. In each permutation, the network is randomized following the method
argument and phylogenetic congruence between phylogenies is reassessed.
An integer with which to begin the randomizations. If the same seed is used the randomizations will be the same and results reproducible. If NA
a random seed is chosen.
The method with which to permute association matrices: "r0", "r1", "r2", "c0", "swap", "quasiswap", "backtrack", "tswap", "r00". Briefly, "r00" produces the least conservative null model as it only maintains total fill (i.e., total number of interactions). "r0" and "c0" maintain the row sums and column sums, respectively, as well as the total number of interactions. "backtracking" and any of the "swap" algorithms conserve the total number of interactions in the matrix, as well as both row and column sums. Finally, "r1" and "r2" conserve the row sums, the total number of interactions, and randomize based on observed interaction frequency. See vegan::commsim
for more details.
Logical. Whether or not to use the symmetric Procrustes statistic, or not. When TRUE
, the symmetric statistic is used. When FALSE
, the asymmetric is used. A decision on which to use is based on whether one group is assumed to track the evolution of the other, or not.
Logical. Make any warnings from the Procrustes superimposition callable. If TRUE
, any warnings are viewable with the warnings()
command. If FALSE
, warnings are internally suppressed. Default is TRUE
Logical. Return the Procrustes sum of squared residuals for every permutation of the network. When TRUE
, the Procrustes statistic of all permutations is returned as a vector. When FALSE
, they are not returned.
A paco
object that now includes (alongside the Principal Coordinates and input distance matrices) the PACo sum of sqaured residuals, a p-value for this statistic, and the PACo statistics for each randomisation of the network if shuffled=TRUE in the PACo call.
# NOT RUN {
data(gopherlice)
require(ape)
gdist <- cophenetic(gophertree)
ldist <- cophenetic(licetree)
D <- prepare_paco_data(gdist, ldist, gl_links)
D <- add_pcoord(D)
D <- PACo(D, nperm=10, seed=42, method="r0")
print(D$gof)
# }
Run the code above in your browser using DataLab