estimateSingleEventSurvival {CohortSurvival}R Documentation

Estimate survival for a given event of interest using cohorts in the OMOP Common Data Model

Description

Estimate survival for a given event of interest using cohorts in the OMOP Common Data Model

Usage

estimateSingleEventSurvival(
  cdm,
  targetCohortTable,
  targetCohortId = NULL,
  outcomeCohortTable,
  outcomeCohortId = NULL,
  outcomeDateVariable = "cohort_start_date",
  outcomeWashout = Inf,
  censorOnCohortExit = FALSE,
  censorOnDate = NULL,
  followUpDays = Inf,
  strata = NULL,
  eventGap = 30,
  estimateGap = 1,
  restrictedMeanFollowUp = NULL,
  minimumSurvivalDays = 1,
  minCellCount = 5,
  returnParticipants = FALSE
)

Arguments

cdm

CDM reference

targetCohortTable

targetCohortTable

targetCohortId

targetCohortId

outcomeCohortTable

The outcome cohort table of interest.

outcomeCohortId

ID of event cohorts to include. Only one outcome (and so one ID) can be considered.

outcomeDateVariable

Variable containing date of outcome event

outcomeWashout

Washout time in days for the outcome

censorOnCohortExit

If TRUE, an individual's follow up will be censored at their cohort exit

censorOnDate

if not NULL, an individual's follow up will be censored at the given date

followUpDays

Number of days to follow up individuals (lower bound 1, upper bound Inf)

strata

strata

eventGap

Days between time points for which to report survival events, which are grouped into the specified intervals.

estimateGap

Days between time points for which to report survival estimates. First day will be day zero with risk estimates provided for times up to the end of follow-up, with a gap in days equivalent to eventGap.

restrictedMeanFollowUp

number of days of follow-up to take into account when calculating restricted mean for all cohorts

minimumSurvivalDays

Minimum number of days required for the main cohort to have survived

minCellCount

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

returnParticipants

Either TRUE or FALSE. If TRUE, references to participants from the analysis will be returned allowing for further analysis.

Value

tibble with survival information for desired cohort, including: time, people at risk, survival probability, cumulative incidence, 95 CIs, strata and outcome. A tibble with the number of events is outputted as an attribute of the output

Examples


cdm <- mockMGUS2cdm()
surv <- estimateSingleEventSurvival(
  cdm = cdm,
  targetCohortTable = "mgus_diagnosis",
  targetCohortId = 1,
  outcomeCohortTable = "death_cohort",
  outcomeCohortId = 1,
  eventGap = 7
)



[Package CohortSurvival version 0.5.2 Index]