I've been using fgsea to run some enrichment analysis and one of the outputs from `fgsea()` is *nMoreExtreme*.

I've seen from the vignette that the *nMoreExtreme* is:

> a number of times a random gene set had a more extreme enrichment score value

I was wondering what this actually means?

Like what is a random gene set? Is it just a random selection of genes? But then would nMoreExtreme be different every time fgsea is run?

Is it another measure of how reliable the enrichment analysis is?

I am guessing that a value of 0 or 1 is good? And a value of a few thousand is bad?

Could I use it alongside a padj value to determine if the results are significant or is it not as important as padj?

Thanks in advance.
GSEA P-values are empirically calculated by sampling random gene sets. `nMoreExtreme` is indeed a number of times a random gene set had a more extreme enrichment score value and is used in nominal GSEA P-value calculation, which is equal `nMoreExtreme` normalized by number of random gene sets that have the same sign of enrichment score. As it's random, it can have different values from run to run. If it's zero it means that the calculated P-value is bounded by the number of permutations, not the real P-value, and the result can be huge overestimation (or not).

These said, in the recent release the algorithm has be changed to fgsea-multilevel, now there are no more `nMoreExtreme` values and the estimation errors are reported explicitly.