OHDSI / SelfControlledCaseSeriesModule

[Under development] A module wrapper around the SelfControlledCaseSeries package
4 stars 4 forks source link

case and outcome attrition counts rise with subsequent design restrictions #15

Closed jamieweaver closed 2 months ago

jamieweaver commented 2 months ago

observed attrition counts increase after the 'first outcome only' criterion is applied, see example below. We observed the issue after a Strategus run, so tried to replicate using a SelfControlledCaseSeries single study.

SelfControlledCaseSeries::getAttritionTable(sccsIntervalData) outcomeId outcomeSubjects outcomeEvents outcomeObsPeriods observedDays description
14243 15101 16549 15324 28631121 All outcome occurrences
14243 13362 14483 13517 17748966 Outcomes in study period(s)
14243 2818 3027 2818 3243133 Outcomes in nesting cohort
14243 3848 3848 3848 3568097 First outcome only
14243 1575 1575 1575 1867138 Requiring 365 days naive period
14243 439 439 439 417288 Restrict to age >= 6 & age <= 12
14243 572 437 572 499338 Having at least one covariate

expected At 'first outcome only' the case count and outcome count became equal as expected, but they should be 2818 and should not have increased to 3848.

v5.1.1. develop branch.

Tagging @msuchard, @schuemie, @azimov, @amirxcode

jamieweaver commented 2 months ago

issue reported in incorrect repo