Skip to content

Add generalized gamma distribution functions and loglogistic log cdfs#1

Merged
yananlong merged 1 commit into
developfrom
codex/add-lpdf,-lcdf,-lccdf,-rng-for-distributions
Oct 17, 2025
Merged

Add generalized gamma distribution functions and loglogistic log cdfs#1
yananlong merged 1 commit into
developfrom
codex/add-lpdf,-lcdf,-lccdf,-rng-for-distributions

Conversation

@yananlong
Copy link
Copy Markdown
Owner

Summary

  • add loglogistic_lcdf and loglogistic_lccdf implementations with analytic gradients
  • implement generalized_gamma lpdf/lcdf/lccdf/rng following the Prentice parameterization and expose them through prim/prob.hpp
  • add unit tests covering loglogistic log CDFs and generalized gamma special cases, including RNG behavior

Testing

  • ./runTests.py test/unit/math/prim/prob/loglogistic_lcdf_lccdf_test.cpp
  • ./runTests.py test/unit/math/prim/prob/generalized_gamma_special_cases_test.cpp

https://chatgpt.com/codex/tasks/task_b_68e6664bfbac8320abd0c40838d2c304

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds log CDF functions for the loglogistic distribution and implements the generalized gamma distribution following the Prentice parameterization.

  • Implements loglogistic_lcdf and loglogistic_lccdf functions with analytic gradients
  • Adds a complete generalized gamma distribution implementation including lpdf, lcdf, lccdf, and rng functions
  • Includes comprehensive unit tests verifying the new functions and special case reductions

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/unit/math/prim/prob/loglogistic_lcdf_lccdf_test.cpp Unit tests for loglogistic log CDF functions
test/unit/math/prim/prob/generalized_gamma_special_cases_test.cpp Unit tests for generalized gamma special case reductions
stan/math/prim/prob/loglogistic_lcdf.hpp Implementation of loglogistic log CDF
stan/math/prim/prob/loglogistic_lccdf.hpp Implementation of loglogistic log complementary CDF
stan/math/prim/prob/generalized_gamma_rng.hpp Random number generation for generalized gamma
stan/math/prim/prob/generalized_gamma_lpdf.hpp Log PDF implementation for generalized gamma
stan/math/prim/prob/generalized_gamma_lcdf.hpp Log CDF implementation for generalized gamma
stan/math/prim/prob/generalized_gamma_lccdf.hpp Log complementary CDF for generalized gamma
stan/math/prim/prob.hpp Header file updates to expose new functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@yananlong yananlong requested a review from Copilot October 17, 2025 03:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread stan/math/prim/prob/generalized_gamma_lccdf.hpp
@yananlong yananlong merged commit adead9b into develop Oct 17, 2025
@yananlong yananlong deleted the codex/add-lpdf,-lcdf,-lccdf,-rng-for-distributions branch October 17, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants