Run cohort-level diagnostics
cohortDiagnostics.Rd
Runs phenotypeR diagnostics on the cohort. The diganostics include: * Age groups and sex summarised. * A summary of visits of everyone in the cohort using visit_occurrence table. * A summary of age and sex density of the cohort. * Attritions of the cohorts. * Overlap between cohorts (if more than one cohort is being used).
Examples
# \donttest{
library(PhenotypeR)
cdm <- mockPhenotypeR()
result <- cohortDiagnostics(cdm$my_cohort)
#> • Index cohort table
#> • Getting cohort summary
#> ℹ adding demographics columns
#> ℹ adding tableIntersectCount 1/1
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> • Getting age density
#> • Getting cohort attrition
#> • Getting cohort overlap
#> • Getting cohort timing
#> ℹ The following estimates will be computed:
#> • days_between_cohort_entries: median, q25, q75, min, max, density
#> ! Table is collected to memory as not all requested estimates are supported on
#> the database side
#> → Start summary of data, at 2025-01-30 22:10:14.281309
#> ✔ Summary finished, at 2025-01-30 22:10:14.37306
CDMConnector::cdmDisconnect(cdm = cdm)
# }