generated from rstudio/bookdown-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.Rmd
190 lines (127 loc) · 15.1 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
title: "Covariate Adjustment in Randomized Trials"
author: "Josh Betz, Kelly van Lancker, and Michael Rosenblum"
site: bookdown::bookdown_site
output:
bookdown::html_book:
theme: united
split_by: none
bibliography: covariate_adjustment.bib
url: https://covariateadjustment.github.io
description: |
This a series of tutorials meant to help investigators apply covariate
adjusted analyses in randomized trials.
link-citations: yes
github-repo: covariateadjustment/covariateadjustment.github.io
---
```{r Book-Setup, echo = FALSE, message = FALSE}
library(tidyverse)
library(table1)
### Set Default Options ########################################################
fig_w <- 8
fig_h <- 8
knitr::opts_chunk$set(
echo = TRUE,
message = FALSE,
results = "markup",
fig.width = fig_w,
fig.height = fig_h,
fig.align = "center",
out.width = "80%",
dpi = 300,
dev = "CairoPNG"
)
set.seed(54321)
if(!file.exists(file.path(getwd(), "docs"))){
dir.create(file.path(getwd(), "docs"), recursive = TRUE)
}
if(!file.exists(file.path(getwd(), "docs", ".nojekyll"))){
file.create(file.path(getwd(), "docs", ".nojekyll"))
}
```
```{r Load-or-Cache_results}
results_code_file <-
"cache_results.r"
cached_results_file <-
"covariateadjustment_github_io_cached.Rdata"
results_code_path <-
file.path(getwd(), results_code_file)
cached_results_path <-
file.path(getwd(), cached_results_file)
cached_results_exist <-
file.exists(cached_results_path)
if(cached_results_exist) {
load(file = cached_results_path)
} else {
source(file = results_code_path)
}
```
# Covariate Adjustment: Opportunities and Challenges
Randomized trials are an important tool for generating evidence to inform practice in medicine, public health, science, and industry. Planning ethical, informative, and cost-effective studies requires many careful considerations during the development of the study design and statistical analysis plan. One of these considerations should be how to utilize the information about study participants that is known before randomization takes place. Variables observed prior to randomization, known as baseline covariates, can provide information about the outcomes that are observed during the study. Leveraging the information in baseline covariates could improve our inference about the potential benefits or harms of an intervention. Utilizing this information effectively in the study design and analysis plan has the potential to reduce the number of participants required or the duration of the study without sacrificing the precision of our inference. Such methods can make evaluating interventions more ethical and cost effective, and is generally supported by regulatory agencies.
This book is about the practice of applying covariate adjustment in randomized trials. While there are many approaches for covariate adjustment, our focus will be on estimating the average outcome in a population under different potential treatment assignments, known as marginal treatment effects. Investigators may be interested in comparing the average outcome within strata of a population under different potential treatment assignments, which are known as conditional treatment effects. While conditional treatment effects will arise in our discussion along the way, they will not be our primary focus.
Since randomized trials serve such an important role in policy and practice, stakeholders may be understandably cautious about changing how such research is carried out. It is important that investigators, regulators, reviewers, and readers trust the methods chosen for an application and understand how they compare to potential alternative approaches. It is natural to ask what assumptions are required for the validity of a covariate adjusted analysis, how such results should be interpreted, and how these differ from an unadjusted approach.
The methods that we consider should meet certain acceptability criteria. Firstly, an acceptable approach must not change the statistical and scientific focus of investigation. In other words, our covariate-adjusted approach should infer about the same quantities of interest, or estimands, as an unadjusted approach. Secondly, an acceptable approach must not require stronger, more restrictive assumptions: the assumptions for the validity of a covariate-adjusted approach should be the same or less stringent than an unadjusted approach. Finally, a covariate-adjusted approach should have the same or better precision than the unadjusted estimator.
Statisticians rely on regression models in many contexts to relate covariate information to an outcome of interest. Before interpreting regression coefficients, there is often a great deal of consideration put into choosing an appropriate specification for the model: which variables should be included in the model, how they should be included, and how to link the covariates to the scale of the outcome. Appropriate interpretation and application of models requires some assumptions about how closely the fitted model is to the true data generating process, which is unknown in practice.
Since regression models are used to perform covariate adjustment, it is natural to ask whether using such models also requires assumptions about how closely the specified model is to the true data generating process. What may be surprising to some is that covariate adjusted analyses can be valid under arbitrary model misspecification. Even though covariate adjustment may use regression models to construct an estimator, the validity of the resulting estimator does not require that the model is correctly specified. This is particularly important if we are to have covariate-adjusted methods that do not require stronger assumptions than an unadjusted analysis. Use of regression models allow us to do covariate-adjusted analyses for continuous, binary, ordinal, or time-to-event outcomes, allowing them to be applied to many research areas and questions.
While covariate adjustment has the potential to improve precision and make research more ethical and cost effective, there are still challenges to be addressed in practice. Firstly, the amount of precision gained by using covariate adjustment is not known a priori. We need study designs and analysis plans that guarantee the desired level of statistical power and control of error rates irrespective of the amount of precision gained by using covariate adjustment. Secondly, we need a theoretical framework which includes a broad class of estimators in a single framework. The methods employed must address missing data due to dropout, and incomplete data from participants whose outcomes have yet to be collected. Investigators need the information to effectively advocate for the use of these methods with stakeholders, regulators, and reviewers. Practitioners need validated, freely available software to make applying these methods straightforward. Finally, general guidance and best practices need to be established so as to make covariate adjusted analyses as well understood and trusted as their unadjusted counterparts. We will address each of these challenges in the material ahead.
--------------------------------------------------------------------------------
## Using this Book
This book is meant to provide worked examples to help practitioners apply covariate adjustment in practice. The material will be most accessible to a reader who has a good understanding of probability and statistics (confidence intervals, hypothesis testing), generalized linear models, and survival analysis. Some familiarity with concepts in randomized trials and causal inference is helpful, but not required. In order to make these methods broadly available, we provide worked examples using the R environment for statistical computing, which is free and open source software. While not all users may be familiar with R, we provide example code and links to additional resources to help users understand how to apply it in practice. The data in our examples are simulated from actual randomized trial data, meant to mimic key features such as missingness patterns and the distribution of outcomes and covariates.
We will start with an overview of key ideas and findings from research in randomized trial methodology. From there, we will discuss different targets of inference, or estimands, that may be of interest to investigators. Afterwards, we provide a brief overview of using R, and how to install the necessary software to perform covariate adjustment. With the necessary background in place, we will begin with the most simple and commonly used approach for covariate adjustment, the analysis of covariance (ANCOVA), show how this approach can be generalized to binary and other types of outcomes. From there, we will discuss how to address the issues of missing data in baseline covariates and outcomes using doubly robust methods.
Since randomized trials are often designed with incomplete and imprecise information, the study design should incorporate pre-planned analyses to determine if the study should continue or be stopped for either success or futility. We discuss how covariate adjustment can be integrated into such analysis plans. Finally, we discuss some recommendations for applying these methods in practice.
--------------------------------------------------------------------------------
## Case Studies
The datasets used in our examples are simulated data based on actual randomized trials, with considerable effort spent making the data as realistic as possible. The original study data was used to create regression models for the outcomes of interest and missingness patterns. Next, simulated covariate data were created by resampling the original covariate data, and perturbing the resampled data. Simulated outcome data and missingness patterns were generated using predictions from the outcome regression models, using the simulated covariates as input.
--------------------------------------------------------------------------------
### Buprenorphine tapering schedule and illicit opioid use: CTN-03 {#ctn_03}
[CTN-03](https://pubmed.ncbi.nlm.nih.gov/19149822) ([NCT00078117](https://clinicaltrials.gov/show/NCT00078117)) was two-arm a phase III trial to compare two potential tapering schedules of the drug buprenorphine, a pharmacotherapy for opioid dependence [@Ling2009]. At the time of the study design, there was considerable variation in tapering schedules in practice, and a knowledge gap in terms of the best way to administer buprenorphine to control withdrawal symptoms and give the greatest chance of abstinence at the end of treatment. It was hypothesized that a longer taper schedule would result in greater likelihood of a participant being retained on study and providing opioid-free urine samples at the end of the drug taper schedule.
Participants were randomized 1:1 to a 7-day or 28-day taper using stratified block randomization across 11 sites in 10 US cities. Randomization was stratified by the maintenance dose of buprenorphine at stabilization: 8, 16, or 24 mg. The structure of the CTN-03 simulated data is as follows:
- Baseline Covariates
- `age`: Participant age at baseline
- `sex`: Participant sex
- `race`: Participant race
- `ethnic`: Participant ethnicity
- `marital`: Participant marital status
- Randomization Information
- `arm`: Treatment Arm
- `stability_dose`: Stratification Factor
- Baseline (`_bl`) & End-Of-Taper (`_eot`) Outcomes:
- `arsw_score`: Adjective Rating Scale for Withdrawal (ARSW) Score at baseline
- `cows_score`: Clinical Opiate Withdrawal Scale (COWS) Score at baseline
- `cows_category`: COWS Severity Category - Ordinal
- `vas_crave_opiates`: Visual Analog Scale (VAS) - Self report of opiate cravings
- `vas_current_withdrawal`: Visual Analog Scale (VAS) - Current withdrawal symptoms
- `vas_study_tx_help`: Visual Analog Scale (VAS) - Study treatment helping symptoms
- `uds_opioids`: Urine Drug Screen Result - Opioids
- `uds_oxycodone`: Urine Drug Screen Result - Oxycodone
- `uds_any_positive`: Urine Drug Screen - Any positive result
--------------------------------------------------------------------------------
### Functional Outcome in Hemorrhagic Stroke: MISTIE III {#mistie_iii}
Hemorrhagic stroke occurs when a blood vessel in the brain ruptures, causing a bleed inside the skull. The bleeding from an ICH can occur in the brain tissue itself (an intracerebral hemorrhage, or ICH), or in the fluid-filled channels in the brain (an intraventricular hemorrhage, or IVH). The [MISTIE III](https://doi.org/10.1016/s0140-6736(19)30195-3) trial ([NCT01827046](https://clinicaltrials.gov/show/NCT01827046)) was a phase III study comparing a minimally invasive surgical intervention to conventional medical management for the treatment of spontaneous, non-traumatic ICH [@Hanley2019].
In this study, participants were randomized 1:1 to receive either standard-of-care medical management or a minimal invasive surgery with Alteplase for ICH removal. Outcomes were measured at 30, 180, and 365-days post-randomization using the Modified Rankin Scale (MRS), which measures functional outcome on a scale ranging from 0 (no residual symptoms) to 6 (death). The MRS was collapsed into a binary variable, representing a score of 0-3 (no symptoms to moderate disability but able to walk without assistance) or 4-6 (unable to walk or attend to daily activities without assistance to death). Survival was also assessed, with patients administratively censored on the date of their final MRS assessment.
The data from MISTIE III was used to create a synthetic dataset for educational purposes. Baseline covariates include demographics, medications and comorbidities, characteristics of the stroke (location of the ICH lesion, the size of the ICH and IVH lesions on CT scans), and neurological status on presentation to the hospital (the Glasgow Coma Scale, or GCS).
In addition to the longitudinal measures of the MRS at 30-, 180-, and 365-days post randomization, mortality data are included. The structure of the data is as follows:
- `sim_participant_id`: Patient id
- Baseline Covariates
- `age`: Age in years
- `male`: male sex
- `hx_cvd`: cardiovascular disease history
- `hx_hyperlipidemia`: hyperlipidemia history
- `on_anticoagulants`: on anticoagulant medication
- `on_antiplatelets`: on antiplatelet medication
- `ich_location`: intracerebral hemorrhage location: (`Lobar`, `Deep`)
- `ich_s_volume`: intracerebral hemorrhage volume on stability scan
- `ivh_s_volume`: intraventricular hemorrhage volume on stability scan
- `gcs_category`: presenting Glasgow Coma Score (GCS)
- Treatment:
- `arm`: treatment arm
- `ich_eot_volume`: intracerebral hemorrhage volume on end-of-treatment scan
- Outcome:
- `mrs_30d`: MRS at 30 days (`0-3`, `4`, `5`, `6`)
- `mrs_30d_complete`: MRS at 30 days if no data were missing
- `mrs_180d`: MRS at 180 days (`0-2`, `3`, `4`, `5`, `6`)
- `mrs_180d_complete`: MRS at 180 days if no data were missing
- `mrs_365d`: MRS at 365 days (`0-1`, `2`, `3`, `4`, `5`, `6`)
- `mrs_365d_complete`: MRS at 365 days if no data were missing
- `days_on_study`: days until death or administrative censoring
- `died_on_study`: participant died (`1`) or is censored (`0`)