Skip to content

Implementation of Baseline Regularization by Zhaobin et al. (KDD 2017) targeted to work with OMOP databases

License

Notifications You must be signed in to change notification settings

sverchkov/BaselineRegularization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BaselineRegularization

Build Status codecov

Introduction

Installation

The package can be installed from github with

devtools::install_github("sverchkov/BaselineRegularization", build_vignettes = TRUE)

Tutorial

The R vignettes include a tutorial that covers most features of the package, these can be accessed with

browseVignettes("BaselineRegularization")

Example

# Load the package
library("BaselineRegularization")

# Connect to Database, e.g. postgres [1]
con <- DBI::dbConnect( RPostgreSQL::PostgreSQL()
                     , host = "localhost"
                     , user = "user"
                     , dbname = "omop_example"
                     , password = rstudioapi::askForPassword("Database Password") )

# Define the Event of interest
event = 4110956 # The concept_id for "Acute myocardial infarction NOS"

# Extract relevant data
br_data <- prepareBRData( con, response_event = event )

# Parametrize task
parameters <- defineBRParameters()

# Fit model
fit <- fitBaselineRegularization( br_data, parameters )

# Show results (beta coefficients)
getCoefficients( fit )
  1. See this guide for a more comprehensive overview of database connection. We use dplyr under the hood.

Technology

BaselineRegularization is an R package.

System Requirements

Requires R (version 3.0.0 or greater).

Dependencies

Always required:

  • rlang (>= 0.2)
  • Matrix (>= 1.2)
  • dplyr (>= 0.7)
  • tidyr (>= 0.8)
  • glmnet (>= 2.0)
  • futile.logger (>= 1.4)

Required for database access:

  • DBI (>= 1.0.0),
  • dbplyr (>= 1.2),
  • Database drivers, depending on the database being accessed, e.g.
    • RPostgreSQL
    • RSQLite

Required for building the documentation:

  • knitr
  • rmarkdown

Required for testing:

  • testthat (>= 2.0.0)

License

BaselineRegularization is licensed under Apache License 2.0

Development

BaselineRegularization is being developed in R Studio.

We use the GitHub issue tracker for bugs and feature requests

References

Original papers describing the underlying algorithms:

OHDSI Symposium 2018 poster

About

Implementation of Baseline Regularization by Zhaobin et al. (KDD 2017) targeted to work with OMOP databases

Resources

License

Stars

Watchers

Forks

Packages

No packages published