README.md

SelfControlledCaseSeries

Build Status codecov.io

SelfControlledCaseSeries is part of HADES.

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

Example

sccsData <- getDbSccsData(connectionDetails = connectionDetails,
                          cdmDatabaseSchema = cdmDatabaseSchema,
                          outcomeIds = 192671,
                          exposureIds = 1124300)

studyPop <- createStudyPopulation(sccsData = sccsData,
                                  outcomeId = 192671,
                                  firstOutcomeOnly = FALSE,
                                  naivePeriod = 180)

covarDiclofenac = createEraCovariateSettings(label = "Exposure of interest",
                                             includeEraIds = 1124300,
                                             start = 0,
                                             end = 0,
                                             endAnchor = "era end")

sccsIntervalData <- createSccsIntervalData(studyPop,
                                           sccsData,
                                           eraCovariateSettings = covarDiclofenac)
model <- fitSccsModel(sccsIntervalData)
model
# SccsModel object
# 
# Outcome ID: 192671
# 
# Outcome count:
#        outcomeSubjects outcomeEvents outcomeObsPeriods
# 192671          272243        387158            274449
# 
# Estimates:
# # A tibble: 1 x 7
#   Name                                ID Estimate LB95CI UB95CI logRr seLogRr
#   <chr>                            <dbl>    <dbl>  <dbl>  <dbl> <dbl>   <dbl>
# 1 Exposure of interest: Diclofenac  1000     1.18   1.13   1.24 0.167  0.0230

Technology

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

System Requirements

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

Installation

  1. See the instructions here for configuring your R environment, including Java.

  2. In R, use the following commands to download and install SelfControlledCaseSeries:

r install.packages("remotes") remotes::install_github("ohdsi/SelfControlledCaseSeries")

User Documentation

Documentation can be found on the package website.

PDF versions of the documentation are also available:

Support

Contributing

Read here how you can contribute to this package.

License

SelfControlledCaseSeries is licensed under Apache License 2.0

Development

SelfControlledCaseSeries is being developed in R Studio.

Development status

Stable. Actively used in several projects.

Acknowledgements



OHDSI/SelfControlledCaseSeries documentation built on Sept. 7, 2024, 8:24 a.m.