OHDSI Home | Forums | Wiki | Github

Estimation R code error

Hello,

When I run below R code from estimation I get error message.

result <- CohortMethod::runCmAnalyses(connectionDetails = connectionDetails,
                                  cdmDatabaseSchema = cdmDatabaseSchema,
                                  exposureDatabaseSchema = exposureDatabaseSchema,
                                  exposureTable = exposureTable,
                                  outcomeDatabaseSchema = outcomeDatabaseSchema,
                                  outcomeTable = outcomeTable,
                                  cdmVersion = cdmVersion,
                                  outputFolder = outputFolder,
                                  cmAnalysisList = cmAnalysisList,
                                  drugComparatorOutcomesList = drugComparatorOutcomesList,
                                  getDbCohortMethodDataThreads = 1,
                                  createPsThreads = 1,
                                  psCvThreads = min(16, maxCores),
                                  computeCovarBalThreads = min(3, maxCores),
                                  createStudyPopThreads = min(3, maxCores),
                                  trimMatchStratifyThreads = min(10, maxCores),
                                  fitOutcomeModelThreads = max(1, round(maxCores/4)),
                                  outcomeCvThreads = min(4, maxCores),
                                  refitPsForEveryOutcome = FALSE)

The error message is Error in data.frame(description = "Original cohorts", treatedPersons = rawCount$exposedCount[rawCount$treatment == : arguments imply differing number of rows: 1, 0

Does anyone know what have I done wrong and how to fix this error?

Thanks!

t