An R package for performing Self-Controlled Case Series (SCCS) analyses in an observational database in the OMOP Common Data Model.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
R
docs
extras
inst
man
src
tests
vignettes
.Rbuildignore
.cproject
.gitattributes
.gitignore
.project
.travis.yml
DESCRIPTION
NAMESPACE
README.md
SelfControlledCaseSeries.Rproj
_pkgdown.yml
compare_versions
deploy.sh

README.md

SelfControlledCaseSeries

Build Status codecov.io

SelfControlledCaseSeries is part of the OHDSI Methods Library.

Introduction

SelfControlledCaseSeries is an R package for performing Self-Controlled Case Series (SCCS) analyses in an observational database in the OMOP Common Data Model.

Features

  • Extracts the necessary data from a database in OMOP Common Data Model format.
  • Optionally add seasonality using a spline function.
  • Optionally add age using a spline function.
  • Optionally correct for event-dependent censoring of the observation period.
  • Optionally add many covariates in one analysis (e.g. all drugs).
  • Options for constructing different types of covariates and risk windows, including pre-exposure windows (to capture contra-indications).
  • Optionally use regularization on all covariates except the outcome of interest.

Example

sccsData <- getDbSccsData(connectionDetails = connectionDetails,
                          cdmDatabaseSchema = cdmDatabaseSchema,
                          outcomeIds = 192671,
                          exposureIds = 1124300)
covarDiclofenac = createCovariateSettings(label = "Exposure of interest",
                                          includeCovariateIds = 1124300,
                                          start = 0,
                                          end = 0,
                                          addExposedDaysToEnd = TRUE)
sccsEraData <- createSccsEraData(sccsData,
                                 naivePeriod = 180,
                                 firstOutcomeOnly = FALSE,
                                 covariateSettings = covarDiclofenac)
model <- fitSccsModel(sccsEraData)
summary(model)
# sccsModel object summary
# 
# Outcome ID: 192671
# 
# Outcome count:
#        Event count Case count
# 192671      433433     137888
# 
# Estimates:
#                               Name    ID  Estimate  lower .95  upper .95   logRr  seLogRr
#   Exposure of interest: Diclofenac  1000     1.274      1.213      1.336  0.2421  0.02431

Technology

SelfControlledCaseSeries is an R package, with some functions implemented in C++.

System Requirements

Requires R (version 3.2.2 or higher). Installation on Windows requires RTools. Libraries used in SelfControlledCaseSeries require Java.

Getting Started

  1. On Windows, make sure RTools is installed.
  2. The DatabaseConnector and SqlRender packages require Java. Java can be downloaded from http://www.java.com.
  3. In R, use the following commands to download and install SelfControlledCaseSeries:
install.packages("drat")
drat::addRepo("OHDSI")
install.packages("SelfControlledCaseSeries")

User Documentation

Support

License

SelfControlledCaseSeries is licensed under Apache License 2.0

Development

SelfControlledCaseSeries is being developed in R Studio.

Development status

Beta

Acknowledgements

  • This project is supported in part through the National Science Foundation grant IIS 1251151.
  • Part of the code is based on the SCCS package by Yonas Ghebremichael-Weldeselassie, Heather Whitaker, and Paddy Farrington.