Skip to content

Down sampling fails when target & comparator have 0 records #195

Description

@anthonysena

In CohortMethod v6, this code fails when the T&C cohorts have 0 people resulting in an attrition with 0 entries.

https://github.com/OHDSI/CohortMethod/blob/e09adce65a256b613ea581cd627cd9cfc7027d10/R/DataLoadingSaving.R#L299-307

The error raised is:

Error in if (preSampleCounts$targetExposures > maxCohortSize) { : 
  argument is of length zero

Metadata

Metadata

Assignees

No one assigned

    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