Skip to contents

Creates nice self controlled case series plots

Usage

plotSccsEstimates(sccsData, sccsMeta = NULL, targetName, selectedAnalysisId)

Arguments

sccsData

The self controlled case series data

sccsMeta

(optional) The self controlled case seriesd evidence synthesis data

targetName

A friendly name for the target cohort

selectedAnalysisId

The analysis ID of interest to plot

Value

Returns a ggplot with the estimates

Details

Input the self controlled case series data

Examples


conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver

sccsEst <- getSccsEstimation(
  connectionHandler = connectionHandler, 
  schema = 'main',
  targetIds = 1,
  outcomeIds = 3
)
plotSccsEstimates(
  sccsData = sccsEst, 
  sccsMeta = NULL, 
  targetName = 'target', 
  selectedAnalysisId = 1
)
#> Warning: lower bound is zero - can not use log scale