View source: R/addCohortSurvival.R
addCohortSurvival | R Documentation |
Add survival information to a cohort table
addCohortSurvival(
x,
cdm,
outcomeCohortTable,
outcomeCohortId = 1,
outcomeDateVariable = "cohort_start_date",
outcomeWashout = Inf,
censorOnCohortExit = FALSE,
censorOnDate = NULL,
followUpDays = Inf,
name = NULL
)
x |
cohort table to add survival information |
cdm |
CDM reference |
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) |
name |
Name of the new table, if NULL a temporary table is returned. |
Two additional columns will be added to x. The "time" column will contain number of days to censoring. The "status" column will indicate whether the patient had the event (value: 1), or did not have the event (value: 0)
cdm <- mockMGUS2cdm()
cdm$mgus_diagnosis <- cdm$mgus_diagnosis %>%
addCohortSurvival(
cdm = cdm,
outcomeCohortTable = "death_cohort",
outcomeCohortId = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.