diff --git a/DESCRIPTION b/DESCRIPTION index db5f55dc..64a8acc3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: Strategus Type: Package Title: Coordinating and Executing Analytics Using HADES Modules -Version: 0.0.4 -Date: 2023-03-29 +Version: 0.0.5 +Date: 2023-04-13 Authors@R: c( person("Martijn", "Schuemie", email = "schuemie@ohdsi.org", role = c("aut", "cre")), person("Anthony", "Sena", email = "sena@ohdsi.org", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index ba8022d9..2ec594aa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +Strategus 0.0.5 +=============== + +- Required metadata tables check fails with DatabaseConnector < 6.0 (#61) +- Update module references and add script to run Strategus on Eunomia in `extras/ExecuteStrategusOnEunomia.R` (#66) + Strategus 0.0.4 =============== diff --git a/R/DatabaseMetaData.R b/R/DatabaseMetaData.R index bcf20a9e..cdd775f3 100644 --- a/R/DatabaseMetaData.R +++ b/R/DatabaseMetaData.R @@ -42,7 +42,7 @@ createDatabaseMetaData <- function(executionSettings, keyringName = NULL) { connection = connection, databaseSchema = executionSettings$cdmDatabaseSchema ) - + cdmTableList <- tolower(cdmTableList) if (!length(cdmTableList[which(x = cdmTableList %in% requiredTables)]) == length(requiredTables)) { missingCdmTables <- requiredTables[!(requiredTables %in% cdmTableList)] diff --git a/docs/404.html b/docs/404.html index cb099a47..41244dbd 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@
diff --git a/docs/articles/CreatingAnalysisSpecification.html b/docs/articles/CreatingAnalysisSpecification.html index c84b30a0..c7aeddc2 100644 --- a/docs/articles/CreatingAnalysisSpecification.html +++ b/docs/articles/CreatingAnalysisSpecification.html @@ -33,7 +33,7 @@ @@ -94,7 +94,7 @@vignettes/CreatingAnalysisSpecification.Rmd
CreatingAnalysisSpecification.Rmd
source("https://raw.githubusercontent.com/OHDSI/CohortIncidenceModule/v0.0.6/SettingsFunctions.R")
-library(CohortIncidence)
+library(CohortIncidence)
targets <- list(
- createCohortRef(id = 1, name = "Celecoxib"),
- createCohortRef(id = 2, name = "Diclofenac"),
- createCohortRef(id = 4, name = "Celecoxib Age >= 30"),
- createCohortRef(id = 5, name = "Diclofenac Age >= 30")
+ createCohortRef(id = 1, name = "Celecoxib"),
+ createCohortRef(id = 2, name = "Diclofenac"),
+ createCohortRef(id = 4, name = "Celecoxib Age >= 30"),
+ createCohortRef(id = 5, name = "Diclofenac Age >= 30")
)
-outcomes <- list(createOutcomeDef(id = 1, name = "GI bleed", cohortId = 3, cleanWindow = 9999))
+outcomes <- list(createOutcomeDef(id = 1, name = "GI bleed", cohortId = 3, cleanWindow = 9999))
tars <- list(
- createTimeAtRiskDef(id = 1, startWith = "start", endWith = "end"),
- createTimeAtRiskDef(id = 2, startWith = "start", endWith = "start", endOffset = 365)
+ createTimeAtRiskDef(id = 1, startWith = "start", endWith = "end"),
+ createTimeAtRiskDef(id = 2, startWith = "start", endWith = "start", endOffset = 365)
)
-analysis1 <- createIncidenceAnalysis(
+analysis1 <- createIncidenceAnalysis(
targets = c(1, 2, 4, 5),
outcomes = c(1),
tars = c(1, 2)
)
-irDesign <- createIncidenceDesign(
+irDesign <- createIncidenceDesign(
targetDefs = targets,
outcomeDefs = outcomes,
tars = tars,
analysisList = list(analysis1),
- strataSettings = createStrataSettings(
+ strataSettings = createStrataSettings(
byYear = TRUE,
byGender = TRUE
)
@@ -281,11 +281,11 @@ Characterization Module Settings
-source("https://raw.githubusercontent.com/OHDSI/CharacterizationModule/v0.3.0/SettingsFunctions.R")
+source("https://raw.githubusercontent.com/OHDSI/CharacterizationModule/v0.3.1/SettingsFunctions.R")
characterizationModuleSpecifications <- createCharacterizationModuleSpecifications(
targetIds = c(1, 2),
outcomeIds = 3,
- covariateSettings = FeatureExtraction::createDefaultCovariateSettings(),
+ covariateSettings = FeatureExtraction::createDefaultCovariateSettings(),
dechallengeStopInterval = 30,
dechallengeEvaluationWindow = 30,
timeAtRisk = data.frame(
@@ -303,7 +303,7 @@ CohortMethod Module Settings
-library(CohortMethod)
+library(CohortMethod)
source("https://raw.githubusercontent.com/OHDSI/CohortMethodModule/v0.1.0/SettingsFunctions.R")
negativeControlOutcomes <- lapply(
X = ncoCohortSet$cohortId,
@@ -324,13 +324,13 @@ CohortMethod Module SettingsoutcomesOfInterest
)
-tcos1 <- CohortMethod::createTargetComparatorOutcomes(
+tcos1 <- CohortMethod::createTargetComparatorOutcomes(
targetId = 1,
comparatorId = 2,
outcomes = outcomes,
excludedCovariateConceptIds = c(1118084, 1124300)
)
-tcos2 <- CohortMethod::createTargetComparatorOutcomes(
+tcos2 <- CohortMethod::createTargetComparatorOutcomes(
targetId = 4,
comparatorId = 5,
outcomes = outcomes,
@@ -339,9 +339,9 @@ CohortMethod Module SettingstargetComparatorOutcomesList <- list(tcos1, tcos2)
-covarSettings <- FeatureExtraction::createDefaultCovariateSettings(addDescendantsToExclude = TRUE)
+covarSettings <- FeatureExtraction::createDefaultCovariateSettings(addDescendantsToExclude = TRUE)
-getDbCmDataArgs <- CohortMethod::createGetDbCohortMethodDataArgs(
+getDbCmDataArgs <- CohortMethod::createGetDbCohortMethodDataArgs(
washoutPeriod = 183,
firstExposureOnly = TRUE,
removeDuplicateSubjects = "remove all",
@@ -349,7 +349,7 @@ CohortMethod Module Settings= covarSettings
)
-createStudyPopArgs <- CohortMethod::createCreateStudyPopulationArgs(
+createStudyPopArgs <- CohortMethod::createCreateStudyPopulationArgs(
minDaysAtRisk = 1,
riskWindowStart = 0,
startAnchor = "cohort start",
@@ -357,18 +357,18 @@ CohortMethod Module Settings= "cohort end"
)
-matchOnPsArgs <- CohortMethod::createMatchOnPsArgs()
-fitOutcomeModelArgs <- CohortMethod::createFitOutcomeModelArgs(modelType = "cox")
-createPsArgs <- CohortMethod::createCreatePsArgs(
+matchOnPsArgs <- CohortMethod::createMatchOnPsArgs()
+fitOutcomeModelArgs <- CohortMethod::createFitOutcomeModelArgs(modelType = "cox")
+createPsArgs <- CohortMethod::createCreatePsArgs(
stopOnError = FALSE,
- control = Cyclops::createControl(cvRepetitions = 1)
+ control = Cyclops::createControl(cvRepetitions = 1)
)
-computeSharedCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs()
-computeCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs(
- covariateFilter = FeatureExtraction::getDefaultTable1Specifications()
+computeSharedCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs()
+computeCovBalArgs <- CohortMethod::createComputeCovariateBalanceArgs(
+ covariateFilter = FeatureExtraction::getDefaultTable1Specifications()
)
-cmAnalysis1 <- CohortMethod::createCmAnalysis(
+cmAnalysis1 <- CohortMethod::createCmAnalysis(
analysisId = 1,
description = "No matching, simple outcome model",
getDbCohortMethodDataArgs = getDbCmDataArgs,
@@ -376,7 +376,7 @@ CohortMethod Module Settings= fitOutcomeModelArgs
)
-cmAnalysis2 <- CohortMethod::createCmAnalysis(
+cmAnalysis2 <- CohortMethod::createCmAnalysis(
analysisId = 2,
description = "Matching on ps and covariates, simple outcomeModel",
getDbCohortMethodDataArgs = getDbCmDataArgs,
@@ -406,7 +406,7 @@ SelfControlledCaseSeries Modul
cohortMethodModuleSpecifications
to perform a comparative
cohort analysis for this study.
-library(SelfControlledCaseSeries)
+library(SelfControlledCaseSeries)
source(url = "https://raw.githubusercontent.com/OHDSI/SelfControlledCaseSeriesModule/v0.1.3/SettingsFunctions.R")
# Exposures-outcomes -----------------------------------------------------------
@@ -417,21 +417,21 @@ SelfControlledCaseSeries Modul
exposuresOutcomeList <- list()
for (exposureOfInterestId in exposureOfInterestIds) {
for (outcomeOfInterestId in outcomeOfInterestIds) {
- exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome(
+ exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome(
outcomeId = outcomeOfInterestId,
- exposures = list(createExposure(exposureId = exposureOfInterestId))
+ exposures = list(createExposure(exposureId = exposureOfInterestId))
)
}
for (negativeControlOutcomeId in negativeControlOutcomeIds) {
- exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome(
+ exposuresOutcomeList[[length(exposuresOutcomeList) + 1]] <- createExposuresOutcome(
outcomeId = negativeControlOutcomeId,
- exposures = list(createExposure(exposureId = exposureOfInterestId, trueEffectSize = 1))
+ exposures = list(createExposure(exposureId = exposureOfInterestId, trueEffectSize = 1))
)
}
}
# Analysis settings ------------------------------------------------------------
-getDbSccsDataArgs <- SelfControlledCaseSeries::createGetDbSccsDataArgs(
+getDbSccsDataArgs <- SelfControlledCaseSeries::createGetDbSccsDataArgs(
studyStartDate = "",
studyEndDate = "20191130",
maxCasesPerOutcome = 1e6,
@@ -440,12 +440,12 @@ SelfControlledCaseSeries Modul
deleteCovariatesSmallCount = 0
)
-createStudyPopulation6AndOlderArgs <- SelfControlledCaseSeries::createCreateStudyPopulationArgs(
+createStudyPopulation6AndOlderArgs <- SelfControlledCaseSeries::createCreateStudyPopulationArgs(
minAge = 18,
naivePeriod = 365
)
-covarPreExp <- SelfControlledCaseSeries::createEraCovariateSettings(
+covarPreExp <- SelfControlledCaseSeries::createEraCovariateSettings(
label = "Pre-exposure",
includeEraIds = "exposureId",
start = -30,
@@ -453,7 +453,7 @@ SelfControlledCaseSeries Modul
endAnchor = "era start"
)
-covarExposureOfInt <- SelfControlledCaseSeries::createEraCovariateSettings(
+covarExposureOfInt <- SelfControlledCaseSeries::createEraCovariateSettings(
label = "Main",
includeEraIds = "exposureId",
start = 1,
@@ -464,27 +464,27 @@ SelfControlledCaseSeries Modul
exposureOfInterest = TRUE
)
-calendarTimeSettings <- SelfControlledCaseSeries::createCalendarTimeCovariateSettings(
+calendarTimeSettings <- SelfControlledCaseSeries::createCalendarTimeCovariateSettings(
calendarTimeKnots = 5,
allowRegularization = TRUE,
computeConfidenceIntervals = FALSE
)
-seasonalitySettings <- SelfControlledCaseSeries::createSeasonalityCovariateSettings(
+seasonalitySettings <- SelfControlledCaseSeries::createSeasonalityCovariateSettings(
seasonKnots = 5,
allowRegularization = TRUE,
computeConfidenceIntervals = FALSE
)
-createSccsIntervalDataArgs <- SelfControlledCaseSeries::createCreateSccsIntervalDataArgs(
+createSccsIntervalDataArgs <- SelfControlledCaseSeries::createCreateSccsIntervalDataArgs(
eraCovariateSettings = list(covarPreExp, covarExposureOfInt),
seasonalityCovariateSettings = seasonalitySettings,
calendarTimeCovariateSettings = calendarTimeSettings,
minCasesForTimeCovariates = 100000
)
-fitSccsModelArgs <- SelfControlledCaseSeries::createFitSccsModelArgs(
- control = Cyclops::createControl(
+fitSccsModelArgs <- SelfControlledCaseSeries::createFitSccsModelArgs(
+ control = Cyclops::createControl(
cvType = "auto",
selectorType = "byPid",
startingVariance = 0.1,
@@ -494,7 +494,7 @@ SelfControlledCaseSeries Modul
)
)
-sccsAnalysis1 <- SelfControlledCaseSeries::createSccsAnalysis(
+sccsAnalysis1 <- SelfControlledCaseSeries::createSccsAnalysis(
analysisId = 1,
description = "SCCS age 18-",
getDbSccsDataArgs = getDbSccsDataArgs,
@@ -518,30 +518,30 @@ PatientLevelPrediction Module Se
The following code creates the plpModuleSpecifications
to perform a self-controlled case series analysis for this study.
-source("https://raw.githubusercontent.com/OHDSI/PatientLevelPredictionModule/v0.0.8/SettingsFunctions.R")
+source("https://raw.githubusercontent.com/OHDSI/PatientLevelPredictionModule/v0.1.0/SettingsFunctions.R")
makeModelDesignSettings <- function(targetId, outcomeId, popSettings, covarSettings) {
- invisible(PatientLevelPrediction::createModelDesign(
+ invisible(PatientLevelPrediction::createModelDesign(
targetId = targetId,
outcomeId = outcomeId,
- restrictPlpDataSettings = PatientLevelPrediction::createRestrictPlpDataSettings(),
+ restrictPlpDataSettings = PatientLevelPrediction::createRestrictPlpDataSettings(),
populationSettings = popSettings,
covariateSettings = covarSettings,
- preprocessSettings = PatientLevelPrediction::createPreprocessSettings(),
- modelSettings = PatientLevelPrediction::setLassoLogisticRegression(),
- splitSettings = PatientLevelPrediction::createDefaultSplitSetting(),
+ preprocessSettings = PatientLevelPrediction::createPreprocessSettings(),
+ modelSettings = PatientLevelPrediction::setLassoLogisticRegression(),
+ splitSettings = PatientLevelPrediction::createDefaultSplitSetting(),
runCovariateSummary = T
))
}
-plpPopulationSettings <- PatientLevelPrediction::createStudyPopulationSettings(
+plpPopulationSettings <- PatientLevelPrediction::createStudyPopulationSettings(
startAnchor = "cohort start",
riskWindowStart = 1,
endAnchor = "cohort start",
riskWindowEnd = 365,
minTimeAtRisk = 1
)
-plpCovarSettings <- FeatureExtraction::createDefaultCovariateSettings()
+plpCovarSettings <- FeatureExtraction::createDefaultCovariateSettings()
modelDesignList <- list()
for (i in 1:length(exposureOfInterestIds)) {
diff --git a/docs/articles/CreatingModules.html b/docs/articles/CreatingModules.html
index 28670e88..d8892cba 100644
--- a/docs/articles/CreatingModules.html
+++ b/docs/articles/CreatingModules.html
@@ -33,7 +33,7 @@
@@ -94,7 +94,7 @@ Creating Strategus Modules
Anthony G.
Sena
- 2023-03-29
+ 2023-04-13
Source: vignettes/CreatingModules.Rmd
CreatingModules.Rmd
diff --git a/docs/articles/ExecuteStrategus.html b/docs/articles/ExecuteStrategus.html
index 9e944fc7..f0947815 100644
--- a/docs/articles/ExecuteStrategus.html
+++ b/docs/articles/ExecuteStrategus.html
@@ -33,7 +33,7 @@
@@ -94,7 +94,7 @@ Execute Strategus
Anthony G.
Sena
- 2023-03-29
+ 2023-04-13
Source: vignettes/ExecuteStrategus.Rmd
ExecuteStrategus.Rmd
diff --git a/docs/articles/IntroductionToStrategus.html b/docs/articles/IntroductionToStrategus.html
index aec5d3f6..6ffa2fd2 100644
--- a/docs/articles/IntroductionToStrategus.html
+++ b/docs/articles/IntroductionToStrategus.html
@@ -33,7 +33,7 @@
@@ -94,7 +94,7 @@ Introduction to Strategus
Anthony G.
Sena
- 2023-03-29
+ 2023-04-13
Source: vignettes/IntroductionToStrategus.Rmd
IntroductionToStrategus.Rmd
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 7bc4947a..9d03d40b 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -17,7 +17,7 @@
NEWS.md
+