summariseTemporalSymmetry {CohortSymmetry} | R Documentation |
Summarise temporal symmetry
Description
Using generateSequenceCohortSet to obtain temporal symmetry (aggregated counts) of two cohorts.
Usage
summariseTemporalSymmetry(cohort, cohortId = NULL, timescale = "month")
Arguments
cohort |
A cohort table in the cdm. |
cohortId |
The Ids in the cohort that are to be included in the analyses. |
timescale |
Timescale for the x axis of the plot (month, day, year). |
Value
An aggregated table with difference in time (marker - index) and the relevant counts.
Examples
library(CohortSymmetry)
cdm <- mockCohortSymmetry()
cdm <- generateSequenceCohortSet(cdm = cdm,
name = "joined_cohorts",
indexTable = "cohort_1",
markerTable = "cohort_2")
temporal_symmetry <- summariseTemporalSymmetry(cohort = cdm$joined_cohorts)
CDMConnector::cdmDisconnect(cdm)
[Package CohortSymmetry version 0.2.4 Index]