OHDSI Home | Forums | Wiki | Github

CohortMethod Error: Column `stratumId` not found in `.data`

Hi folks,

I am currently assisting in a study that uses the CohortMethod. On my system, I get the error: "Column stratumId not found in .data " when I run CohortMethod::ComputeCovariateMethod. I have no clue why this is happening.

Any thoughts/suggestions?

~ tcp :deciduous_tree:

1 Like

The input to the function does not have a stratumId column. Did you run stratifyByPs() or matchOnPs(). Could you provide a bit more context, like the code you’re trying to run?

1 Like

Dear Martijn Schuemie,

Thanks for the reply!

We are conducting a PLE network study called CEEAMOS, and a problem occurred during PLE. The github link to the study is here (Ceeamos/CEEAMOS at master · ohdsi-studies/Ceeamos · GitHub). The analysis was conducted in the Renv environment, and the CohortMethod version is “4.2.0.”.

Specifically, we got the error at the computing covariate balance step after finishing creating cohorts.

Please any advice.

2 Likes

Hi,

In my case, when there was no patient in the study population (even though there are someone in the target/comparator cohorts), that error occurred.
I recommend that you try to review your error log or the analysisSummary file which contains the information on the number of T / C / O.

For example, in my study package, there were T/C/Os and the analysisSettings like below.

T: Aripiprazole user with a previous tic disorder
C: Risperidone user with a previous tic disorder
O: tic disorder
PopulationSettings: “removeSubjectsWithPriorOutcome”: true
image

As a result, the number of each group in the study population was 0 and same error occurred like below.

image

I tracked the log file and found that the balance file (bal_txxx_cxxx_oxxx.rds) for that analysis wasn’t created. I removed that T-C-O pair in the study package, and the error disappeared.

Best,
Chungsoo

2 Likes

Thanks @Chungsoo_Kim !

Yes, my best guess this is what happened. I try to make sure we handle zero counts everywhere, but they can pop up in so many places it is hard to ensure they’re all covered. Please check the log as Chungsoo recommended.

Another thought might be that, because analysis 4 and 14 don’t use matching or stratification, this might cause issues. But they shouldn’t have a strataFile entry, so should drop out here. But you could check if there are no entries remaining in subset containing analysis ID 4 or 14,

2 Likes
t