From 39a51125de9195efc839e27d696efdb464620d45 Mon Sep 17 00:00:00 2001 From: Chris Knoll Date: Fri, 19 Apr 2024 13:08:15 -0400 Subject: [PATCH] Exposed minCharacterizationMean param to createAggregateCovariateSettings. Updated examples to demonstrate createAggregateCovariateSettings$minCharacterizationMean param. Updated package version to 0.2.0. Requires FeatureExtraction >= 3.5.0. Updated News.md with changes. Regenerated site with pkgdown. --- DESCRIPTION | 4 +-- NEWS.md | 5 +++ R/AggregateCovariates.R | 12 +++++-- README.md | 2 +- docs/404.html | 4 +-- docs/articles/InstallationGuide.html | 6 ++-- .../UsingCharacterizationPackage.html | 34 ++++++++++--------- docs/articles/index.html | 4 +-- docs/authors.html | 4 +-- docs/index.html | 6 ++-- docs/news/index.html | 8 +++-- docs/pkgdown.yml | 2 +- docs/pull_request_template.html | 4 +-- docs/reference/Characterization-package.html | 4 +-- .../computeAggregateCovariateAnalyses.html | 4 +-- ...computeDechallengeRechallengeAnalyses.html | 4 +-- ...puteRechallengeFailCaseSeriesAnalyses.html | 4 +-- .../reference/computeTimeToEventAnalyses.html | 4 +-- .../createAggregateCovariateSettings.html | 13 +++++-- .../createCharacterizationSettings.html | 4 +-- .../createCharacterizationTables.html | 4 +-- .../createDechallengeRechallengeSettings.html | 4 +-- docs/reference/createSqliteDatabase.html | 4 +-- docs/reference/createTimeToEventSettings.html | 4 +-- .../exportAggregateCovariateToCsv.html | 4 +-- docs/reference/exportDatabaseToCsv.html | 4 +-- .../exportDechallengeRechallengeToCsv.html | 4 +-- .../exportRechallengeFailCaseSeriesToCsv.html | 4 +-- docs/reference/exportTimeToEventToCsv.html | 4 +-- docs/reference/index.html | 4 +-- .../loadAggregateCovariateAnalyses.html | 4 +-- .../loadCharacterizationSettings.html | 4 +-- .../loadDechallengeRechallengeAnalyses.html | 4 +-- ...loadRechallengeFailCaseSeriesAnalyses.html | 4 +-- docs/reference/loadTimeToEventAnalyses.html | 4 +-- .../runCharacterizationAnalyses.html | 4 +-- .../saveAggregateCovariateAnalyses.html | 4 +-- .../saveCharacterizationSettings.html | 4 +-- .../saveDechallengeRechallengeAnalyses.html | 4 +-- ...saveRechallengeFailCaseSeriesAnalyses.html | 4 +-- docs/reference/saveTimeToEventAnalyses.html | 4 +-- docs/reference/viewCharacterization.html | 4 +-- man/createAggregateCovariateSettings.Rd | 7 +++- vignettes/UsingCharacterizationPackage.Rmd | 5 +-- 44 files changed, 131 insertions(+), 101 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8f7a543..f9ef5fb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: Characterization Type: Package Title: Characterizations of Cohorts -Version: 0.1.5 +Version: 0.2.0 Date: 2024-04-03 Authors@R: c( person("Jenna", "Reps", , "reps@ohdsi.org", role = c("aut", "cre")), @@ -17,7 +17,7 @@ Depends: Imports: Andromeda, DatabaseConnector (>= 6.3.1), - FeatureExtraction (>= 3.0.0), + FeatureExtraction (>= 3.5.0), SqlRender (>= 1.9.0), ParallelLogger (>= 3.0.0), checkmate, diff --git a/NEWS.md b/NEWS.md index acf123e..c004996 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +Characterization 0.2.0 +====================== +Updated dependency to FeatureExtraction (>= 3.5.0) to support minCharacterizationMean paramater. + + Characterization 0.1.5 ====================== Changed export to csv approach to use batch export from SQLite (#41) diff --git a/R/AggregateCovariates.R b/R/AggregateCovariates.R index bad74ec..2f043f9 100644 --- a/R/AggregateCovariates.R +++ b/R/AggregateCovariates.R @@ -21,6 +21,9 @@ #' @param minPriorObservation The minimum time in the database a patient in the target cohorts must be observed prior to index #' @template timeAtRisk #' @param covariateSettings An object created using \code{FeatureExtraction::createCovariateSettings} +#' @param minCharacterizationMean The minimum mean value for characterization output. Values below this will be cut off from output. This +#' will help reduce the file size of the characterization output, but will remove information +#' on covariates that have very low values. The default is 0. #' #' @return #' A list with the settings @@ -34,7 +37,8 @@ createAggregateCovariateSettings <- function( startAnchor = "cohort start", riskWindowEnd = 365, endAnchor = "cohort start", - covariateSettings) { + covariateSettings, + minCharacterizationMean = 0) { errorMessages <- checkmate::makeAssertCollection() # check targetIds is a vector of int/double .checkCohortIds( @@ -81,7 +85,8 @@ createAggregateCovariateSettings <- function( startAnchor = startAnchor, riskWindowEnd = riskWindowEnd, endAnchor = endAnchor, - covariateSettings = covariateSettings + covariateSettings = covariateSettings, + minCharacterizationMean = minCharacterizationMean ) class(result) <- "aggregateCovariateSettings" @@ -163,7 +168,8 @@ computeAggregateCovariateAnalyses <- function( cohortId = -1, covariateSettings = aggregateCovariateSettings$covariateSettings, cdmVersion = cdmVersion, - aggregated = T + aggregated = T, + minCharacterizationMean = aggregateCovariateSettings$minCharacterizationMean ) # adding counts as a new table result$cohortCounts <- counts diff --git a/README.md b/README.md index 05b19e2..b3668ec 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ targetIds <- c(1,2,4) useDemographicsAge = T, useDemographicsRace = T ) - ) + ) aggregateCovariateSettings2 <- createAggregateCovariateSettings( targetIds = targetIds, diff --git a/docs/404.html b/docs/404.html index a8cd17d..16fc3ae 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ Characterization - 0.1.5 + 0.2.0 @@ -71,7 +71,7 @@