 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 two (fake) Swiss towns                                           
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +                                                                +
 +   POPULATION SIZE, MIGRATION, DIVERGENCE, ASSIGNMENT, HISTORY  +
 +   Bayesian inference using the structured coalescent           +
 +                                                                +
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Using Intel AVX (Advanced Vector Extensions)
  Compiled for a SYMMETRIC multiprocessors (GrandCentral)
  PDF output enabled [Letter-size]
  Version 4.2.8   [June-24-2016]
  Program started at   Tue Aug  2 10:56:58 2016
         finished at Tue Aug  2 10:57:26 2016
                          


Options in use:
---------------

Analysis strategy is BAYESIAN INFERENCE

Proposal distribution:
Parameter group          Proposal type
-----------------------  -------------------
Population size (Theta)  Metropolis sampling
Migration rate      (M)  Metropolis sampling


Prior distribution (Proposal-delta will be tuned to acceptance frequence 0.440000):
Parameter group            Prior type   Minimum    Mean(*)    Maximum    Delta
-------------------------  ------------ ---------- ---------- ---------- ----------
Population size (Theta_1)      Uniform  0.000000   0.050000   0.100000   0.010000 
Population size (Theta_2)      Uniform  0.000000   0.050000   0.100000   0.010000 
Migration 1 to 2 (M)      Uniform  0.000000  500.000000 1000.00000 100.000000




Inheritance scalers in use for Thetas (specified scalars=2)
1.00 0.25 
[Each Theta uses the (true) inheritance scalar of the first locus as a reference]


Pseudo-random number generator: Mersenne-Twister                                
Random number seed (with internal timer)           1010124635

Start parameters:
   First genealogy was started using a random tree
   Start parameter values were generated
Connection matrix:
m = average (average over a group of Thetas or M,
s = symmetric migration M, S = symmetric 4Nm,
0 = zero, and not estimated,
* = migration free to vary, Thetas are on diagonal
d = row population split off column population
D = split and then migration
   1 Aadorf         * 0 
   2 Bern           * * 



Mutation rate is constant for all loci

Markov chain settings:
   Long chains (long-chains):                              1
      Steps sampled (inc*samples*rep):                100000
      Steps recorded (sample*rep):                     20000
   Combining over replicates:                              4
   Static heating scheme
      4 chains with  temperatures
       1.00, 1.50, 3.00,1000000.00
      Swapping interval is 1
   Burn-in per replicate (samples*inc):                25000

Print options:
   Data file:                                  twoswisstowns
   Haplotyping is turned on: YES: report of haplotype probab
   Output file (ASCII text):          outfile-twoswisstowns2
   Output file (PDF):             outfile-twoswisstowns2.pdf
   Posterior distribution:                         bayesfile
   Print data:                                            No
   Print genealogies:                                     No

Summary of data:
Title:                                two (fake) Swiss towns
Data file:                                     twoswisstowns
Datatype:                                     Haplotype data
Number of loci:                                            2
Mutationmodel:
 Locus  Sublocus  Mutationmodel   Mutationmodel parameter
-----------------------------------------------------------------
     1         1 Jukes-Cantor    [Basefreq: =0.25]
     2         1 Jukes-Cantor    [Basefreq: =0.25]


Sites per locus
---------------
Locus    Sites
     1     1000
     2     1000

Site Rate variation per locus
-----------------------------

Locus Sublocus Region type     Rate of change    Probability  Patch size
--------------------------------------------------------------------------
   1       1        1           0.349            0.511            1.000
   1       1        2           1.438            0.431            1.000
   1       1        3           3.425            0.057            1.000
   1       1        4           6.788            0.001            1.000

   2       1        1           0.349            0.511            1.000
   2       1        2           1.438            0.431            1.000
   2       1        3           3.425            0.057            1.000
   2       1        4           6.788            0.001            1.000


Population                   Locus   Gene copies    
----------------------------------------------------
  1 Aadorf                       1        10
  1                              2        10
  2 Bern                         1        10
  2                              2        10
    Total of all populations     1        20
                                 2        20




Bayesian estimates
==================

Locus Parameter        2.5%      25.0%    mode     75.0%   97.5%     median   mean
-----------------------------------------------------------------------------------
    1  Theta_1         0.00000  0.00187  0.00410  0.00693  0.02120  0.00603  0.00803
    1  Theta_2         0.01547  0.03247  0.03697  0.03933  0.05060  0.03450  0.04567
    1  M_1->2          3.33333 24.00000 52.33333 93.33333 242.00000 82.33333 102.04698
    2  Theta_1         0.00000  0.00000  0.00030  0.00107  0.00240  0.00110  0.00032
    2  Theta_2         0.00640  0.01080  0.01343  0.01507  0.02313  0.01423  0.01450
    2  M_1->2         16.00000 48.66667 71.00000 95.33333 153.33333 79.00000 82.52450
  All  Theta_1         0.00000  0.00000  0.00057  0.00280  0.01887  0.00337  0.00419
  All  Theta_2         0.00400  0.01153  0.02190  0.02480  0.05080  0.02203  0.03327
  All  M_1->2         22.00000 45.33333 63.66667 84.66667 122.00000 70.33333 75.22778
-----------------------------------------------------------------------------------
Haplotype states and probabilities
----------------------------------
Locus: 1
Locus: 2




Log-Probability of the data given the model (marginal likelihood = log(P(D|thisModel))
--------------------------------------------------------------------
[Use this value for Bayes factor calculations:
BF = Exp[log(P(D|thisModel) - log(P(D|otherModel)]
shows the support for thisModel]



Locus      Raw Thermodynamic score(1a)  Bezier approximated score(1b)      Harmonic mean(2)
------------------------------------------------------------------------------------------
      1              -2497.94                      -2271.62               -2243.36
      2              -2885.99                      -2550.91               -2472.43
---------------------------------------------------------------------------------------
  All                -5400.54                      -4839.14               -4752.00
[Scaling factor = -16.610112]


(1a) Thermodynamic integration: log(Prob(D|Model)): Good approximation with many temperatures
(1b) Bezier-approximated Thermodynamic integration: when using few temperatures USE THIS!
(2)  Harmonic mean approximation: Overestimates the marginal likelihood, poor variance



MCMC run characteristics
========================




Acceptance ratios for all parameters and the genealogies
---------------------------------------------------------------------

Parameter           Accepted changes               Ratio
Theta_1                  11194/33112             0.33806
Theta_2                  20788/33396             0.62247
M_1->2                   16839/33441             0.50354
Genealogies              17199/100051             0.17190

Autocorrelation and Effective sample size
-------------------------------------------------------------------

  Parameter         Autocorrelation(*)   Effective Sample size
  ---------         ---------------      ---------------------
  Theta_1                0.89862              2163.41
  Theta_2                0.72510              6389.84
  M_1->2                 0.87487              2769.96
  Ln[Prob(D|P)]          0.86244              3012.33
  (*) averaged over loci.

