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",
  minCellCount = 5
)

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).

minCellCount

The minimum number of events to reported, below which results will be obscured. If 0, all results will be reported.

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)



[Package CohortSymmetry version 0.1.2 Index]