Skip to content

minPostCombinationDuration filters all eras, not just combination spillovers #15

@katy-sadowski

Description

@katy-sadowski

Describe the bug
I think it's here, per Copilot :)

dplyr::filter(.data$durationEra >= minPostCombinationDuration | is.na(.data$durationEra))

To Reproduce
Run on data containing eras that are less than minPostCombinationDuration but don't overlap any other / aren't contributing to a combination. They're being dropped.

Expected behavior
minPostCombinationDuration operates per documentation: "Minimum time an event era before or after a generated combination treatment should last to be included in analysis"

I know there is a Best Practice recommendation to make minPostCombinationDuration less than minEraDuration, to prevent this silent failure mode, the recommendation should either be enforced via a constraint in the function, or the bug should be fixed.

There is a use case to have minEraDuration and minPostCombinationDuration be different. We may not expect all rx to stop at exactly the same time in a combo while also wanting to count all rx starts regardless of length.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions