R Tutorial : Types of data and endpoints

Learn the main data types in clinical trials: continuous outcomes like blood pressure changes, binary outcomes like 30-day recovery, count data like weekly drinks, and time-to-event outcomes like depression recurrence. The lesson shows how to visualize and summarize each type in R, and why pre-specified endpoints matter for hypothesis testing.
Chapters
In this lesson we will look at some common data types and endpoints. Clinical trials are highly regulated and must meet international ethical and quality standards. The design and methods must be pre specified in the study protocol. Another trial document is the Statistical Analysis Plan that details all the planned analyses. Shells for the tables, figures and listings should also be pre specified. In order to determine the success of a trial, one or more clinical measures need to be defined in the protocol and analysis plan for use in any statistical hypothesis testing. These clinical measures are referred to as endpoints and are often classified as primary or secondary or relating to safety and or efficacy measures. In the next chapter we will discuss common statistical methods that are used to test hypotheses, but for now let's look at examples of studies with different endpoints and the resulting types of data collected. Consider a trial evaluating the effects of exercise on blood pressure. If participants blood pressure readings are taken at baseline before the exercise regimen and again after six months, then appropriate endpoints could be the changes from baseline at six months. A continuous measure. We can explore the distribution of the change from baseline with plots such as QQ plots and histograms. For example, to produce a histogram we can use the ggplot function. Here we specify the name of the data set, exercise, the variable of interest and the layer for histogram. We can also produce statistics for the expected values or averages and the amount of variation. With normally distributed variables, we typically present means and standard deviations which can be done with this piece of code. However, if the distribution is skewed in some way, we may present the median that is the 50th percentile as well as the 25th and 75th percentiles or the minimum and maximum. In a trial comparing 30 day recovery rates for different post operative care regimens, the endpoints could be based on a binary outcome the patient did or did not recover within 30 days. This type of categorical data would be summarized by the number and percentage of patients in each category. There are many ways to generate this information, including the summarize or table functions. Composite endpoints can also be derived based on multiple individual outcomes. For example, in a trial investigating the occurrence of a major adverse cardiac event, the individual outcomes could be cardiovascular death, non fatal heart attack or stroke. A binary variable can be derived to indicate whether or not a patient experienced at least one of those events and we could summarize the endpoint as a categorical variable variable. In this course we will focus on the analysis of binary and continuous outcomes, but let's have a quick look at other types of endpoints. In a trial assessing interventions for alcohol consumption in alcohol dependent patients, we may collect endpoints based on counts, for example the number of drinks consumed in the last week. Here, we often have non normal distributions and discrete values. We could also have time to event or survival endpoints. For example, in a study evaluating different approaches to depression prevention in people with a history of it, we may follow the participants for five years and assess the time to any recurrence of a depressive episode. In addition to outcome measures, clinical trials collect other information of various data types, including demographics and multiple date variables. These are also included in the analyses and study reports. Now, let's work on some example.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







