prob_statistic {Rtapas} | R Documentation |
Frequencies of the associations for the posterior probability trees
Description
Computes frequencies (or residual/corrected frequencies) of the
host-symbiont associations for pairs (H and S) of posterior probability
trees from the statistics generatedwith GD
(Geodesic Distances),
PACo
(PACo) or ParaFit
(ParaFit).
Usage
prob_statistic(
ths,
HS,
mTreeH,
mTreeS,
freqfun = "paco",
fx,
percentile = 0.01,
correction = "none",
symmetric = FALSE,
ei.correct = "none",
algm = "maxcong",
proc.warns = FALSE,
strat = "sequential",
cl = 1
)
Arguments
ths |
List of trimmed matrices produced by
|
HS |
Host-Symbiont association matrix. |
mTreeH |
Number of posterior-probability trees of host. |
mTreeS |
Number of posterior-probability trees of symbiont. |
freqfun |
The global-fit method to compute using the
posterior probability trees. Options are |
fx |
Vector of statistics produced with
|
percentile |
Percentile to evaluate (p). Default is
|
correction |
Correction to be assumed. The default value is
|
symmetric |
Specifies the type of Procrustes superimposition. Default
is |
ei.correct |
Specifies how to correct potential negative eigenvalues
from the conversion of phylogenetic distances into Principal
Coordinates: |
algm |
Only required if |
proc.warns |
Switches on/off trivial warnings returned when treeH and
treeS differ in size (number of tips). Default is |
strat |
Flag indicating whether execution is to be |
cl |
Number of cluster to be used for parallel computing.
|
Value
A matrix with the value of the statistics for each of the probability trees.
Examples
data("nuc_cp")
N = 10 #for the example, we recommend 1e+4 value
n = 15
# Maximizing congruence (not run)
NPc <- max_cong(np_matrix, NUCtr, CPtr, n, N, method = "paco",
symmetric = FALSE, ei.correct = "sqrt.D",
percentile = 0.01, strat = "parallel", cl = 8)
THSc <- trimHS_maxC(N, np_matrix, n)
pp_treesPACOo_cong <- prob_statistic(THSc, np_matrix, NUC_500tr[1:10],
CP_500tr[1:10], freqfun = "paco", NPc,
percentile = 0.01, correction = "none",
algm = "maxcong", symmetric = FALSE,
ei.correct = "sqrt.D",
strat = "parallel", cl = 8)
# Maximizing incongruence
NPi <- max_incong(np_matrix, NUCtr, CPtr, n, N, method = "paco",
symmetric = FALSE, ei.correct = "sqrt.D",
percentile = 0.99, diff.fq = TRUE)
THSi <- trimHS_maxI(N, np_matrix, n)
pp_treesPACOo_incong <- prob_statistic(THSi, np_matrix, NUC_500tr[1:5],
CP_500tr[1:5], freqfun = "paco", NPi,
percentile = 0.99, correction = "diff.fq",
symmetric = FALSE, ei.correct = "sqrt.D",
strat = "parallel", cl = 8)