Added to the dating function p-value calculation