Skip to content

Overflow with large numbers in Nelson Aalen fitter #1585

@shilet

Description

@shilet

When determining the confidence interval for the Nelson Aalen Fitter, the following formula is used:
def _variance_f_discrete(self, population, deaths):
return (population - deaths) * deaths / population ** 3

The problem is that population (population = events["at_risk"] - entrances) is an integer, this should be changed to float to prevent overflow. Otherwise the resulting confidence interval is NaN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions