Skip to contents

Introduction

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.

Prerequisites

Before we begin, ensure that you have the following prerequisites in place:

  • R installed on your computer.
  • Basic understanding of R programming concepts.

Looking at the Datasets

First, let’s have a look at the datasets, which come with the package.

library(clinicalsignificance)

antidepressants
#> # A tibble: 1,110 × 4
#>    patient condition measurement mom_di
#>    <chr>   <fct>     <fct>        <dbl>
#>  1 S001    Wait List Before          50
#>  2 S001    Wait List After           36
#>  3 S002    Wait List Before          40
#>  4 S002    Wait List After           32
#>  5 S003    Wait List Before          38
#>  6 S003    Wait List After           41
#>  7 S004    Wait List Before          29
#>  8 S004    Wait List After           44
#>  9 S005    Wait List Before          37
#> 10 S005    Wait List After           45
#> # ℹ 1,100 more rows
claus_2020
#> # A tibble: 172 × 9
#>       id   age sex    treatment  time   bdi shaps   who  hamd
#>    <dbl> <dbl> <fct>  <fct>     <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1     1    54 Male   TAU           1    33     9     0    25
#>  2     1    54 Male   TAU           2    28     6     3    17
#>  3     1    54 Male   TAU           3    28     9     7    13
#>  4     1    54 Male   TAU           4    27     8     3    13
#>  5     2    52 Female PA            1    26    11     2    15
#>  6     2    52 Female PA            2    26    10     0    16
#>  7     2    52 Female PA            3    25    10     0     7
#>  8     2    52 Female PA            4    19     9     3    11
#>  9     3    54 Male   PA            1    15     2     0    28
#> 10     3    54 Male   PA            2    13     5     9    17
#> # ℹ 162 more rows

Individual Level Anchor-Based Approach

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.

Basic 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
  )
#>  Your "Before" was set as pre measurement and and your "After" as post.
#>  If that is not correct, please specify the pre measurement with the argument
#>   "pre".

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.

Handling Warnings

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
  )

Printing and Summarizing the Results

# Print the results
anchor_results
#> 
#> ── Clinical Significance Results ──
#> 
#> Individual anchor-based approach with a 7 point decrease in instrument scores
#> indicating a clinical significant improvement.
#> Category     |   n | Percent
#> ----------------------------
#> Improved     | 331 |  59.64%
#> Unchanged    | 157 |  28.29%
#> Deteriorated |  67 |  12.07%

# Get a summary
summary(anchor_results)
#> 
#> ── Clinical Significance Results ──
#> 
#> Individual anchor-based analysis of clinical significance with a 7 point
#> decrease in instrument scores (mom_di) indicating a clinical significant
#> improvement.
#> There were 555 participants in the whole dataset of which 555 (100%) could be
#> included in the analysis.
#> 
#> ── Individual Level Results
#> Category     |   n | Percent
#> ----------------------------
#> Improved     | 331 |  59.64%
#> Unchanged    | 157 |  28.29%
#> Deteriorated |  67 |  12.07%

Visualizing the Results

# Plot the results
plot(anchor_results)


# Show clinical significance categories
plot(anchor_results, show = category)

Data with More Than Two Measurements

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)
#> 
#> ── Clinical Significance Results ──
#> 
#> Individual anchor-based analysis of clinical significance with a 7 point
#> decrease in instrument scores (bdi) indicating a clinical significant
#> improvement.
#> There were 43 participants in the whole dataset of which 40 (93%) could be
#> included in the analysis.
#> 
#> ── Individual Level Results
#> Category     |  n | Percent
#> ---------------------------
#> Improved     | 25 |  62.50%
#> Unchanged    | 11 |  27.50%
#> Deteriorated |  4 |  10.00%
plot(claus_results)

Group the Analysis

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
#> 
#> ── Clinical Significance Results ──
#> 
#> Individual anchor-based approach with a 7 point decrease in instrument scores
#> indicating a clinical significant improvement.
#> Group |     Category |  n | Percent
#> -----------------------------------
#> TAU   |     Improved |  8 |  20.00%
#> TAU   |    Unchanged |  7 |  17.50%
#> TAU   | Deteriorated |  4 |  10.00%
#> PA    |     Improved | 17 |  42.50%
#> PA    |    Unchanged |  4 |  10.00%
#> PA    | Deteriorated |  0 |   0.00%

# And plot the groups
plot(anchor_results_grouped)

Analyzing Positive Outcomes

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
#> 
#> ── Clinical Significance Results ──
#> 
#> Individual anchor-based approach with a 4 point increase in instrument scores
#> indicating a clinical significant improvement.
#> Category     |  n | Percent
#> ---------------------------
#> Improved     | 15 |  37.50%
#> Unchanged    | 25 |  62.50%
#> Deteriorated |  0 |   0.00%

# And plot the groups
plot(anchor_results_who)

Group Level Anchor-Based Approach

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.

Performing the Analysis

anchor_results_group_level <- claus_2020 |> 
  cs_anchor(
    id = id,
    time = time,
    outcome = bdi,
    pre = 1,
    post = 4,
    mid_improvement = 7,
    target = "group"
  )

Summarizing the Results

summary(anchor_results_group_level)
#> 
#> ── Clinical Significance Results ──
#> 
#> Groupwise anchor-based analysis of clinical significance (within groups) with a
#> 7 point decrease in instrument scores (bdi) indicating a clinical significant
#> improvement.
#> There were 43 participants in the whole dataset of which 40 (93%) could be
#> included in the analysis.
#> 
#> ── Group Level Results
#> Difference | [Lower | Upper] | CI-Level | n  | Category                              
#> -------------------------------------------------------------------------------------
#> -9.38      | -12.83 | -5.92  | 0.95     | 40 | Probably clinically significant effect

Analysis for Different Groups

claus_2020 |> 
  cs_anchor(
    id = id,
    time = time,
    outcome = bdi,
    pre = 1,
    post = 4,
    mid_improvement = 7,
    target = "group",
    group = treatment
  )
#> 
#> ── Clinical Significance Results ──
#> 
#> Groupwise anchor-based approach (within groups) with a 7 point decrease in
#> instrument scores indicating a clinical significant improvement.
#> Group | Median Difference | [Lower | Upper] | CI-Level | n  | Category                           
#> -------------------------------------------------------------------------------------------------
#> TAU   | -4.23             | -8.95  | 0.43   | 0.95     | 19 | Statistically not significant      
#> PA    | -13.74            | -18.04 | -9.04  | 0.95     | 21 | Large clinically significant effect

Comparing Groups

claus_2020 |> 
  cs_anchor(
    id = id,
    time = time,
    outcome = bdi,
    post = 4,
    mid_improvement = 7,
    target = "group",
    group = treatment,
    effect = "between"
  )
#> 
#> ── Clinical Significance Results ──
#> 
#> Groupwise anchor-based approach (between groups) with a 7 point decrease in
#> instrument scores indicating a clinical significant improvement.
#> Group 1 | Group 2 | Median Difference | [Lower | Upper] | CI-Level | n (1) | n (2) | Category                              
#> ---------------------------------------------------------------------------------------------------------------------------
#> TAU     | PA      | -10.38            | -18.04 | -2.92  | 0.95     | 19    | 21    | Probably clinically significant effect

Conclusion

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.