Skip to content

zhongzhixu/SCCS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repository provides R codes for performing Self-Controlled Case Series (SCCS) analysis in a health records database to investigate the association of antidepressants with the risk of dementia.

The general design of the SCCS analysis

figure

Data

The original Data used in the paper is restricted by the ethics of Hospital Authority of Hong Kong. Fictive data is provided instead.

Columns

~ obs_start
~ obs_end
~ first_treatment_start
~ first_treatment_end
~ eventdate
~ case_id
~ sub_treatment_start
~ sub_treatment_end

Example

library(SCCS)
dats <- read.csv('simulated_data.csv',header = TRUE)
dat <- dats
#-----------------------------------
# Multiple exposure types
ageg=c(300,600,900)
con.mod <- standardsccs(event~first_treatment_start+sub_treatment_start+age, indiv=case_id,
                        astart=obs_start, aend=obs_end, aevent=eventdate,
                        adrug =cbind(first_treatment_start,sub_treatment_start),
                        aedrug=cbind(first_treatment_end,sub_treatment_end),
                        expogrp=list(c(-50,1), c(1)), washout=list(c(0,50), c(0)),
                        agegrp=ageg, data=dat)
con.mod

Environment

R (version 3.3.2)
Package "SCCS" (version 1.1)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages