In addition to assisting researchers with their research, we also develop tools to assist with various tasks (primarily statistical and reporting). In the spirit of open science, we share these tools on various sharing platforms.
R is one of the two main statistical programming languages used at CTU Bern. During our work, we have developed the following packages for various tasks.
With accrualPlot
, it is easy to depict recruitment as a cumulative
incidence curve, a bar plot or to estimate the time point at which a
given number of participants will be been enrolled.
More information on accrualPlot
is available
here.
btabler
is a wrapper around the
xtable
package
allowing more optimized tables for use in LaTeX reports.
More information on btabler
is available
here.
HSAr
is a by-product of CTU Bern’s involvement in the SNFs Smarter
Health Case National Research Programme
(NRP74). It provides an
approach for creating so-called Hospital Service Areas - aggregated
areas supposed to reflect the patterns of flow from people live to where
they go to hospital. The method is described
here.
(The main repository is here)
Risk based monitoring was introduced as a GCP topic in the ICH GCP
E6(R2) revision with the aim of identifying particularly important risks
to a trial in order to circumvent them earlier and limit their influence
on a given trial. kpitools
has tools to assist in the calculation and
reporting of such risks (i.e. Key Performance Indicators, KPIs).
More information on kpitools
is available
here.
presize
is a package for precision based sample size calculations.
Rather than having a specific hypothesis to test, a trial might be
rather aimed at estimating the magnitude of a effect and want to have an
estimate with a certain precision (e.g. ‘how wide would my confidence
interval be with so-and-so many participants?’, or ‘how many
participants would be required to attain a confidence interval so
wide?’).
presize
is available on
CRAN and a
user-friendly, non-programmatic version of the application is available
here for those unfamiliar with R.
CTU Bern also has a so-called
universe, hosted by
ROpenSci, for easier installation of
our R packages. For packages not on CRAN, and those with versions not
yet posted to CRAN, it allows the installation of packages as if the
packages in the universe were a part of CRAN. For instance, presize
is
on CRAN but it’s
development version is on GitHub.
The CRAN version of the package can be installed with
install.packages("presize")
, while the development version must be
installed with remotes::install_github("CTU-Bern/presize")
. By using
the CTU-Bern universe, it is possible to install the development version
of presize
via the first syntax. The following code can be used to
tell R to search the CTU Bern universe for a package first and install
it from there if available and if not search CRAN instead (or whatever
repository is mentioned in the second place).
options(repos = c(ctu = "https://ctu-bern.r-universe.dev",
cran = "https://cloud.r-project.org"))
presize
, or any of the packages mentioned above, can then be installed
into R via e.g. install.packages("presize")
.
As well as the installation of the packages, the universe also has the vignettes and articles compiled
The options
code above should be put towards the top of a script or
perhaps in a .Rprofile
file (typically stored in the Documents or
project folder and is used for setting your personal defaults). See
here
for more details.
Stata is the second programming language primarily used at CTU Bern. Again, we have developed various codes that may be of general interest to users.
btable
makes creating baseline tables simple in Stata. It is a very
flexible approach used by most statisticians at CTU Bern, even those
that primarily use R for their analyses.
This repository contains code for reading secuTrial data into Stata and does a lot of preparatory tasks such as labeling variables and formatting dates.
CTU Bern was also actively involved in programming the
secuTrialR
package for loading secuTrial datasets in to R.