protected double BFfactor(int c,int r){
  double sum=0;
  double multiplier=1.0;
  for (int i=0; i < r; i++) {
    sum+=multiplier * Math.exp((c * Math.log(r - i) - (SpecialFunctions.lnFactorial(i) + SpecialFunctions.lnFactorial(r - i))));
    multiplier*=-1.0;
  }
  return sum;
}

protected double BFfactor ( int c , int r ) { double sum = 0 ; double multiplier = 1.0 ; for ( int i = 0 ; i < r ; i ++ ) { sum += multiplier * Math . exp ( ( c * Math . log ( r - i ) - ( SpecialFunctions . lnFactorial ( i ) + SpecialFunctions . lnFactorial ( r - i ) ) ) ) ; multiplier *= - 1.0 ; } return sum ; }
compute factor for bonferroni correction . this is based on equation 3 . 2 in kass ( 1980 ) .
