public static double pdf(double x,double k,double theta,double shift){
  x=(x - shift);
  if (x <= 0.) {
    return 0.;
  }
  return Math.pow(theta,k) / GammaDistribution.gamma(k) * Math.pow(1 + x,-(theta + 1.)) * Math.pow(Math.log1p(x),k - 1.);
}

public static double pdf ( double x , double k , double theta , double shift ) { x = ( x - shift ) ; if ( x <= 0. ) { return 0. ; } return Math . pow ( theta , k ) / GammaDistribution . gamma ( k ) * Math . pow ( 1 + x , - ( theta + 1. ) ) * Math . pow ( Math . log1p ( x ) , k - 1. ) ; }
loggamma distribution pdf ( with 0 . 0 for x & lt ; 0 )
