This experimental helper function calculates probability from
proportionality. When supplying one propr
object,
prop2prob
estimates the probability that
each proportionality coefficient occurred by chance alone.
When supplying two propr
objects, prop2prob
estimates the probability that each proportionality
coefficient differs between the two objects.
prop2prob(x, y, method = "bonferroni", prompt = TRUE)
A propr
object.
A propr
object. Optional.
A character string. Selects method used to
adjust p-values for multiple comparisons. Argument
passed to p.adjust
. Defaults to the
more conservative Bonferroni correction.
A logical scalar. Set to FALSE
to disable
the courtesy prompt when working with big data.
Returns a data.table
of p-values.
All calculations use formulae derived for the concordance correlation coefficient under the constraint that all means equal zero. We defend this constraint on the grounds that we can shift the mean of log-ratio transformed feature vectors without changing the proportionality coefficient, rho, or Pearson's correlation coefficient, r. We refer the reader to Zar's Biostatistical Analysis text (4ed, pg 407-10) for more information on the method used.
When calculating differential proportionality, it is the
responsibility of the user to ensure that the two groups
have no overlapping samples. All p-values returned as
twice the result of pnorm
, thereby correcting
for "two-tails". Please make sure to interpret p-values
in the context of multiple testing! For more information,
see p.adjust
.
# NOT RUN {
library(propr)
data(mail)
rho <- perb(mail)
prop2prob(rho)
# }
Run the code above in your browser using DataLab