knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
In this beginner-friendly tutorial, we will explore anchor-based approaches to clinical significance using R. Anchor-based approaches are commonly used in clinical research to assess the meaningfulness of change in patient outcomes. We will be working with the claus_2020
dataset and the cs_anchor()
function to demonstrate various aspects of these approaches.
Before we begin, ensure that you have the following prerequisites in place:
First, let's have a look at the datasets, which come with the package.
library(clinicalsignificance)
antidepressants
claus_2020
The individual level anchor approach is a method to determine the clinical significance of changes in individual patient outcomes over time. It is centered around the minimally important difference (MDI) of an instrument. If a change is equal or greater than this difference, a clinically significant change is inferred. We will use the cs_anchor()
function for this analysis.
Let's start with a basic clinical significance distribution analysis using the antidepressants
dataset. We are interested in the Mind over Mood Depression Inventory (mom_di
) measurements and want to set Minimally Important Difference (MID) for an improvement to a value of 7.
anchor_results <- antidepressants |> cs_anchor( id = patient, time = measurement, outcome = mom_di, mid_improvement = 7 )
Here's a breakdown of the code:
patient
, measurement
, and mom_di
are variables representing patient identifiers, assessment time points, and the Mind over Mood Depression Intentory (MoM-DI) scores, respectively.mid_improvement
sets the for improvement to 7.Sometimes, you may encounter warnings when using this function. You can turn off the warning by explicitly specifying the pre-measurement time point using the pre parameter. This can be helpful when your data lacks clear pre-post measurement labels.
anchor_results <- antidepressants |> cs_anchor( id = patient, time = measurement, outcome = mom_di, pre = "Before", mid_improvement = 7 )
# Print the results anchor_results # Get a summary summary(anchor_results)
# Plot the results plot(anchor_results) # Show clinical significance categories plot(anchor_results, show = category)
When working with data that has more than two measurements, you must explicitly define the pre and post measurement time points using the pre and post parameters.
claus_results <- claus_2020 |> cs_anchor( id = id, time = time, outcome = bdi, pre = 1, post = 4, mid_improvement = 7 ) summary(claus_results) plot(claus_results)
It is also possible to provide a grouping variable present in your data to group the analysis. The resulting plot distinguishes the effects for the provided groups.
anchor_results_grouped <- claus_2020 |> cs_anchor( id = id, time = time, outcome = bdi, pre = 1, post = 4, mid_improvement = 7, group = treatment ) anchor_results_grouped # And plot the groups plot(anchor_results_grouped)
In some cases, higher values of an outcome may be considered better. You can specify this using the better_is
argument. Let's see an example with the WHO-5 score where higher values are considered better. Suppose the MID is 4 in this case.
anchor_results_who <- claus_2020 |> cs_anchor( id = id, time = time, outcome = who, pre = 1, post = 4, mid_improvement = 4, better_is = "higher" ) anchor_results_who # And plot the groups plot(anchor_results_who)
The group level anchor-based approach assesses clinical significance for groups of patients, often in the context of treatment comparisons. Let's explore this approach.
anchor_results_group_level <- claus_2020 |> cs_anchor( id = id, time = time, outcome = bdi, pre = 1, post = 4, mid_improvement = 7, target = "group" )
summary(anchor_results_group_level)
claus_2020 |> cs_anchor( id = id, time = time, outcome = bdi, pre = 1, post = 4, mid_improvement = 7, target = "group", group = treatment )
claus_2020 |> cs_anchor( id = id, time = time, outcome = bdi, post = 4, mid_improvement = 7, target = "group", group = treatment, effect = "between" )
Anchor-based approaches are valuable tools in clinical research for assessing the clinical significance of changes in patient outcomes. In this tutorial, we've covered the individual and group-level anchor approaches, and you've learned how to perform these analyses using R. These techniques can help researchers and healthcare professionals make informed decisions about the effectiveness of treatments and interventions.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.