This is a working document describing how I usually analyse and present randomized controlled trials (RCTs), both in Stata and R. It is mainly a repository for code I use and need to refer to instead of searching through old code, but it could be useful for other as well.
I am quite new to R, and have embraced the tidyverse style of coding. The graphics are a mostly created using ggplot2, but lately I have also started using the ggformula package. The “book” is written in RMarkdown with bookdown.
You can find the preview of this book at https://icostatistics.github.io/rct-cookbook/index.html.