View source: R/summariseLargeScaleCharacteristics.R
summariseLargeScaleCharacteristics | R Documentation |
This function is used to summarise the large scale characteristics of a cohort table
summariseLargeScaleCharacteristics(
cohort,
strata = list(),
window = list(c(-Inf, -366), c(-365, -31), c(-30, -1), c(0, 0), c(1, 30), c(31, 365),
c(366, Inf)),
eventInWindow = NULL,
episodeInWindow = NULL,
indexDate = "cohort_start_date",
censorDate = NULL,
includeSource = FALSE,
minimumFrequency = 0.005,
excludedCodes = c(0)
)
cohort |
The cohort to characterise. |
strata |
Stratification list. |
window |
Temporal windows that we want to characterize. |
eventInWindow |
Tables to characterise the events in the window. eventInWindow must be provided if episodeInWindow is not specified. |
episodeInWindow |
Tables to characterise the episodes in the window. episodeInWindow must be provided if eventInWindow is not specified. |
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 |
includeSource |
Whether to include source concepts. |
minimumFrequency |
Minimum frequency covariates to report. |
excludedCodes |
Codes excluded. |
The output of this function is a ResultSummary
containing the
relevant information.
## Not run:
library(CohortCharacteristics)
library(duckdb)
library(CDMConnector)
library(DrugUtilisation)
library(dplyr, warn.conflicts = FALSE)
con <- dbConnect(duckdb(), eunomiaDir())
cdm <- cdmFromCon(con, cdmSchem = "main", writeSchema = "main")
cdm <- generateIngredientCohortSet(
cdm = cdm, name = "my_cohort", ingredient = "acetaminophen"
)
cdm$my_cohort |>
summariseLargeScaleCharacteristics(
window = list(c(-365, -1), c(1, 365)),
eventInWindow = "condition_occurrence"
) |>
glimpse()
cdmDisconnect(cdm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.