summariseTemporalSymmetry {CohortSymmetry} | R Documentation |
Using generateSequenceCohortSet to obtain temporal symmetry (aggregated counts) of two cohorts.
summariseTemporalSymmetry(
cohort,
cohortId = NULL,
timescale = "month",
minCellCount = 5
)
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). |
minCellCount |
The minimum number of events to reported, below which results will be obscured. If 0, all results will be reported. |
An aggregated table with difference in time (marker - index) and the relevant counts.
library(CohortSymmetry)
cdm <- mockCohortSymmetry()
cdm <- generateSequenceCohortSet(cdm = cdm,
name = "joined_cohorts",
indexTable = "cohort_1",
markerTable = "cohort_2")
temporal_symmetry <- summariseTemporalSymmetry(cohort = cdm$joined_cohorts, minCellCount = 0)
CDMConnector::cdmDisconnect(cdm)