Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truncation correction should be subtracted in example #825

Open
bob-carpenter opened this issue Oct 21, 2024 · 0 comments
Open

truncation correction should be subtracted in example #825

bob-carpenter opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bob-carpenter
Copy link
Contributor

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.

@bob-carpenter bob-carpenter added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant