Skip to content

boundaries should be exclusive in positive-constrained distributions like lognormal #1968

Open
@bob-carpenter

Description

@bob-carpenter

Description

Lines 26-27 of stan/math/prim/prob/lognormal_lpdf.hpp are:

  check_not_nan(function, "Random variable", y);
  check_nonnegative(function, "Random variable", y);

They should be replaced with:

  check_positive_finite(function, "Random variable", y);

because 0 is not in the support of a lognormal.

For comparison, the test is implemented properly in gamma_lpdf.hpp.

There may be other

Current Version:

v3.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions