This function extracts the feature extraction results for targets corresponding to specified target and outcome cohorts.
getCaseTargetBinaryFeatures(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
targetIds = NULL,
outcomeIds = NULL,
databaseIds = NULL,
analysisIds = c(3)
)Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
minPriorObservation the minimum required observation days prior to index for an entry
outcomeWashoutDays patients with the outcome occurring within this number of days prior to index are excluded (NA means no exclusion)
covariateId the id of the feature
covariateName the name of the feature
sumValue the number of target patients who have the feature value of 1 (minus those excluded due to having the outcome prior)
rawSum the number of target patients who have the feature value of 1 (ignoring exclusions)
rawAverage the fraction of target patients who have the feature value of 1 (ignoring exclusions)
A connection handler that connects to the database and extracts sql queries. Create a connection handler via `ResultModelManager::ConnectionHandler$new()`.
The result database schema (e.g., 'main' for sqlite)
The prefix used for the characterization results tables
The prefix used for the cohort generator results tables
The name of the table with the database details (default 'database_meta_data')
A vector of integers corresponding to the target cohort IDs
A vector of integers corresponding to the outcome cohort IDs
(optional) A vector of database ids to restrict to
(optional) The feature extraction analysis ID of interest (e.g., 201 is condition)
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getCaseBinaryFeatures(),
getCaseContinuousFeatures(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
tbf <- getCaseTargetBinaryFeatures (
connectionHandler = connectionHandler,
schema = 'main'
)
Run the code above in your browser using DataLab