summariseTreatment {DrugUtilisation} | R Documentation |
This function is used to summarise treatments received
Description
This function is used to summarise treatments received
Usage
summariseTreatment(
cohort,
window,
treatmentCohortName,
treatmentCohortId = NULL,
strata = list(),
indexDate = "cohort_start_date",
censorDate = NULL,
minCellCount = lifecycle::deprecated()
)
Arguments
cohort |
A cohort table in a cdm reference. |
window |
Time window over which to summarise the treatments. |
treatmentCohortName |
Name of a cohort in the cdm that contains the treatments of interest. |
treatmentCohortId |
Cohort definition id of interest from treatmentCohortName. |
strata |
List with column names or vectors of column names groups to stratify results by. |
indexDate |
Variable in x that contains the date to compute the intersection. |
censorDate |
Whether to censor overlap events at a specific date or a column date of x. If NULL, end of observation will be used. |
minCellCount |
|
Value
A summary of treatments stratified by cohort_name and strata_name
Examples
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
cdm$cohort1 |>
summariseTreatment(
treatmentCohortName = "cohort2",
window = list(c(0, 30), c(31, 365))
)