OHDSI / OHDSI/FeatureExtraction
For CHADS2Vasc, min/max/mean/SD contradict percentile stats
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 74
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
For CHADS2Vasc, we ran FeatureExtraction using default covariate settings on a general population cohort (no specific condition), with a subcohort for elderly population. We noticed that we were seeing very odd statistics, particularly for the elderly subgroup: a minimum of 1 and a median of 0. After doing some digging around, we identified that it seems like the package may be calculating the min/max/mean/SD among a different population than when calculating the 25th, 50th, and 75th percentiles. Because our elderly subcohort automatically should get at least 1 point based on age, it makes sense that the minimum is 1, but it does not make sense for the 25th, 50th, and 75th percentiles to be 0 (which is the output we got). The numbers suggest that the denominator is different for some statistics vs. others.
Does that also affect the other indices (CCI, DCSI?) I would assume they are all calculated the same way but I'm not sure. Please help!
EDIT: Looking more closely into the sql script for the three indices, it appears that the chads2vasc file does a cross join to stats whereas CCI and DCSI do an inner join on cohort_definition_id , so if you have multiple cohort ids in your covData, is it possible chads2vasc may be mapping the wrong stats for 25th, 50th, and 75th percentiles ?
For CCI and DCSI, it looks like standard deviation is calculated among patients with at least one condition as the denominator, whereas mean uses all patients in cohort in its denominator? (points to t2 as denom rather than t1)
Finally, CCI has a hierarchical scoring model. I don't think I see anything in the scripts that implements that (for example, a patient that has both metastatic solid tumor (6) and any malignancy (2) should not get counted for 8 points, but top out at 6.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the SQL scripts for CHADS2Vasc, CCI, and DCSI, focusing on their joins, denominators, and percentile versus summary-statistic calculations. Reproduce the reported elderly-subcohort results with default covariate settings, then verify that cohort mappings and CCI hierarchical scoring are consistent across the affected indices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, sql
- Domain
- data, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100