Follow these instructions for setting up your R environment, including RTools and Java.
Create an empty folder or new RStudio project, and in R, use the following code to install the study package and its dependencies:
r
install.packages("renv")
download.file("https://raw.githubusercontent.com/ohdsi-studies/SkeletonComparativeEffectStudy/main/renv.lock", "renv.lock")
renv::init()
If renv mentions that the project already has a lockfile select "1: Restore the project from the lockfile.".
Once installed, you can execute the study by modifying and using the code below. For your convenience, this code is also provided under extras/CodeToRun.R:
```r library(SkeletonComparativeEffectStudy)
options(andromedaTempFolder = "s:/andromedaTemp")
maxCores <- parallel::detectCores()
minCellCount <- 5
outputFolder <- "c:/SkeletonComparativeEffectStudy"
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "redshift", connectionString = keyring::key_get("redShiftConnectionStringOhdaMdcr"), user = keyring::key_get("redShiftUserName"), password = keyring::key_get("redShiftPassword"))
cdmDatabaseSchema <- "cdm_truven_mdcr_v1911"
cohortDatabaseSchema <- "scratch_mschuemi" cohortTable <- "estimation_skeleton"
databaseId <- "IBM_MDCR" databaseName <- "IBM MarketScan® Medicare Supplemental and Coordination of Benefits Database" databaseDescription <- "IBM MarketScan® Medicare Supplemental and Coordination of Benefits Database (MDCR) represents health services of retirees in the United States with primary or Medicare supplemental coverage through privately insured fee-for-service, point-of-service, or capitated health plans. These data include adjudicated health insurance claims (e.g. inpatient, outpatient, and outpatient pharmacy). Additionally, it captures laboratory tests for a subset of the covered lives."
options(sqlRenderTempEmulationSchema = NULL)
execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, cohortDatabaseSchema = cohortDatabaseSchema, cohortTable = cohortTable, outputFolder = outputFolder, databaseId = databaseId, databaseName = databaseName, databaseDescription = databaseDescription, verifyDependencies = TRUE, createCohorts = TRUE, synthesizePositiveControls = TRUE, runAnalyses = TRUE, packageResults = TRUE, maxCores = maxCores) ```
Upload the file export/Results_<DatabaseId>.zip in the output folder to the study coordinator:
r
uploadResults(outputFolder, privateKeyFileName = "<file>", userName = "<name>")
Where <file> and <name< are the credentials provided to you personally by the study coordinator.
To view the results, use the Shiny app:
r
prepareForEvidenceExplorer("Result_<databaseId>.zip", "/shinyData")
launchEvidenceExplorer("/shinyData", blind = TRUE)
Note that you can save plots from within the Shiny app. It is possible to view results from more than one database by applying prepareForEvidenceExplorer to the Results file from each database, and using the same data folder. Set blind = FALSE if you wish to be unblinded to the final results.
The SkeletonComparativeEffectStudy package is licensed under Apache License 2.0
SkeletonComparativeEffectStudy was developed in ATLAS and R Studio.
Unknown
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.