beast-dev / beast-mcmc

Bayesian Evolutionary Analysis Sampling Trees
http://beast.community
GNU Lesser General Public License v2.1
192 stars 73 forks source link

Normal logGradient #1064

Closed maxbiostat closed 5 years ago

maxbiostat commented 5 years ago

In src/dr/math/distributions/NormalDistribution.java we have:

    public static double gradLogPdf(double x, double m, double sd) {
        return (m - x) / (sd * sd);
    }

Is this not missing a minus sign? hessianLogPdfhas the correct sign.

maxbiostat commented 5 years ago

Clarified by @xji3