Skip to content

Indexing fix for small sigma#11

Open
joranE wants to merge 2 commits intogamlss-dev:mainfrom
joranE:indexing_fix
Open

Indexing fix for small sigma#11
joranE wants to merge 2 commits intogamlss-dev:mainfrom
joranE:indexing_fix

Conversation

@joranE
Copy link

@joranE joranE commented Jan 12, 2026

This pull requests fixes what I believe are mistakes that generate incorrect density and cdf values due to not properly indexing both sides of an assignment.

For example, in the line:

logfy[sigma<0.0001]  <- dBI(xx, mu = mu, bd=bd, log = TRUE)

if sigma is a vector and only some values are below 0.0001 the number of items on the left is not the same as on the right, causing a length mismatch, a warning, and incorrect density values inserted.

This issue was identified and fixed in BB, DELAPORT, GeneralisedPoisson (where the inequality was actually in the wrong direction as well!), NBF, NBI and NBII.

Joran Elias added 2 commits January 12, 2026 10:31
inequality direction was wrong as well
correctly index both sides of assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant