How to obtain P and F values in the program 2MOD

Recently, someone asked me how to get the P and F value in the 2MOD software. 2MOD is a program to estimate the relative likelihoods of a model of immigration-drift equilibrium versus drift since a certain time. In fact, in the readme file, these values have been explained clearly.

For P value, when MCMC procedure completed, throwed out the first burn-in samples, and summaried the total number of 1 or 0 in Excel,  the ratio of the number of 1 (or 0) divided by the total number of iterations (without burn-in) is the corresponding P value to each model seperately.

For F value, in fact similar to the Fst, can be found at the last line of the output file of “state”. Moreover, the Bayes factor can be gotten with the ratio of P (gene flow) / P (drift).