Skip to content

truncation correction should be subtracted in example #825

@bob-carpenter

Description

@bob-carpenter

Summary:

User Aboottogo in this post, reported an error in an example here:

https://mc-stan.org/docs/stan-users-guide/one-dimensional-integrals.html

Description:

[quote="Aboottogo, post:1, topic:36958"]

  target += normal_lpdf(y | mu, sigma);
  target += log(integrate_1d(normal_density,
                             left_limit,
                             positive_infinity(),
                             { mu, sigma }, x_r, x_i));

[/quote]

The example is left truncated, so this should be a subtraction of the log of the integral as it's in the denominator.

Additional Information:

Provide any additional information here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions