An R package for performing self-controlled cohort analyses, a method to estimate risk by comparing time exposed with time unexposed among the exposed cohort.
Switch branches/tags
Nothing to show
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.
R
docs
extras
inst/sql/sql_server
man
tests
.Rbuildignore
.gitattributes
.gitignore
.project
.travis.yml
DESCRIPTION
NAMESPACE
README.md
SelfControlledCohort.Rproj
_pkgdown.yml
compare_versions
deploy.sh

README.md

SelfControlledCohort

Build Status codecov.io

SelfControlledCohort is part of the OHDSI Methods Library.

Introduction

This package provides a method to estimate risk by comparing time exposed with time unexposed among the exposed cohort.

Features

  • Extracts the necessary data from a database in OMOP Common Data Model format.
  • Supports stratification by age, gender, and index year.

Example

library(SelfControlledCohort)

connectionDetails <- createConnectionDetails(dbms = "postgresql",
                                             user = "joe",
                                             password = "secret",
                                             server = "myserver")
                                             
sccResults <- runSelfControlledCohort(connectionDetails,
                                     cdmDatabaseSchema = "cdm_data",
                                     exposureIds = c(767410, 1314924, 907879),
                                     outcomeIds = 444382,
                                     outcomeTable = "condition_era")

summary(sccResults)

Technology

SelfControlledCohort is an R package.

System Requirements

Requires R. Libraries used in SelfControlledCohort require Java.

Getting Started

  1. The DatabaseConnector and SqlRender packages require Java. Java can be downloaded from http://www.java.com.
  2. In R, use the following commands to download and install SelfControlledCohort:
install.packages("drat")
drat::addRepo("OHDSI")
install.packages("SelfControlledCohort")

User Documentation

Support

License

SelfControlledCohort is licensed under Apache License 2.0

Development

SelfControlledCohort is being developed in R Studio.

Development status

Beta