Maximal Likelihood Estimation for n-dimensional Fisher-Bingham Distribution

C Programs and Computational Results

Program package for Maximal Likelihood Estimation for n-dimensional Fisher-Bingham Distribution ( fb2_package.tar ) This program package consists of the following programs.

How to compile our programs.

  1. Download the program package fb2_package.tar .
  2. Extract fb2_package.tar.
  3. Move to the directory fb2_package.
  4. Type the command "make"
Example:
$ tar -xvf fb2_package.tar
$ cd fb2_package
$ make
You need to install GNU scientific library Gnu Scientific Library (GSL) to compile our programs.

How to execute our programs.

After compiling, the programs s1_wind, s2_astro, s2_mag, s3_e1, s4_e1, s5_e1, s6_e1, s7_e1 are generated. For example, you type the following command to execute the program s1_wind. Example:
$ ./s1_wind 
r*r = 2.797256
ii = 0,	 s = 1.000000 -> 2.797256 
return of the function fbnd:
[	 11.6189,	 5.60018,	 1.30144,	 6.89219]
... 

Risa/Asir program "pfn_gen_c_2.rr"

The above C programs are automatically generated by Risa/Asir Program pfn_gen_c_2.rr . Example :
$ asir       
This is Risa/Asir, Version 20110824 (Kobe Distribution).
... 
[1630] load("pfn_gen_c_2.rr");
[1886] pfn_gen_c_2(1);  /* generates C program test1.c and test1.h of MLE for 1-dimensional FB dist. */
generate test1.h
generate test1.c
1
[1887] pfn_gen_c_2(3); /* generates C program test3.c and test3.h of MLE for 3-dimensional FB dist. */
generate test3.h
generate test3.c
1
[1888] 
Data should be written in the following part of the main function in test1.c.
	/* Write data here. */
	/* g_x11, g_x12, g_x22, g_y1, g_y2 */
	/* g_s11, g_s12, g_s22, g_s1, g_s2 */
g_x11, g_x12, g_x22, g_y1, g_y2 are starting positions. g_s11, g_s12, g_s22, g_s1, g_s2 are data average. Example:
	g_x11 = 0.5; g_x12 = 0.5; g_x22 = 0.15; g_y1 = 1; g_y2 = 0.15; g_r = 1.0;
	g_s11 = 0.662125; g_s12 = 0.274563; g_s22 = 0.337875; g_s1 = 0.317564; g_s2 = -0.020188;
The compilation can be done as following. At first, remove '#' at the lines
    #test1: test1.c test1.h ${ko-initial-objs}
    #	$(CC) test1.c ${ko-initial-objs}  ${libs_gsl} -lm -o $@
  
in Makefile. Then input
    $make test1
  

C program "ko-fbd.c" evaluating the Fisher-Bingham integral on n-dimensional sphere

Please see the manual .