Skip to contents

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).

Usage

cohortDiagnostics(cohort)

Arguments

cohort

Cohort table in a cdm reference

Value

A summarised result

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)
# }