rstemplatematching2: sample p-values such that lower probabilities are tested more thoroughly than higher ones