linkf_CI {Rtapas} | R Documentation |
Confidence intervals for the frequency of host-symbiont association
Description
From the matrix obtained in prob_statistic()
,
compute the confidence intervals for the frequencies (or residual/corrected
frequencies) of the host-symbiont associations using a set of pairs of
posterior probability trees of host and symbiont.
Usage
linkf_CI(
freqfun = "paco",
x,
fx,
c.level = 95,
barplot = TRUE,
col.bar = "lightblue",
col.ci = "darkblue",
y.lim = NULL,
...
)
Arguments
freqfun |
Global-fit method. Options are |
x |
Matrix produced with |
fx |
Vector of statistics produced with
|
c.level |
Confidence interval level. Default is |
barplot |
Default is |
col.bar |
A vector of colors for the bars or bar components.
By default, |
col.ci |
A vector of colors for the confidence intervals arrows.
By default, |
y.lim |
Limits for the y axis. |
... |
Any graphical option admissible in
|
Value
A dataframe with associations information (columns 1 and 2), the observed value of the frequencies for these associations (column 3), the mean, the minimum and the maximum value of the frequencies (columns 4, 5 and 6) obtained with the sets of posterior probability trees.
Examples
data(nuc_cp)
N = 10 #for the example, we recommend 1e+4 value
n = 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,
strat = "parallel", cl = 8)
# Loaded directly from dataset
# THSi <- trimHS_maxI(N, np_matrix, n)
# pp_treesPACo_incong <- prob_statistic(ths = THSi, np_matrix,
# NUC_500tr[1:5], CP_500tr[1:5], freqfun = "paco",
# NPi, symmetric = FALSE, ei.correct = "sqrt.D",
# percentile = 0.99, diff.fq = TRUE, res.fq = FALSE,
# below.p = FALSE, strat = "parallel", cl = 8)
LFci <- linkf_CI (freqfun = "paco", x = pp_treesPACo_incong, fx = NPi,
c.level = 95, ylab = "Observed - Expected frequency")