For the federated analysis between the UK and Singapore, the Singapore TRE requires a standalone R script that will produce the same result on the same data as a 5s-TES analysis in the UK TRE(s?).
The R script runIncidence.R will run an incidence analysis.
There are comments throughout giving hints on how the analysis can be modified, though this is not complete.
The full set of parameters is best described in the documentation for generateConceptCohortSet, generateDenominatorCohortSet, and estimateIncidence, and the vignettes on the relevant packages.
The script can be run using Rscript. For a reproducible environment, the project uses rv, so to make sure the same package versions are used, you need to sync the packages:
rv syncThen activate the environment:
rv activateThe database connection uses environment variables, so to run the script:
DB_NAME=omop \ #your database name
DB_HOST=hostname \ #your database host
DB_PORT=5432 \ #the database port on your host
DB_PASSWORD=supersecret \ #your database password>
DB_USER=username \ # your database username
DB_READ_SCHEMA=omop \ # schema name containing omop tables
DB_WRITE_SCHEMA=omop \ #schema that the credentials can write to
Rscript runIncidence.RThe output will then be a csv in the omopgenerics summarised result format, saved to output/incidence.csv by default.
The outcome cohort is anyone with a diagnosis of breast cancer (concept_id 81251). This can be expanded to multiple cohorts, or a cohort with more than one code.
This describes the cohort of people who could develop breast cancer. Currently, it's people assigned either sex at birth, with any age from 0 to 150. There are lots of options to stratify this cohort. People are included in this cohort if observed between 2009 and 2025.
The script uses the outcome and denominator cohort definitions to estimate the incidence of the outcome in the denominator cohort.
This uses the defaults from estimateIncidence, estimating incidence per 100,000 person years for each year, with an infinite washout period.
This is then written as a summarisedResult to a file, currently output/incidence.csv.