Add generalized gamma distribution functions and loglogistic log cdfs#1
Merged
yananlong merged 1 commit intoOct 17, 2025
Merged
Conversation
7 tasks
There was a problem hiding this comment.
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_lcdfandloglogistic_lccdffunctions with analytic gradients - Adds a complete generalized gamma distribution implementation including
lpdf,lcdf,lccdf, andrngfunctions - 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.
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
https://chatgpt.com/codex/tasks/task_b_68e6664bfbac8320abd0c40838d2c304