Tidy covariate data
tidyCovariateData(
covariateData,
minFraction = 0.001,
normalize = TRUE,
removeRedundancy = TRUE
)
An object as generated using the getDbCovariateData
function.
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 the covariates? (dividing by the max).
Should redundant covariates be removed?
An object of class CovariateData
.
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.
# \donttest{
covariateData <- FeatureExtraction::createEmptyCovariateData(
cohortIds = 1,
aggregated = FALSE,
temporal = FALSE
)
covData <- tidyCovariateData(
covariateData = covariateData,
minFraction = 0.001,
normalize = TRUE,
removeRedundancy = TRUE
)
#> Tidying covariates took 0.0593 secs
# }