Learn R Programming

FeatureExtraction

FeatureExtraction is part of HADES.

Introduction

An R package for generating features (covariates) for a cohort using data in the Common Data Model.

Features

  • Takes a cohort as input.
  • Generates baseline features for that cohort.
  • Default covariates include all drugs, diagnoses, procedures, as well as age, comorbidity indexes, etc.
  • Support for creating custom covariates.
  • Generate paper-ready summary table of select population characteristics.

Technology

FeatureExtraction is an R package, with some functions implemented in C++.

System Requirements

Requires R (version 3.2.2 or higher). Installation on Windows requires RTools. FeatureExtraction require Java.

Getting Started

  1. See the instructions here for configuring your R environment, including RTools and Java.

  2. In R, use the following commands to download and install FeatureExtraction:

install.packages("drat")
drat::addRepo("OHDSI")
install.packages("FeatureExtraction")

User Documentation

The documentation website can be found at https://ohdsi.github.io/FeatureExtraction/. PDF versions of the vignettes and package manual are here:

These vignettes are also available in Korean:

Support

  • Developer questions/comments/feedback: OHDSI Forum
  • We use the GitHub issue tracker for all bugs/issues/enhancements

Contributing

Read here how you can contribute to this package.

License

FeatureExtraction is licensed under Apache License 2.0

Development

FeatureExtraction is being developed in R Studio.

Development status

Ready for use

Acknowledgements

  • This project is supported in part through the National Science Foundation grant IIS 1251151.

Copy Link

Version

Install

install.packages('FeatureExtraction')

Monthly Downloads

1,962

Version

3.9.0

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Ger Inberg

Last Published

April 20th, 2025

Functions in FeatureExtraction (3.9.0)

createTemporalSequenceCovariateSettings

Create covariate settings
.createLooCovariateSettings

Get covariate settings
createDefaultCovariateSettings

Create default covariate settings
createEmptyCovariateData

Creates an empty covariate data object
createDetailedCovariateSettings

Create detailed covariate settings
createTable1CovariateSettings

Create covariate settings for a table 1
createDetailedTemporalCovariateSettings

Create detailed temporal covariate settings
createTable1

Create a table 1
createTemporalCovariateSettings

Create covariate settings
createDefaultTemporalCovariateSettings

Create default covariate settings
.getDbLooCovariateData

Get covariate information from the database
isAggregatedCovariateData

Check whether covariate data is aggregated
getDbCohortBasedCovariatesData

Get covariate information from the database based on other cohorts
filterByRowId

Filter covariates by row ID
getDbCohortAttrCovariatesData

Getcovariate information from the database through the cohort_attribute table
getDbDefaultCovariateData

Get default covariate information from the database
isTemporalCovariateData

Check whether covariate data is temporal
loadCovariateData

Load the covariate data from a folder
getDefaultTable1Specifications

Get the default table 1 specifications
getDbCovariateData

Get covariate information from the database
saveCovariateData

Save the covariate data to folder
tidyCovariateData

Tidy covariate data
isCovariateData

Check whether an object is a CovariateData object
filterByCohortDefinitionId

Filter covariates by cohort definition IDs
aggregateCovariates

Aggregate covariate data
createCohortBasedCovariateSettings

Create settings for covariates based on other cohorts
FeatureExtraction-package

FeatureExtraction: Generating Features for a Cohort
createCohortAttrCovariateSettings

Create cohort attribute covariate settings
createCohortBasedTemporalCovariateSettings

Create settings for temporal covariates based on other cohorts
createAnalysisDetails

Create detailed covariate settings
createCovariateSettings

Create covariate settings
CovariateData-class

Covariate Data
computeStandardizedDifference

Compute standardized difference of mean for all covariates.
convertPrespecSettingsToDetailedSettings

Convert prespecified covariate settings into detailed covariate settings