ohdsi-studies / TicagrelorVsClopidogrel

OHDSI network study: Net Adverse Clinical Event between Ticagrelor and Clopidogrel in Patients with Acute Coronary Syndrome
1 stars 4 forks source link

fitOutcomeModel() error with cohortmethod version 3.0.2 #22

Closed jepark315 closed 5 years ago

jepark315 commented 5 years ago

I get the error below. I wonder if you've tested the package with the package cohortMethod 3.0.2. Or is it the error only occuring with me? Thank you!

Error in fitOutcomeModel(population =args$population, cohortMethodData = args$cohortMethodData, : Requested stratified analysis, but no stratumID column found in population. Please use matchonPs or stratifyByPs to create strata.

chandryou commented 5 years ago

Could you share the result in the cohortCount.csv ? This package is designed for whole national population database. If you don't have enough population in both target and comparator cohort, you cannot match the population appropriately.

chandryou commented 5 years ago

@jepark315 I've tested the package again under CohortMethod v3.0.2. It doesn't have a problem with CohortMethod v3.0.2 in our environment.

jepark315 commented 5 years ago

I don't have permission to move file between the server I analyze and the server connected to the internet. so briefly speaking before the administrator moves the file, the minimum count is 1, maximum 54308, and the median 1027, average 4376.

chandryou commented 5 years ago

I think you can see the overall cohort count in R by the code below. Two important numbers are the number in ticagrelor and clopidogrel cohort.

cnt<-read.csv(file.path(exportFolder,"CohortCounts.csv")); head(cnt); cnt[cnt$cohortDefinitionId %in% c(874,929),]

jepark315 commented 5 years ago

Thank you. I'll check it out. I wonder if there's any standard about the counts.

chandryou commented 5 years ago

Usually, we recommend to have more than 1,000 population in each group.

http://forums.ohdsi.org/t/study-on-comparison-of-combination-treatment-in-hypertension/1700/6?u=scyou

jepark315 commented 5 years ago

Now I know what the matter was.

There were error messages. Warning : Target and comparator cohorts are empty Warning : Population is empty. No covariates were constructed

jepark315 commented 5 years ago

Running the code cnt<-read.csv(file.path(exportFolder,"CohortCounts.csv")); head(cnt); had outcome as expected. but running cnt[cnt$cohortDefinitionId %in% c(874,929),], I get 0 rows. What could be the reason? Cohorts were successfully created as far as I know.

jepark315 commented 5 years ago

Maybe it could be the matter of version of other packages as cohortMethod, right?

jepark315 commented 5 years ago

I think I know the reason why. I'll be working on it.