Skip to contents

phenotypeR diagnostics on the cohort of input with relation to a denomination population. Diagnostics include:

* Incidence * Prevalence

Usage

populationDiagnostics(cohort, populationSample = 1e+06)

Arguments

cohort

Cohort table in a cdm reference

populationSample

Number of people from the cdm to sample. If NULL no sampling will be performed

Value

A summarised result

Examples

# \donttest{
library(IncidencePrevalence)
cdm <- mockIncidencePrevalenceRef(sampleSize = 1000)
pop_diag <- populationDiagnostics(cohort = cdm$outcome,
                                  populationSample = 250)
#>  Creating denominator for incidence and prevalence
#>  Sampling person table to 250
#>  Creating denominator cohorts
#>  -- getting cohort dates for ■■■■■■■■■■■■■■■■                 3 of 6 cohorts
#>  -- getting cohort dates for ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  6 of 6 cohorts
#>  Cohorts created in 0 min and 7 sec
#>  Estimating incidence
#> Getting incidence for analysis 1 of 12
#> Getting incidence for analysis 2 of 12
#> Getting incidence for analysis 3 of 12
#> Getting incidence for analysis 4 of 12
#> Getting incidence for analysis 5 of 12
#> Getting incidence for analysis 6 of 12
#> Getting incidence for analysis 7 of 12
#> Getting incidence for analysis 8 of 12
#> Getting incidence for analysis 9 of 12
#> Getting incidence for analysis 10 of 12
#> Getting incidence for analysis 11 of 12
#> Getting incidence for analysis 12 of 12
#> Overall time taken: 0 mins and 10 secs
#>  Estimating prevalence
#> Getting prevalence for analysis 1 of 6
#> Getting prevalence for analysis 2 of 6
#> Getting prevalence for analysis 3 of 6
#> Getting prevalence for analysis 4 of 6
#> Getting prevalence for analysis 5 of 6
#> Getting prevalence for analysis 6 of 6
#> Time taken: 0 mins and 4 secs
CDMConnector::cdm_disconnect(cdm)
# }