Skip to content

Commit

Permalink
New install dependency instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie authored and schuemie committed Jan 15, 2019
1 parent 695354f commit 5dcc42d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions extras/InstallDependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ install.packages(c("assertthat", "crayon", "bit", "cli", "devtools", "colorspace
# assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
# find_rtools()

install.packages("Cyclops")
devtools::install_github("ohdsi/SqlRender", dep = FALSE)
devtools::install_github("ohdsi/DatabaseConnectorJars", ref = "v1.0.0", dep = FALSE)
devtools::install_github("ohdsi/DatabaseConnector", ref = "v2.2.0", dep = FALSE)
devtools::install_github("ohdsi/Cyclops", ref = "v2.0.0", dep = FALSE)
devtools::install_github("ohdsi/DatabaseConnectorJars", dep = FALSE)
devtools::install_github("ohdsi/DatabaseConnector", dep = FALSE)
devtools::install_github("ohdsi/FeatureExtraction", ref = "v2.1.5", dep = FALSE)
devtools::install_github("ohdsi/ParallelLogger",ref = "develop",dep = FALSE)
devtools::install_github("ohdsi/CohortMethod", dep = FALSE)
Expand Down
15 changes: 11 additions & 4 deletions extras/PostHocAnalyses.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ outcomeModelReference <- readRDS(file.path(indicationFolder,
"cmOutput",
"outcomeModelReference1.rds"))
targetId <- 4
# comparatorId <- 15 # THZ
comparatorId <- 10 # dCCB
comparatorId <- 15 # THZ
# comparatorId <- 10 # dCCB
outcomeId <- 32
censorId <- 1
analysisId <- 1
Expand All @@ -32,8 +32,13 @@ analysisId <- 1
pairedCohortTable <- paste(tablePrefix, tolower(indicationId), "pair_cohort", sep = "_")
pathToCsv <- system.file("settings", "ExposuresOfInterest.csv", package = "Legend")
exposuresOfInterest <- read.csv(pathToCsv)
censorDescendantIds <- exposuresOfInterest$includedConceptIds[exposuresOfInterest$cohortId == censorId]
censorDescendantIds <- as.numeric(strsplit(as.character(censorDescendantIds), ";")[[1]])
exposuresOfInterest <- exposuresOfInterest[exposuresOfInterest$indicationId == indicationId, ]
# exposuresOfInterest <- exposuresOfInterest[exposuresOfInterest$cohortId == censorId, ]
censorDescendantIds <- exposuresOfInterest$includedConceptIds
censorDescendantIds <- as.numeric(unlist(strsplit(as.character(censorDescendantIds), ";")))
censorDescendantIds <- c(censorDescendantIds,
exposuresOfInterest$conceptId[exposuresOfInterest$includedConceptIds == ""])
censorDescendantIds <- unique(censorDescendantIds)
sql <- "SELECT DATEDIFF(DAY, cohort_start_date, MIN(drug_era_start_date)) AS days_to_censor,
cohort_start_date,
subject_id
Expand Down Expand Up @@ -85,3 +90,5 @@ stratPop$outcomeCount[idx] <- 0
om <- CohortMethod::fitOutcomeModel(population = stratPop, modelType = "cox", stratified = TRUE)
om
summary(om)
stratPop$stratumId <- NULL
CohortMethod::plotKaplanMeier(stratPop)

0 comments on commit 5dcc42d

Please sign in to comment.