tidyCovariateData: Tidy covariate data

View source: R/Normalization.R

tidyCovariateDataR Documentation

Tidy covariate data

Description

Tidy covariate data

Usage

tidyCovariateData(
  covariateData,
  minFraction = 0.001,
  normalize = TRUE,
  removeRedundancy = TRUE
)

Arguments

covariateData

An object as generated using the getDbCovariateData function.

minFraction

Minimum fraction of the population that should have a non-zero value for a covariate for that covariate to be kept. Set to 0 to don't filter on frequency.

normalize

Normalize the covariates? (dividing by the max).

removeRedundancy

Should redundant covariates be removed?

Details

Normalize covariate values by dividing by the max and/or remove redundant covariates and/or remove infrequent covariates. For temporal covariates, redundancy is evaluated per time ID.

Examples

## Not run: 
covariateData <- FeatureExtraction:::createEmptyCovariateData(
  cohortIds = 1,
  aggregated = FALSE,
  temporal = FALSE
)

covData <- tidyCovariateData(
  covariateData = covariateData,
  minFraction = 0.001,
  normalize = TRUE,
  removeRedundancy = TRUE
)

## End(Not run)


OHDSI/FeatureExtraction documentation built on April 22, 2024, 10:24 p.m.