Skip to content

[Bug]: offset for length and agecomp using Dirichlet was incorrect for obs with males and females #362

@Rick-Methot-NOAA

Description

@Rick-Methot-NOAA

Describe the bug

        offset_a(f, i) += gammln(nsamp_a(f, i) + 1.) -
            sum(gammln(1. + nsamp_a(f, i) * obs_a(f, i)(z1, z2)));

The first part of this eq was being added once for females and then again for males.
This occurs only with Dirichlet and only when the comp sample had both males and females
It was detected as a problem when comparing the logL to SizeComp method which does females and males in one calculation.

To Reproduce

per above

Expected behavior

expected length comp approach and sizefreq approach to be able to give identical result when configured the same

Screenshots

No response

Which OS are you seeing the problem on?

No response

Which version of SS3 are you seeing the problem on?

3.30.19 and earlier

Additional Context

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions