Skip to contents

Run benchmark of incidence and prevalence analyses

Usage

benchmarkIncidencePrevalence(cdm, analysisType = "all")

Arguments

cdm

A CDM reference object

analysisType

A string of the following: "all", "only incidence", "only prevalence"

Value

a tibble with time taken for different analyses

Examples

# \donttest{
cdm <- mockIncidencePrevalence(
  sampleSize = 100,
  earliestObservationStartDate = as.Date("2010-01-01"),
  latestObservationStartDate = as.Date("2010-01-01"),
  minDaysToObservationEnd = 364,
  maxDaysToObservationEnd = 364,
  outPre = 0.1
)

timings <- benchmarkIncidencePrevalence(cdm)
#>  Creating denominator cohorts
#> ! cohort columns will be reordered to match the expected order:
#>   cohort_definition_id, subject_id, cohort_start_date, and cohort_end_date.
#>  Cohorts created in 0 min and 6 sec
#> ! cohort columns will be reordered to match the expected order:
#>   cohort_definition_id, subject_id, cohort_start_date, and cohort_end_date.
#>  Getting prevalence for analysis 1 of 16
#>  Getting prevalence for analysis 2 of 16
#>  Getting prevalence for analysis 3 of 16
#>  Getting prevalence for analysis 4 of 16
#>  Getting prevalence for analysis 5 of 16
#>  Getting prevalence for analysis 6 of 16
#>  Getting prevalence for analysis 7 of 16
#>  Getting prevalence for analysis 8 of 16
#>  Getting prevalence for analysis 9 of 16
#>  Getting prevalence for analysis 10 of 16
#>  Getting prevalence for analysis 11 of 16
#>  Getting prevalence for analysis 12 of 16
#>  Getting prevalence for analysis 13 of 16
#>  Getting prevalence for analysis 14 of 16
#>  Getting prevalence for analysis 15 of 16
#>  Getting prevalence for analysis 16 of 16
#>  Time taken: 0 mins and 2 secs
#>  Getting prevalence for analysis 1 of 16
#>  Getting prevalence for analysis 2 of 16
#>  Getting prevalence for analysis 3 of 16
#>  Getting prevalence for analysis 4 of 16
#>  Getting prevalence for analysis 5 of 16
#>  Getting prevalence for analysis 6 of 16
#>  Getting prevalence for analysis 7 of 16
#>  Getting prevalence for analysis 8 of 16
#>  Getting prevalence for analysis 9 of 16
#>  Getting prevalence for analysis 10 of 16
#>  Getting prevalence for analysis 11 of 16
#>  Getting prevalence for analysis 12 of 16
#>  Getting prevalence for analysis 13 of 16
#>  Getting prevalence for analysis 14 of 16
#>  Getting prevalence for analysis 15 of 16
#>  Getting prevalence for analysis 16 of 16
#>  Time taken: 0 mins and 2 secs
#>  Getting incidence for analysis 1 of 16
#>  Getting incidence for analysis 2 of 16
#>  Getting incidence for analysis 3 of 16
#>  Getting incidence for analysis 4 of 16
#>  Getting incidence for analysis 5 of 16
#>  Getting incidence for analysis 6 of 16
#>  Getting incidence for analysis 7 of 16
#>  Getting incidence for analysis 8 of 16
#>  Getting incidence for analysis 9 of 16
#>  Getting incidence for analysis 10 of 16
#>  Getting incidence for analysis 11 of 16
#>  Getting incidence for analysis 12 of 16
#>  Getting incidence for analysis 13 of 16
#>  Getting incidence for analysis 14 of 16
#>  Getting incidence for analysis 15 of 16
#>  Getting incidence for analysis 16 of 16
#>  Overall time taken: 0 mins and 8 secs
# }