Closed ApproximateIdentity closed 9 years ago
The problem here is that there are no records in the drug_era table with drug_concept_id = 1342001, and therefore the treatment cohort is empty. I'll add some meaningful error messages to createPs()
, but I really recommend using summary(cohortData)
to diagnose any problems in fetching the data.
(Note: statements like length(unique(cohortdata$cohorts$personId))
require the ffbase
package, which is no longer automatically loaded when you load CohortMethod).
If I run the script below, the auc that is returned is NaN. It's not the same problem as in issue https://github.com/OHDSI/CohortMethod/issues/24 because in this case getdrugfromindication() is actually returning some ids.