Characterization is part of HADES.
Characterization is an R package for performing characterization of a target and a comparator cohort.
- Compute time to event
- Compute dechallenge and rechallenge
- Computer characterization of target cohort with and without occurring in an outcome cohort during some time at risk
- Run multiple characterization analyses efficiently
- upload results to database
- export results as csv files
library(Eunomia)
library(Characterization)
connectionDetails <- Eunomia::getEunomiaConnectionDetails()
Eunomia::createCohorts(connectionDetails = connectionDetails)
targetIds <- c(1,2,4)
outcomeIds <- c(3)
timeToEventSettings1 <- createTimeToEventSettings(
targetIds = 1,
outcomeIds = c(3,4)
)
timeToEventSettings2 <- createTimeToEventSettings(
targetIds = 2,
outcomeIds = c(3,4)
)
dechallengeRechallengeSettings <- createDechallengeRechallengeSettings(
targetIds = targetIds,
outcomeIds = outcomeIds,
dechallengeStopInterval = 30,
dechallengeEvaluationWindow = 31
)
aggregateCovariateSettings1 <- createAggregateCovariateSettings(
targetIds = targetIds,
outcomeIds = outcomeIds,
riskWindowStart = 1,
startAnchor = 'cohort start',
riskWindowEnd = 365,
endAnchor = 'cohort start',
covariateSettings = FeatureExtraction::createCovariateSettings(
useDemographicsGender = T,
useDemographicsAge = T,
useDemographicsRace = T
)
)
aggregateCovariateSettings2 <- createAggregateCovariateSettings(
targetIds = targetIds,
outcomeIds = outcomeIds,
riskWindowStart = 1,
startAnchor = 'cohort start',
riskWindowEnd = 365,
endAnchor = 'cohort start',
covariateSettings = FeatureExtraction::createCovariateSettings(
useConditionOccurrenceLongTerm = T
)
)
characterizationSettings <- createCharacterizationSettings(
timeToEventSettings = list(
timeToEventSettings1,
timeToEventSettings2
),
dechallengeRechallengeSettings = list(
dechallengeRechallengeSettings
),
aggregateCovariateSettings = list(
aggregateCovariateSettings1,
aggregateCovariateSettings2
)
)
runCharacterizationAnalyses(
connectionDetails = connectionDetails,
cdmDatabaseSchema = 'main',
targetDatabaseSchema = 'main',
targetTable = 'cohort',
outcomeDatabaseSchema = 'main',
outcomeTable = 'cohort',
characterizationSettings = characterizationSettings,
outputDirectory = file.path(tempdir(), 'example', 'results'),
executionPath = file.path(tempdir(), 'example', 'execution'),
csvFilePrefix = 'c_',
databaseId = 'Eunomia'
)
Characterization is an R package.
Requires R (version 4.0.0 or higher). Libraries used in Characterization require Java.
-
See the instructions here for configuring your R environment, including Java.
-
In R, use the following commands to download and install Characterization:
install.packages("remotes")
remotes::install_github("ohdsi/Characterization")
Documentation can be found on the package website.
- Developer questions/comments/feedback: OHDSI Forum
- We use the GitHub issue tracker for all bugs/issues/enhancements
Read here how you can contribute to this package.
Characterization is licensed under Apache License 2.0
Characterization is being developed in R Studio.