Extracts the time series data and runs the time series analyses on all (or a subset of) the cohorts. This function assumes the cohorts have already been generated using the OHDSI CohortGenerator package

executeTimeSeriesAnalyses(
  connectionDetails = NULL,
  connection = NULL,
  cdmDatabaseSchema,
  tempEmulationSchema = NULL,
  cohortDatabaseSchema,
  cohortTable = "cohort",
  outputFolder,
  databaseId,
  cohortDefinitionSet,
  tsDataFieldName = "subjectCount",
  cohortTimeSeriesArgs,
  tsAnalysisList
)

Arguments

connectionDetails

An object of type connectionDetails as created using the createConnectionDetails function in the DatabaseConnector package. Can be left NULL if connection is provided.

connection

An object of type connection as created using the connect function in the DatabaseConnector package. Can be left NULL if connectionDetails is provided, in which case a new connection will be opened at the start of the function, and closed when the function finishes.

cdmDatabaseSchema

Schema name where your patient-level data in OMOP CDM format resides. Note that for SQL Server, this should include both the database and schema name, for example 'cdm_data.dbo'.

tempEmulationSchema

Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.

cohortDatabaseSchema

Schema name where your cohort table resides. Note that for SQL Server, this should include both the database and schema name, for example 'scratch.dbo'.

cohortTable

The name of the cohort table.

outputFolder

The location where the cohort time series data results will be written.

databaseId

The database identifier for the time series data

cohortDefinitionSet

The cohort definition set for the cohorts used for the analysis

tsDataFieldName

The time series data field name to use. This will be either the "subjectCount" or "eventCount" as computed based on the cohort.

cohortTimeSeriesArgs

The cohort time series arguments. @seealso[createCohortTimeSeriesArgs] for more information.

tsAnalysisList

A list of time series analyses as specified by using the @seealso [createSegmentedArgs] and/or @seealso [createOcpArgs]

Details

The time series data for each cohort is extracted and stored to the file system. Then each cohort's time series is used to build one or more models.