Skip to contents

This function extracts the continuous feature extraction results for targets corresponding to specified target cohorts.

Usage

getTargetContinuousFeatures(
  connectionHandler,
  schema,
  cTablePrefix = "c_",
  cgTablePrefix = "cg_",
  databaseTable = "database_meta_data",
  targetIds = NULL,
  analysisIds = NULL
)

Arguments

connectionHandler

A connection handler that connects to the database and extracts sql queries. Create a connection handler via `ResultModelManager::ConnectionHandler$new()`.

schema

The result database schema (e.g., 'main' for sqlite)

cTablePrefix

The prefix used for the characterization results tables

cgTablePrefix

The prefix used for the cohort generator results tables

databaseTable

The name of the table with the database details (default 'database_meta_data')

targetIds

A vector of integers corresponding to the target cohort IDs

analysisIds

The feature extraction analysis ID of interest (e.g., 201 is condition)

Value

Returns a data.frame with the columns:

  • databaseName the name of the database

  • targetName the target cohort name

  • targetId the target cohort unique identifier

  • minPriorObservation the minimum required observation days prior to index for an entry

  • covariateName the name of the feature

  • covariateId the id of the feature

  • countValue the number of cases who have the feature

  • minValue the minimum value observed for the feature

  • maxValue the maximum value observed for the feature

  • averageValue the mean value observed for the feature

  • standardDeviation the standard deviation of the value observed for the feature

  • medianValue the median value observed for the feature

  • p10Value the 10th percentile of the value observed for the feature

  • p25Value the 25th percentile of the value observed for the feature

  • p75Value the 75th percentile of the value observed for the feature

  • p90Value the 90th percentile of the value observed for the feature

Details

Specify the connectionHandler, the schema and the target/outcome cohort IDs

Examples

conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver

tcf <- getTargetContinuousFeatures(
connectionHandler = connectionHandler, 
schema = 'main'
)
#> Closing database connection