combine_results {keyperm} | R Documentation |
Combine results of permutation test for keyness
Description
Combine results of two runs of keyperm()
with
output = "counts"
, possibly with different subsets of terms.
Usage
combine_results(results_1, results_2)
Arguments
results_1 |
Results from permutation test.
Must be of class |
results_2 |
Results from permutation test.
Must be of class |
Details
Results of two runs of keyperm()
with output = "counts"
, i.e. objects of
type keyperm_results_counts
using can be combined
using combine_results()
. For this to make sense, scoretype
needs to be
the same in both results, but terms in both objects need not be the same.
There are at least two important uses of the function:
Parallelization: keyperm()
is run several times with the same parameters
on different cores, using parallel::mclapply()
or a similar function.
Screening runs: keyperm()
is first run using a small to medium number of permutations,
but considering all terms. Terms with p-values clearly exceeding some reasonable
significance threshold are then excluded, and keyperm()
is run a second time with a
(preferably) large number of permutations but using only the remaining terms. The results of
both runs can then be combined into one object. The rationale behind this approach is that
in many cases small p-values need to be determined with much greater accurary than larger ones
far away from significance, especially if a correction for multiple testing is to be applied
or the p-values are used for ranking (although they should not...).
Value
An object of class keyperm_results_counts