The program 3s (3s.v3.1.tgz) implements the likelihood ratio tests of Yang (2002, 2010) and Zhu & Yang (2012). The latest release (Dalquen et al. 2017) includes several improvements over previous versions:
The previous version is still available here
3s replaces the program Ne3sML (which was included in the MCMCcoal package), which implements the likelihood method of Yang (2002).
You can use 3s as it is, without any additional libraries installed. Use the following command (adapted to your system) to compile the source code:
gcc -O3 -o 3s 3s.c tools.c lfun3s.c -lm
However, we recommend installing the GNU Scientific library (GSL) as this will speed up computation of P(t) significantly, even if you run the program on a single core. Once GSL is installed, you can compile with something like this:
gcc -O3 -DUSE_GSL -o 3s 3s.c tools.c lfun3s.c -lm -lgsl -lgslcblas
Depending on how your system is set up, you might or might not have to specify the location of GSL using the -I
and -L
options:
gcc -O3 -DUSE_GSL -I/usr/local/include -L/usr/local/lib -o 3s 3s.c tools.c lfun3s.c -lm -lgsl -lgslcblas
Finally, if you want to run 3s on multiple cores, you can compile with OpenMP support:
gcc -O3 -DUSE_GSL -I/usr/local/include -L/usr/local/lib -o 3s -fopenmp 3s.c tools.c lfun3s.c -lm -lgsl -lgslcblas
This should work out-of-the-box on current Linux systems with the GNU tool chain. On Mac OS X and Windows you need a compiler with OpenMP support.