R code for Tofacitinib versus vedolizumab among bio-naïve patients with ulcerative colitis: A real-world propensity-weighted comparison by Gros and Constantine-Cooke et al.
This study used inverse propensity of treatment weighting to compare two drugs commonly used to treat ulcerative colitis, tofacitinib and vedolizumab.
Ulcerative colitis is an inflammatory bowel disease which frequently results in rectal bleeding, urgently needing the toilet, and poor quality of life. Whilst many drugs have emerged for treating ulcerative colitis, it remains difficult for clinicians to decide which treatments is most appropriate for their patient. In this study, we compared two treatments for ulcerative colitis, vedolizumab and tofacitinib using data collected as part of clinical care.
It is usually problematic to directly compare treatments using data obtained via routine clinical care. For example, a certain drug might only be given to patients with severe disease. As these patients are more likely to need surgery or be hospitalised, the drug would appear to be less effective than drugs only given to patients with less severe disease.
We used a method called inverse propensity of treatment weighting which uses the probability of a patient being given a specific treatment to balance the dataset. This allowed treatments to be directly and fairly compared using our data.
We analysed 158 (81 vedolizumab and 77 tofacitinib) ulcerative colitis patients receiving care from the NHS Lothian health board. For all patients, this was the first time they received a biologic or small molecule drug.
Age, sex, disease duration, a blood-based marker of inflammation, ongoing steroids, and a disease activity score taken at time of treatment commencement were used to calculate the probability of treatment assignment. We successfully balanced the treatment groups which allowed us to compare persistence, effectiveness, and safety.
Whilst we found both drugs to be similarly effective 12 and 52 weeks after treatment commencement, patients on vedolizumab were more likely to still be on the drug two years later than those given tofacitinib.
Safety data were comparable although tofacitinib patients were more likely to need to temporarily pause their medication due to side effects.
This study is the first comparison of vedolizumab and tofacitinib and may assist clinicians when choosing the most appropriate treatment for their patients.
Re-rendering these reports requires access to unconsented patient data which
cannot be shared publicly. The analysis code assumed these data have been stored
in a data directory.
To re-run the analyses, you can either use Docker (preferred) or use your native operating system.
Docker containers are standardized, executable components that combine application source code with the operating system libraries and dependencies needed to run that code in any environment. This makes it easy to ensure that the code runs the same way on all machines.
If Docker is not already installed, then first install Docker.
The Docker image can then be pulled from the GitHub Container Registry.
docker pull ghcr.io/nathansam/vedo-vs-tofaThe following command can then be used to re-run the analyses via a Docker container.
docker container run --rm \
--mount type=bind,source="$(pwd)/data/",target="/analysis/data" \
--mount type=bind,source="$(pwd)/docs",target="/analysis/docs" \
--mount type=bind,source="$(pwd)/src",target="/analysis/src" \
ghcr.io/nathansam/vedo-vs-tofaDue to the large size of the image, you may wish to delete the image after running the analysis.
docker image rm ghcr.io/nathansam/vedo-vs-tofaIf running the analyses on your native OS, you will need R and Quarto.