-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.Rmd
executable file
·36 lines (27 loc) · 1.77 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: "Analyzing RCTs: A Cookbook"
author: "Inge Christoffer Olsen"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output:
bookdown::gitbook: default
documentclass: book
bibliography: ["packages.bib"]
biblio-style: "apalike"
link-citations: yes
graphics: yes
github-repo: icostatistics/rct-cookbook
description: "The idea of this book is to capture some of the standard statistical analysis methods for randomised controlled trials"
---
# Preface
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](tidyverse.org) style of coding. The graphics are a mostly created using [ggplot2](ggplot2.tidyverse.org), but lately I have also started using the [`ggformula`](https://CRAN.R-project.org/package=ggformula) package. The "book" is written in [RMarkdown](https://rmarkdown.rstudio.com) with [bookdown](bookdown.org).
## Structure of the book
The structure of the book is not very sophisticated. First there is an introduction where I introduce the concept of an RCT, and then I simualte a trial to be used in the continuation of the book. Chapter 3 and 4 are description on how to analyse continuous and dichotomous endpoints, both for single and repeated follow-up observations. The plan is to include also a chapter on time to event endpoints and sample size calculations.
## Acknowledgements
```{r, include=FALSE}
# automatically create a bib database for R packages
knitr::write_bib(c(
.packages(), 'bookdown', 'knitr', 'rmarkdown', 'tidyverse', 'ggplot2', 'ggformula', 'margins'
), 'packages.bib')
```