Type: Package
Title: A Toolbox for Clinical Significance Analyses in Intervention Studies
Version: 2.1.0
Description: A clinical significance analysis can be used to determine if an intervention has a meaningful or practical effect for patients. You provide a tidy data set plus a few more metrics and this package will take care of it to make your results publication ready. Accompanying package to Claus et al. <doi:10.18637/jss.v111.i01>.
License: GPL (≥ 3)
Encoding: UTF-8
LazyData: true
Depends: R (≥ 2.10)
RoxygenNote: 7.3.2
Imports: BayesFactor, bayestestR, cli, dplyr, ggplot2, insight, lme4, purrr, rlang, tibble, tidyr
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), tidyverse, vdiffr
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://pedscience.github.io/clinicalsignificance/, https://github.com/pedscience/clinicalsignificance
BugReports: https://github.com/pedscience/clinicalsignificance/issues
NeedsCompilation: no
Packaged: 2024-12-02 14:58:09 UTC; bened
Author: Benedikt Claus ORCID iD [aut, cre]
Maintainer: Benedikt Claus <b.claus@pedscience.de>
Repository: CRAN
Date/Publication: 2024-12-02 15:40:16 UTC

Antidepressant Data

Description

A fictional dataset used to showcase group-based clinical significance analyses and analyses with many participants.

Usage

antidepressants

Format

A tibble with 1140 rows and 4 variables:

patient

Patient identifier

condition

Experimental condition

measurement

Indicator of measurement

mom_di

Mind over Mood Depression inventory scores (lower is better)

Details

In a fictional clinical trial, the effectiveness of a new antidepressant should be examined and depressed patients were randomized to one of four groups:

Suppose they underwent outpatient treatment, depressive symptoms were measured before and after treatment with the Mind over Mood Depression Inventory (MoM-DI) by Greenberger & Padesky (2015), and if a patient received a pill, the clinician and the patient did not know, what type of medicaction they consumed.

Further, the minimal important difference for an improvement as measured by this instrument was agreed to be an 8 point decrease. A deterioration can be assumed if instrument scores increased by 5 points.

The functional population (i.e., non-depressed individuals) can be expected to have a mean score of M = 8 points with a standard deviation of SD = 7.

References

Greenberger, D., & Padesky, C. A. (2015). Mind over mood, second edition (2nd ed.). New York, NY: Guilford Publications.


Anxiety Data

Description

A fictional dataset with missings to exemplify the use of HLM method for clinical significance.

Usage

anxiety

Format

A data frame with 580 rows and 4 variables:

subject

Participant

treatment

Treatment. Either Placebo or Intervention

measurement

Number of measurement

anxiety

Anxiety score (lower is better)

Details

In a fictional clinical trial, participants were split up to belong to either a medical placebo ("Placebo") or psychotherapeutic intervention ("Intervention") group.

They underwent outpatient treatment during which they were followed for 5 measurements at which a fictional anxiety score was measured. This anxiety score may range from 0 - 60.

The functional population (i.e., non-anxious individuals) can be expected to have a mean score of M = 8 points with a standard deviation of SD = 4.


Anxiety Data (Complete)

Description

A fictional complete dataset to exemplify the use of HLM method for clinical significance.

Usage

anxiety_complete

Format

A data frame with 580 rows and 4 variables:

subject

Participant

treatment

Treatment. Either Placebo or Intervention

measurement

Number of measurement

anxiety

Anxiety score (lower is better)

Details

In a fictional clinical trial, participants were split up to belong to either a medical placebo ("Placebo") or psychotherapeutic intervention ("Intervention") group.

They underwent outpatient treatment during which they were followed for 5 measurements at which a fictional anxiety score was measured. This anxiety score may range from 0 - 60.

The functional population (i.e., non-anxious individuals) can be expected to have a mean score of M = 8 points with a standard deviation of SD = 4.


Generic to Calculate Anchor-Based Results

Description

This is an internal generic and should not be called directly. Depending on the different anchor method requested by the user, the appropriate method is called. It calculates the change and according clinical significance category for each participant.

Usage

calc_anchor(data, ...)

Arguments

data

A data set object of class ⁠cs_*⁠

...

Additional arguments

Value

An object of class ⁠cs_anchor_*⁠


Anchor Calculations for Group Effect Between

Description

Anchor Calculations for Group Effect Between

Usage

## S3 method for class 'cs_anchor_group_between'
calc_anchor(
  data,
  mid_improvement,
  mid_deterioration,
  reference_group,
  post,
  direction,
  ci_level,
  bayesian,
  prior_scale,
  ...
)

Arguments

reference_group

String, the reference group to compare all other groups against

post

The measurement at which groups should be compared, typically a measurement after an intervention.


Anchor Calculations for Group Effect Within

Description

This is an internal function and should never be called directly.

Usage

## S3 method for class 'cs_anchor_group_within'
calc_anchor(
  data,
  mid_improvement,
  mid_deterioration,
  direction,
  ci_level,
  bayesian,
  prior_scale,
  ...
)

Arguments

bayesian

Logical, if Bayesian tests and uncertainty intervals should be used, defaults to TRUE.

prior_scale

String or numeric, can be adjusted to change the Bayesian prior distribution. See the documentation for rscale in BayesFactor::ttestBF() for details


Anchor Calculations for Individual Results

Description

Anchor Calculations for Individual Results

Usage

## S3 method for class 'cs_anchor_individual_within'
calc_anchor(data, mid_improvement, mid_deterioration, direction, ci_level, ...)

Arguments

mid_improvement

Numeric, change that indicates a clinically significant improvement

mid_deterioration

Numeric, change that indicates a clinically significant deterioration

direction

Which direction is beneficial? Lower = -1, better = 1

ci_level

Numeric, desired confidence interval.


Generic for Statistical Approach

Description

This is an internal generic and should not be called directly. Depending on the different cutoff method requested by the user, the appropriate method is called. It calculates the cutoff and according clinical significance category for each participant.

Usage

calc_cutoff_from_data(data, ...)

Arguments

data

A pre-processed wide data frame with at least column id, pre and post and class ⁠cs_*⁠

...

Additional arguments for the respective cutoff method

Value

A list with cutoff info and participant wise info on cutoff categorization


Calculate cs_indiv

Description

Calculate cs_indiv

Usage

## S3 method for class 'cs_ha'
calc_cutoff_from_data(
  data,
  m_clinical,
  sd_clinical,
  m_functional,
  sd_functional,
  m_post,
  sd_post,
  reliability,
  type = "a",
  direction = 1,
  critical_value = 1.65,
  ...
)

Arguments

m_clinical

Mean of clinical population

sd_clinical

SD of clinical population

m_post

Mean of post measurement

sd_post

SD of post measurement

reliability

Instrument's reliability

critical_value

The critical value for the RCI decision, should be 1.65 if significance_level = 0.05


Calculate the categories based on the cutoff

Description

Calculate the categories based on the cutoff

Usage

## Default S3 method:
calc_cutoff_from_data(
  data,
  m_clinical,
  sd_clinical,
  m_functional,
  sd_functional,
  type = "a",
  direction = 1,
  ...
)

Arguments

data

Prepped data with class ⁠cs_*⁠

m_functional

Mean of functional population

sd_functional

SD of functional population

type

Cutoff type, available are "a", "b", and "c"

...

Additional arguments for the specific RCI method


Calculate Change for the Percentage-Change Approach

Description

This is an internal generic and should not be called directly. Depending on the different percent change cutoff requested by the user, this function calculates the relative change according clinical significance category for each patient.

Usage

calc_percentage(data, pct_improvement, pct_deterioration, direction)

Arguments

data

A pre-processed data frame with at least columns change and pre

pct_improvement

Numeric, the required percent change cutoff to infer an improvement

pct_deterioration

Numeric, the required percent change cutoff to infer a deterioration

Value

An object of classm cs_percentage list with participant-wise info on clinical significant change catergory


Generic to Calculate RCI and Associated Change

Description

This is an internal generic and should not be called directly. Depending on the different RCI method requested by the user, the appropriate method is called. It calculates the RCI and according clinical significance category for each participant.

Usage

calc_rci(data, ...)

Arguments

data

Prepped data with class ⁠cs_*⁠

...

Additional arguments for the specific RCI method

Value

RCI result object with class cs_distribution


RCI for the Edwards method

Description

RCI for the Edwards method

Usage

## S3 method for class 'cs_en'
calc_rci(
  data,
  m_pre,
  sd_pre,
  reliability,
  direction = 1,
  critical_value = 1.96,
  ...
)

RCI for the Gulliksen, Lord & Novick method

Description

RCI for the Gulliksen, Lord & Novick method

Usage

## S3 method for class 'cs_gln'
calc_rci(
  data,
  m_pre,
  sd_pre,
  reliability,
  direction = 1,
  critical_value = 1.96,
  ...
)

Arguments

m_pre

Pre measurement mean


RCI for the Hageman & Arrindell

Description

RCI for the Hageman & Arrindell

Usage

## S3 method for class 'cs_ha'
calc_rci(
  data,
  m_pre,
  sd_pre,
  m_post,
  sd_post,
  reliability,
  direction = 1,
  critical_value = 1.65,
  ...
)

Arguments

sd_post

Post measurement SD


RCI for the Hsu, Lin & Lord method

Description

RCI for the Hsu, Lin & Lord method

Usage

## S3 method for class 'cs_hll'
calc_rci(
  data,
  m_pre,
  sd_pre,
  m_post,
  reliability,
  direction = 1,
  critical_value = 1.96,
  ...
)

Arguments

m_post

Post measurement mean


Calc RCI for the HLM method

Description

Calc RCI for the HLM method

Usage

## S3 method for class 'cs_hlm'
calc_rci(data, direction, critical_value = 1.96, ...)

RCI for the Jacobson & Truax method

Description

RCI for the Jacobson & Truax method

Usage

## S3 method for class 'cs_jt'
calc_rci(data, sd_pre, reliability, direction = 1, critical_value = 1.96, ...)

Arguments

sd_pre

Pre measurement SD

reliability

Instrument reliability

direction

Beneficial intervention effect for given instrument. 1 = higher is better, -1 = lower is better

critical_value

Critical RCI value, typically 1.96


RCI for the NK method

Description

RCI for the NK method

Usage

## S3 method for class 'cs_nk'
calc_rci(
  data,
  m_pre,
  sd_pre,
  reliability,
  reliability_post,
  direction = 1,
  critical_value = 1.96,
  ...
)

Arguments

reliability_post

Instrument reliability at post measurement


Placebo Amplification Data

Description

A dataset containing the data from Claus et al. (2020). In a routine inpatient setting for unipolar depressive disorders they implemented an intervention that sought to amplify the placebo response of antidepressants. In the study, two groups were compared: treatment as usual (TAU) and placebo amplification (PA). Participants were examined four times during their treatment.

Usage

claus_2020

Format

An object of class tbl_df with 172 rows and 9 columns.

id

Participant ID

age

Age

sex

Sex

treatment

Treatment (TAU for treatment as usual and PA for placebo amplification)

time

Measurement

bdi

Beck Depression Inventory (2nd Edition) score (lower is better)

shaps

Snaith-Hamilton Pleasure Scale score (higher is better)

who

WHO-Five Well-Being Index score (higher is better)

hamd

Hamilton Rating Scale for Depression score (lower is better)

Source

https://osf.io/rc754/

References


Generic For Creating Summary Tables

Description

This is an internal function used to create summary table for the different clinical significance methods. This should not be used directly.

Usage

create_summary_table(x, ...)

Arguments

x

An object of class ⁠cs_*⁠

...

Additional arguments passed to other methods

Value

A tibble


Create Summary Table for Anchor-Based Approach

Description

Create Summary Table for Anchor-Based Approach

Usage

## S3 method for class 'cs_anchor_individual_within'
create_summary_table(x, data, ...)

Create Summary Table for Combined Approach

Description

Create Summary Table for Combined Approach

Usage

## S3 method for class 'cs_combined'
create_summary_table(
  x,
  cutoff_results,
  data,
  method,
  r_dd,
  se_measurement,
  cutoff,
  sd_post,
  direction,
  ...
)

Arguments

cutoff_results

Cutoff results object

r_dd

r_dd

se_measurement

se_measurement

cutoff

Cutoff value

sd_post

SD post intervention

direction

Which direction is beneficial? 1 = higher, -1 = lower


Create Summary Table for Distribution-Based Approach

Description

Create Summary Table for Distribution-Based Approach

Usage

## S3 method for class 'cs_distribution'
create_summary_table(x, data, ...)

Arguments

x

A results object that differs per approach:

  • RCI results for distribution-based and combined approach

  • Cutoff results for statistical approach

  • PCT results for percentage-change approach

  • Anchor results for the anchor-based approach

data

The used data frame

...

Additional arguments


Create Summary Table for Percentage-Change Approach

Description

Create Summary Table for Percentage-Change Approach

Usage

## S3 method for class 'cs_percentage'
create_summary_table(x, data, ...)

Create Summary Table for Statistical Approach

Description

Create Summary Table for Statistical Approach

Usage

## S3 method for class 'cs_statistical'
create_summary_table(x, data, method, ...)

Arguments

method

Clinical significance method


Anchor-Based Analysis of Clinical Significance

Description

cs_anchor() can be used to determine the clinical significance of intervention studies employing the anchor-based approach. For this, a predefined minimally important difference (MID) for an instrument is known that corresponds to an important symptom improvement for patients. The data can then be analyzed on the individual as well as the group level to estimate, if the change because of an intervention is clinically significant.

Usage

cs_anchor(
  data,
  id,
  time,
  outcome,
  group,
  pre = NULL,
  post = NULL,
  mid_improvement = NULL,
  mid_deterioration = NULL,
  better_is = c("lower", "higher"),
  target = c("individual", "group"),
  effect = c("within", "between"),
  bayesian = TRUE,
  prior_scale = "medium",
  reference_group = NULL,
  ci_level = 0.95
)

Arguments

data

A tidy data frame

id

Participant ID

time

Time variable

outcome

Outcome variable

group

Grouping variable (optional)

pre

Pre measurement (only needed if the time variable contains more than two measurements)

post

Post measurement (only needed if the time variable contains more than two measurements)

mid_improvement

Numeric, change that indicates a clinically significant improvement

mid_deterioration

Numeric, change that indicates a clinically significant deterioration (optional). If mid_deterioration is not provided, it will be assumed to be equal to mid_improvement

better_is

Which direction means a better outcome for the used instrument? Available are

  • "lower" (lower outcome scores are desirable, the default) and

  • "higher" (higher outcome scores are desirable)

target

String, whether an individual or group analysis should be calculated. Available are

  • "individual" (the default) for which every individual participant is evaluated

  • "group" for which only the group wise effect is evaluated

effect

String, if target = "group", specify which effect should be calculated. Available are

  • "within" (the default), which yields the mean pre-post intervention difference with associated confidence intervals

  • "between", which estimates the group wise mean difference and confidence intervals between two or more groups specified with the group argument at the specified measurement supplied with the post- argument The reference group may be supplied with reference_group

bayesian

Logical, only relevant if target = "group". Indicates if a Bayesian estimate (i.e., the median) of group differences with a credible interval should be calculated (if set to TRUE, the default) or a frequentist mean difference with confidence interval (if set to FALSE)

prior_scale

String or numeric, can be adjusted to change the Bayesian prior distribution. See the documentation for rscale in BayesFactor::ttestBF() for details.

reference_group

Specify the reference group to which all subsequent groups are compared against if target = "group" and effect = "within" (optional). Otherwise, the first distinct group is chosen based on alphabetical, numerical or factor ordering.

ci_level

Numeric, define the credible or confidence interval level. The default is 0.95 for a 95%-CI.

Value

An S3 object of class cs_analysis and cs_anchor

Computational details

For the individual-level analyses, the analysis is straight forward. An MID can be specified for an improvement as well as a deterioration (because these must not necessarily be identical) and the function basically counts how many patients fall within the MID range for both, improvement and deterioration, or how many patients exceed the limits of this range in either direction. A patient may than be categorized as:

For group-level analyses, the whole sample is either treated as a single group or is split up by grouping presented in the data. For within group analyses, the function calculates the median change from pre to post intervention with the associated credible interval (CI). Based on the median change and the limits of this CI, a group change can be categorized in 5 distinctive categories:

If a between group comparison is desired, a reference group can be defined with the reference_group argument to which all subsequent groups are compared. This is usually an inactive comparator such as a placebo or wait-list control group. The difference between the pairwise compared groups is categorized just as the within group difference above, so the same categories apply.

The approach can be changed to a classical frequentist framework for which the point estimate then represents the mean difference and the CI a confidence interval. For an extensive overview over the differences between a Bayesian and frequentist CI, refer to Hespanhol et al. (2019).

Data preparation

The data set must be tidy, which corresponds to a long data frame in general. It must contain a patient identifier which must be unique per patient. Also, a column containing the different measurements and the outcome must be supplied. Each participant-measurement combination must be unique, so for instance, the data must not contain two "After" measurements for the same patient.

Additionally, if the measurement column contains only two values, the first value based on alphabetical, numerical or factor ordering will be used as the pre measurement. For instance, if the column contains the measurements identifiers "pre" and "post" as strings, then "post" will be sorted before "pre" and thus be used as the "pre" measurement. The function will throw a warning but generally you may want to explicitly define the "pre" and "post" measurement with arguments pre and post. In case of more than two measurement identifiers, you have to define pre and post manually since the function does not know what your pre and post intervention measurements are.

If your data is grouped, you can specify the group by referencing the grouping variable (see examples below). The analysis is then run for every group to compare group differences.

References

Hespanhol, L., Vallio, C. S., Costa, L. M., & Saragiotto, B. T. (2019). Understanding and interpreting confidence and credible intervals around effect estimates. Brazilian Journal of Physical Therapy, 23(4), 290–301. https://doi.org/10.1016/j.bjpt.2018.12.006

See Also

Main clinical signficance functions cs_combined(), cs_distribution(), cs_percentage(), cs_statistical()

Examples

cs_results <- antidepressants |>
  cs_anchor(patient, measurement, mom_di, mid_improvement = 8)

cs_results
plot(cs_results)

# Set argument "pre" to avoid a warning
cs_results <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    pre = "Before",
    mid_improvement = 8
  )


# Inlcude the MID for deterioration
cs_results_with_deterioration <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    pre = "Before",
    mid_improvement = 8,
    mid_deterioration = 5
  )

cs_results_with_deterioration
summary(cs_results_with_deterioration)
plot(cs_results_with_deterioration)


# Group the results by experimental condition
cs_results_grouped <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    pre = "Before",
    group = condition,
    mid_improvement = 8,
    mid_deterioration = 5
  )

cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)

# The plot method always returns a ggplot2 object, so the plot may be further
# modified with ggplot2 code, e.g., facetting to avoid overplotting of groups
plot(cs_results_grouped) +
  ggplot2::facet_wrap(~ group)


# Compute group wise results
cs_results_groupwise <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    pre = "Before",
    mid_improvement = 8,
    target = "group"
  )

cs_results_groupwise
summary(cs_results_groupwise)
plot(cs_results_groupwise)


# Group wise analysis, but split by experimentawl condition
cs_results_groupwise_condition <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    pre = "Before",
    group = condition,
    mid_improvement = 8,
    target = "group"
  )

cs_results_groupwise_condition
summary(cs_results_groupwise_condition)
plot(cs_results_groupwise_condition)


# Compare all groups to a predefined reference group at a predefined measurement
cs_results_groupwise_between <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    post = "After",
    group = condition,
    mid_improvement = 8,
    target = "group",
    effect = "between"
  )

cs_results_groupwise_between
summary(cs_results_groupwise_between)
plot(cs_results_groupwise_between)


# Compare all groups to a predefined reference group with frequentist appraoch
cs_results_groupwise_between_freq <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    post = "After",
    group = condition,
    mid_improvement = 8,
    target = "group",
    effect = "between",
    bayesian = FALSE
  )

cs_results_groupwise_between_freq
summary(cs_results_groupwise_between_freq)
plot(cs_results_groupwise_between_freq)

Combined Analysis of Clinical Significance

Description

cs_combined() can be used to determine the clinical significance of intervention studies employing the combination of the distribution-based and statistical approach. For this, it will be assumed that the functional (non-clinical population) and patient (clinical population) scores form two distinct distributions on a continuum. cs_combined() calculates a cutoff point between these two populations as well as a reliable change index (RCI) based on a provided instrument reliability estimate and counts, how many of those patients that showed a reliable change (that is likely to be not due to measurement error) switched from the clinical to the functional population during intervention. Several methods for calculating the cutoff and RCI are available.

Usage

cs_combined(
  data,
  id,
  time,
  outcome,
  group = NULL,
  pre = NULL,
  post = NULL,
  mid_improvement = NULL,
  mid_deterioration = NULL,
  reliability = NULL,
  reliability_post = NULL,
  m_functional = NULL,
  sd_functional = NULL,
  better_is = c("lower", "higher"),
  rci_method = c("JT", "GLN", "HLL", "EN", "NK", "HA", "HLM"),
  cutoff_type = c("a", "b", "c"),
  significance_level = 0.05
)

Arguments

data

A tidy data frame

id

Participant ID

time

Time variable

outcome

Outcome variable

group

Grouping variable (optional)

pre

Pre measurement (only needed if the time variable contains more than two measurements)

post

Post measurement (only needed if the time variable contains more than two measurements)

mid_improvement

Numeric, change that indicates a clinically significant improvement

mid_deterioration

Numeric, change that indicates a clinically significant deterioration (optional). If mid_deterioration is not provided, it will be assumed to be equal to mid_improvement

reliability

The instrument's reliability estimate. If you selected the NK method, the here specified reliability will be the instrument's pre measurement reliability. Not needed for the HLM method.

reliability_post

The instrument's reliability at post measurement (only needed for the NK method)

m_functional

Numeric, mean of functional population.

sd_functional

Numeric, standard deviation of functional population

better_is

Which direction means a better outcome for the used instrument? Available are

  • "lower" (lower outcome scores are desirable, the default) and

  • "higher" (higher outcome scores are desirable)

rci_method

Clinical significance method. Available are

  • "JT" (Jacobson & Truax, 1991, the default)

  • "GLN" (Gulliksen, Lord, and Novick; Hsu, 1989, Hsu, 1995)

  • "HLL" (Hsu, Linn & Nord; Hsu, 1989)

  • "EN" (Edwards & Nunnally; Speer, 1992)

  • "NK" (Nunnally & Kotsch, 1983), requires a reliability estimate at post measurement. If this is not supplied, reliability and reliability_post are assumed to be equal

  • "HA" (Hageman & Arrindell, 1999)

  • "HLM" (Hierarchical Linear Modeling; Raudenbush & Bryk, 2002), requires at least three measurements per patient

cutoff_type

Cutoff type. Available are "a", "b", and "c". Defaults to "a" but "c" is usually recommended. For "b" and "c", summary data from a functional population must be given with arguments m_functional and sd_functional.

significance_level

Significance level alpha, defaults to 0.05. If you choose the "HA" method, this value corresponds to the maximum risk of misclassification

Value

An S3 object of class cs_analysis and cs_combined

Categories

Each individual's change can then be categorized into the following groups:

Computational details

There are three available cutoff types, namely a, b, and c which can be used to "draw a line" or separate the functional and clinical population on a continuum. a as a cutoff is defined as the mean of the clinical population minus two times the standard deviation (SD) of the clinical population. b is defined as the mean of the functional population plus also two times the SD of the clinical population. This is true for "negative" outcomes, where a lower instrument score is desirable. For "positive" outcomes, where higher scores are beneficial, a is the mean of the clinical population plus 2 \cdot SD of the clinical population and b is mean of the functional population minus 2 \cdot SD of the clinical population. The summary statistics for the clinical population are estimated from the provided data at pre measurement.

c is defined as the midpoint between both populations based on their respective mean and SD. In order to calculate b and c, descriptive statistics for the functional population must be provided.

From the provided data, a region of change is calculated in which an individual change may likely be due to an inherent measurement of the used instrument. This concept is also known as the minimally detectable change (MDC).

Data preparation

The data set must be tidy, which corresponds to a long data frame in general. It must contain a patient identifier which must be unique per patient. Also, a column containing the different measurements and the outcome must be supplied. Each participant-measurement combination must be unique, so for instance, the data must not contain two "After" measurements for the same patient.

Additionally, if the measurement column contains only two values, the first value based on alphabetical, numerical or factor ordering will be used as the pre measurement. For instance, if the column contains the measurements identifiers "pre" and "post" as strings, then "post" will be sorted before "pre" and thus be used as the "pre" measurement. The function will throw a warning but generally you may want to explicitly define the "pre" and "post" measurement with arguments pre and post. In case of more than two measurement identifiers, you have to define pre and post manually since the function does not know what your pre and post intervention measurements are.

If your data is grouped, you can specify the group by referencing the grouping variable (see examples below). The analysis is then run for every group to compare group differences.

See Also

Main clinical signficance functions cs_anchor(), cs_distribution(), cs_percentage(), cs_statistical()

Examples

cs_results <- claus_2020 |>
  cs_combined(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    reliability = 0.80
  )

cs_results
summary(cs_results)
plot(cs_results)


# You can choose a different cutoff but must provide summary statistics for the
# functional population
cs_results_c <- claus_2020 |>
  cs_combined(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    reliability = 0.80,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c"
  )

cs_results_c
summary(cs_results_c)
plot(cs_results_c)


# You can group the analysis by providing a grouping variable in the data
cs_results_grouped <- claus_2020 |>
  cs_combined(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    group = treatment,
    reliability = 0.80,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c"
  )

cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)

Distribution-Based Analysis of Clinical Significance

Description

cs_distribution() can be used to determine the clinical significance of intervention studies employing the distribution-based approach. For this, the reliable change index is estimated from the provided data and a known reliability estimate which indicates, if an observed individual change is likely to be greater than the measurement error inherent for the used instrument. In this case, a reliable change is defined as clinically significant. Several methods for calculating this RCI can be chosen.

Usage

cs_distribution(
  data,
  id,
  time,
  outcome,
  group = NULL,
  pre = NULL,
  post = NULL,
  reliability = NULL,
  reliability_post = NULL,
  better_is = c("lower", "higher"),
  rci_method = c("JT", "GLN", "HLL", "EN", "NK", "HA", "HLM"),
  significance_level = 0.05
)

Arguments

data

A tidy data frame

id

Participant ID

time

Time variable

outcome

Outcome variable

group

Grouping variable (optional)

pre

Pre measurement (only needed if the time variable contains more than two measurements)

post

Post measurement (only needed if the time variable contains more than two measurements)

reliability

The instrument's reliability estimate. If you selected the NK method, the here specified reliability will be the instrument's pre measurement reliability. Not needed for the HLM method.

reliability_post

The instrument's reliability at post measurement (only needed for the NK method)

better_is

Which direction means a better outcome for the used instrument? Available are

  • "lower" (lower outcome scores are desirable, the default) and

  • "higher" (higher outcome scores are desirable)

rci_method

Clinical significance method. Available are

  • "JT" (Jacobson & Truax, 1991, the default)

  • "GLN" (Gulliksen, Lord, and Novick; Hsu, 1989, Hsu, 1995)

  • "HLL" (Hsu, Linn & Nord; Hsu, 1989)

  • "EN" (Edwards & Nunnally; Speer, 1992)

  • "NK" (Nunnally & Kotsch, 1983), requires a reliability estimate at post measurement. If this is not supplied, reliability and reliability_post are assumed to be equal

  • "HA" (Hageman & Arrindell, 1999)

  • "HLM" (Hierarchical Linear Modeling; Raudenbush & Bryk, 2002), requires at least three measurements per patient

significance_level

Significance level alpha, defaults to 0.05. If you choose the "HA" method, this value corresponds to the maximum risk of misclassification

Value

An S3 object of class cs_analysis and cs_distribution

Computational details

From the provided data, a region of change is calculated in which an individual change may likely be due to an inherent measurement of the used instrument. This concept is also known as the minimally detectable change (MDC).

Categories

Each individual's change may then be categorized into one of the following three categories:

Most of these methods are developed to deal with data containing two measurements per individual, i.e., a pre intervention and post intervention measurement. The Hierarchical Linear Modeling (rci_method = "HLM") method can incorporate data for multiple measurements an can thus be used only for at least three measurements per participant.

Data preparation

The data set must be tidy, which corresponds to a long data frame in general. It must contain a patient identifier which must be unique per patient. Also, a column containing the different measurements and the outcome must be supplied. Each participant-measurement combination must be unique, so for instance, the data must not contain two "After" measurements for the same patient.

Additionally, if the measurement column contains only two values, the first value based on alphabetical, numerical or factor ordering will be used as the pre measurement. For instance, if the column contains the measurements identifiers "pre" and "post" as strings, then "post" will be sorted before "pre" and thus be used as the "pre" measurement. The function will throw a warning but generally you may want to explicitly define the "pre" and "post" measurement with arguments pre and post. In case of more than two measurement identifiers, you have to define pre and post manually since the function does not know what your pre and post intervention measurements are.

If your data is grouped, you can specify the group by referencing the grouping variable (see examples below). The analysis is then run for every group to compare group differences.

References

See Also

Main clinical signficance functions cs_anchor(), cs_combined(), cs_percentage(), cs_statistical()

Examples

antidepressants |>
  cs_distribution(patient, measurement, mom_di, reliability = 0.80)


# Turn off the warning by providing the pre measurement time
cs_results <- antidepressants |>
  cs_distribution(
    patient,
    measurement,
    mom_di,
    pre = "Before",
    reliability = 0.80
  )

summary(cs_results)
plot(cs_results)


# If you use data with more than two measurements, you always have to define a
# pre and post measurement
cs_results <- claus_2020 |>
  cs_distribution(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    reliability = 0.80
  )

cs_results
summary(cs_results)
plot(cs_results)


# Set the rci_method argument to change the RCI method
cs_results_ha <- claus_2020 |>
  cs_distribution(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    reliability = 0.80,
    rci_method = "HA"
  )

cs_results_ha
summary(cs_results_ha)
plot(cs_results_ha)


# Group the analysis by providing a grouping variable
cs_results_grouped <- claus_2020 |>
  cs_distribution(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    group = treatment,
    reliability = 0.80
  )

cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)


# Use more than two measurements
cs_results_hlm <- claus_2020 |>
  cs_distribution(
    id,
    time,
    hamd,
    rci_method = "HLM"
  )

cs_results_hlm
summary(cs_results_hlm)
plot(cs_results_hlm)

Extract Augmented Data from a cs_analysis Object

Description

This function returns the patient-wise results, containing the considered pre and post intervention value, its raw change as well as all other change estimates calculated during the clinical significance analysis with the individual's clinical significance category. This function is only useful for individual level analyses because the group level analyses only yield group level results.

Usage

cs_get_augmented_data(x, ...)

## Default S3 method:
cs_get_augmented_data(x, ...)

## S3 method for class 'cs_distribution'
cs_get_augmented_data(x, ...)

## S3 method for class 'cs_statistical'
cs_get_augmented_data(x, ...)

## S3 method for class 'cs_combined'
cs_get_augmented_data(x, ...)

## S3 method for class 'cs_percentage'
cs_get_augmented_data(x, ...)

## S3 method for class 'cs_anchor_individual_within'
cs_get_augmented_data(x, ...)

Arguments

x

A cs_analysis object

...

Additional arguments

Value

A tibble with augmented data

See Also

Extractor functions cs_get_data(), cs_get_model(), cs_get_n(), cs_get_reliability(), cs_get_summary()

Examples

# Augmented data can be extracted for every individual approach
anchor_results <- claus_2020 |>
  cs_anchor(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    mid_improvement = 9
  )


distribution_results <- claus_2020 |>
  cs_distribution(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    reliability = 0.80
  )


distribution_results_hlm <- claus_2020 |>
  cs_distribution(
    id,
    time,
    bdi,
    rci_method = "HLM"
  )


statistical_results <- claus_2020 |>
  cs_statistical(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8
  )


combined_results <- claus_2020 |>
  cs_combined(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    reliability = 0.80
  )


cs_get_augmented_data(anchor_results)
cs_get_augmented_data(distribution_results)
cs_get_augmented_data(distribution_results_hlm)
cs_get_augmented_data(statistical_results)
cs_get_augmented_data(combined_results)

Get Used Cutoff And Type From A cs_analysis Object

Description

Get Used Cutoff And Type From A cs_analysis Object

Usage

cs_get_cutoff(x, with_descriptives = FALSE)

Arguments

x

A cs_analysis object

with_descriptives

Logical indicating whether you want to retrieve only the cutoff type and value or the summary statistics on which it is based on. The default is FALSE.

Value

A tibble with cutoff information

Examples

cs_results <- claus_2020 |>
  cs_statistical(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c"
  )

cs_get_cutoff(cs_results)
cs_get_cutoff(cs_results, with_descriptives = TRUE)

Get Descriptives Used In The Cutoff Calculation

Description

Get Descriptives Used In The Cutoff Calculation

Usage

cs_get_cutoff_descriptives(x)

Arguments

x

A clinisig object

Value

A tibble with means and standard deviations of the clinical and functional population


Get Data From A cs_analysis Object

Description

Get Data From A cs_analysis Object

Usage

cs_get_data(x, dataset = "data")

Arguments

x

A cs_analysis object.

dataset

The dataset you wish to retrieve. Available options are

  • "original" (the raw original dataset)

  • "wide" (the original dataset in wide format)

  • "data" (the dataset which is used in the calculations). The default is "data"

Value

A tibble

See Also

Extractor functions cs_get_augmented_data(), cs_get_model(), cs_get_n(), cs_get_reliability(), cs_get_summary()

Examples

cs_results <- claus_2020 |>
  cs_anchor(id, time, bdi, mid_improvement = 9, pre = 1, post = 4)

cs_get_data(cs_results)
cs_get_data(cs_results, dataset = "wide")
cs_get_data(cs_results, dataset = "original")

Get The HLM Model From A cs_analysis Object

Description

With cs_get_model() you can extract the fitted HLM model for the distribution-based approach. This is useful to either diagnose the model further (beacuse all assumptions of HLMs apply in this case) or plot the results differently.

Usage

cs_get_model(x)

Arguments

x

A cs_analysis object

Value

A model of class lmerMod

See Also

Extractor functions cs_get_augmented_data(), cs_get_data(), cs_get_n(), cs_get_reliability(), cs_get_summary()

Examples

cs_results <- claus_2020 |>
  cs_distribution(id, time, bdi, rci_method = "HLM")

cs_get_model(cs_results)

Get Number Of Participants From A cs_analysis Object

Description

With cs_get_n() one can extract the number of participants used in a clinical significance analysis from a cs_analysisobject. This may depend on the clinical significance approach and if missing values were present in the dataset. For all individual analyses, missing values are handled by list-wise deletion. Consequently, individuals with a missing pre or post intervention score will be omitted from the analyses.

Usage

cs_get_n(x, which = "all")

Arguments

x

A cs_analysis object

which

Which n should be returned? Available options are

  • "all", (the default) returns the number of participants in both, the original and used data set

  • "original", number of participants in the original dataset

  • "used", number of participants in the used data set, so after conversion to wide format and omitting cases with missing values

Value

A tibble with number of participants

See Also

Extractor functions cs_get_augmented_data(), cs_get_data(), cs_get_model(), cs_get_reliability(), cs_get_summary()

Examples

# n can be extracted for every approach
cs_results_anchor <- claus_2020 |>
  cs_anchor(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    mid_improvement = 9
  )

cs_results_distribution <- claus_2020 |>
  cs_distribution(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    reliability = 0.80
  )

cs_results_statistical <- claus_2020 |>
  cs_statistical(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c"
  )

cs_results_combined <- claus_2020 |>
  cs_combined(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    reliability = 0.80,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c"
  )

cs_results_percentage <- claus_2020 |>
  cs_percentage(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    pct_improvement = 0.3
  )


cs_get_n(cs_results_anchor)
cs_get_n(cs_results_distribution)
cs_get_n(cs_results_statistical)
cs_get_n(cs_results_combined)
cs_get_n(cs_results_percentage)


# Get your desired n
cs_get_n(cs_results_anchor, which = "all")
cs_get_n(cs_results_anchor, which = "original")
cs_get_n(cs_results_anchor, which = "used")

Get Reliability Of A cs_analysis Object

Description

Get Reliability Of A cs_analysis Object

Usage

cs_get_reliability(x)

Arguments

x

A cs_analysis object

Value

A tibble showing the reliability

See Also

Extractor functions cs_get_augmented_data(), cs_get_data(), cs_get_model(), cs_get_n(), cs_get_summary()

Examples

cs_results <- claus_2020 |>
  cs_distribution(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    reliability = 0.80
  )


cs_get_reliability(cs_results)

Get A Summary Table From A cs_analysis Object

Description

Retrieve the summary table in a tidy tibble format. This is especially useful to plot the results or conduct sensitivity analyses.

Usage

cs_get_summary(x, ...)

## Default S3 method:
cs_get_summary(x, which = c("individual", "group"), ...)

## S3 method for class 'cs_anchor_group_within'
cs_get_summary(x, ...)

## S3 method for class 'cs_anchor_group_between'
cs_get_summary(x, ...)

Arguments

x

An object of class cs_analysis

...

Additional arguments passed to the respective method

which

Which level of summary table to return. This is only necessary for method "HA" since two summary tables are reported. Available are

  • individual, the default

  • group, group level results according to Hageman & Arrindell (1999)

Value

A tibble with clinical significance categories

References

See Also

Extractor functions cs_get_augmented_data(), cs_get_data(), cs_get_model(), cs_get_n(), cs_get_reliability()

Examples

anchor_results <- claus_2020 |>
  cs_anchor(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    mid_improvement = 8
  )

cs_get_summary(anchor_results)


# Get summary table for a group level analysis
anchor_results_grouped <- claus_2020 |>
  cs_anchor(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    mid_improvement = 8,
    target = "group"
  )

cs_get_summary(anchor_results_grouped)


# Get group-wise summary table for the Hageman & Arrindell method
combined_results <- claus_2020 |>
  cs_combined(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    reliability = 0.80,
    rci_method = "HA"
  )

cs_get_summary(combined_results)
cs_get_summary(combined_results, which = "group")

Percentage-Change Analysis of Clinical Significance

Description

cs_percentage() can be used to determine the clinical significance of intervention studies employing the percentage-change approach. For this, each individuals relative change compared to the pre intervention measurement and if this change exceeds a predefined change in percent points, this change is then deemed clinically significant.

Usage

cs_percentage(
  data,
  id,
  time,
  outcome,
  group = NULL,
  pre = NULL,
  post = NULL,
  pct_improvement = NULL,
  pct_deterioration = NULL,
  better_is = c("lower", "higher")
)

Arguments

data

A tidy data frame

id

Participant ID

time

Time variable

outcome

Outcome variable

group

Grouping variable (optional)

pre

Pre measurement (only needed if the time variable contains more than two measurements)

post

Post measurement (only needed if the time variable contains more than two measurements)

pct_improvement

Numeric, percent change that indicates a clinically significant improvement

pct_deterioration

Numeric, percent change that indicates a clinically significant deterioration (optional). If this is not set, pct_deterioration will be assumed to be equal to pct_improvement

better_is

Which direction means a better outcome for the used instrument? Available are

  • "lower" (lower outcome scores are desirable, the default) and

  • "higher" (higher outcome scores are desirable)

Value

An S3 object of class cs_analysis and cs_percentage

Computational details

Each participants change is calculated and then divided by the pre intervention score to estimate the individual's percent change. A percent change for an improvement as well as a deterioration can be provided separately and if pct_deterioration is not set, it will be assumed to be the same as pct_improvement.

Categories

Each individual's change may then be categorized into one of the following three categories:

Data preparation

The data set must be tidy, which corresponds to a long data frame in general. It must contain a patient identifier which must be unique per patient. Also, a column containing the different measurements and the outcome must be supplied. Each participant-measurement combination must be unique, so for instance, the data must not contain two "After" measurements for the same patient.

Additionally, if the measurement column contains only two values, the first value based on alphabetical, numerical or factor ordering will be used as the pre measurement. For instance, if the column contains the measurements identifiers "pre" and "post" as strings, then "post" will be sorted before "pre" and thus be used as the "pre" measurement. The function will throw a warning but generally you may want to explicitly define the "pre" and "post" measurement with arguments pre and post. In case of more than two measurement identifiers, you have to define pre and post manually since the function does not know what your pre and post intervention measurements are.

If your data is grouped, you can specify the group by referencing the grouping variable (see examples below). The analysis is then run for every group to compare group differences.

See Also

Main clinical signficance functions cs_anchor(), cs_combined(), cs_distribution(), cs_statistical()

Examples

cs_results <- claus_2020 |>
  cs_percentage(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    pct_improvement = 0.3
  )

cs_results
summary(cs_results)
plot(cs_results)


# You can set different thresholds for improvement and deterioration
cs_results_2 <- claus_2020 |>
  cs_percentage(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    pct_improvement = 0.3,
    pct_deterioration = 0.2
  )

cs_results_2
summary(cs_results_2)
plot(cs_results_2)


# You can group the analysis by providing a group column from the data
cs_results_grouped <- claus_2020 |>
  cs_percentage(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    pct_improvement = 0.3,
    group = treatment
  )

cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)


# The analyses can be performed for positive outcomes as well, i.e., outcomes
# for which a higher value is beneficial
cs_results_who <- claus_2020 |>
  cs_percentage(
    id,
    time,
    who,
    pre = 1,
    post = 4,
    pct_improvement = 0.3,
    better_is = "higher"
  )

cs_results_who
summary(cs_results_who)
plot(cs_results_who)
plot(cs_results_who, show = category)

Statistical Analysis of Clinical Significance

Description

cs_statistical() can be used to determine the clinical significance of intervention studies employing the statistical approach. For this, it will be assumed that the functional (non-clinical population) and patient (clinical population) scores form two distinct distributions on a continuum. cs_statistical() calculates a cutoff point between these two populations and counts, how many patients changed from the clinical to the functional population during intervention. Several methods for calculating this cutoff are available.

Usage

cs_statistical(
  data,
  id,
  time,
  outcome,
  group = NULL,
  pre = NULL,
  post = NULL,
  m_functional = NULL,
  sd_functional = NULL,
  reliability = NULL,
  better_is = c("lower", "higher"),
  cutoff_method = c("JT", "HA"),
  cutoff_type = c("a", "b", "c"),
  significance_level = 0.05
)

Arguments

data

A tidy data frame

id

Participant ID

time

Time variable

outcome

Outcome variable

group

Grouping variable (optional)

pre

Pre measurement (only needed if the time variable contains more than two measurements)

post

Post measurement (only needed if the time variable contains more than two measurements)

m_functional

Numeric, mean of functional population.

sd_functional

Numeric, standard deviation of functional population

reliability

The instrument's reliability estimate. If you selected the NK method, the here specified reliability will be the instrument's pre measurement reliability. Not needed for the HLM method.

better_is

Which direction means a better outcome for the used instrument? Available are

  • "lower" (lower outcome scores are desirable, the default) and

  • "higher" (higher outcome scores are desirable)

cutoff_method

Cutoff method, Available are

  • "JT" (Jacobson & Truax, 1991, the default)

  • "HA" (Hageman & Arrindell, 1999)

cutoff_type

Cutoff type. Available are "a", "b", and "c". Defaults to "a" but "c" is usually recommended. For "b" and "c", summary data from a functional population must be given with arguments m_functional and sd_functional.

significance_level

Significance level alpha, defaults to 0.05. If you choose the "HA" method, this value corresponds to the maximum risk of misclassification

Value

An S3 object of class cs_analysis and cs_statistical

Computational details

There are three available cutoff types, namely a, b, and c which can be used to "draw a line" or separate the functional and clinical population on a continuum. a as a cutoff is defined as the mean of the clinical population minus two times the standard deviation (SD) of the clinical population. b is defined as the mean of the functional population plus also two times the SD of the clinical population. This is true for "negative" outcomes, where a lower instrument score is desirable. For "positive" outcomes, where higher scores are beneficial, a is the mean of the clinical population plus 2 \cdot SD of the clinical population and b is mean of the functional population minus 2 \cdot SD of the clinical population. The summary statistics for the clinical population are estimated from the provided data at pre measurement.

c is defined as the midpoint between both populations based on their respective mean and SD. In order to calculate b and c, descriptive statistics for the functional population must be provided.

Categories

Individual patients can be categorized into one of the following groups:

Data preparation

The data set must be tidy, which corresponds to a long data frame in general. It must contain a patient identifier which must be unique per patient. Also, a column containing the different measurements and the outcome must be supplied. Each participant-measurement combination must be unique, so for instance, the data must not contain two "After" measurements for the same patient.

Additionally, if the measurement column contains only two values, the first value based on alphabetical, numerical or factor ordering will be used as the pre measurement. For instance, if the column contains the measurements identifiers "pre" and "post" as strings, then "post" will be sorted before "pre" and thus be used as the "pre" measurement. The function will throw a warning but generally you may want to explicitly define the "pre" and "post" measurement with arguments pre and post. In case of more than two measurement identifiers, you have to define pre and post manually since the function does not know what your pre and post intervention measurements are.

If your data is grouped, you can specify the group by referencing the grouping variable (see examples below). The analysis is then run for every group to compare group differences.

References

See Also

Main clinical signficance functions cs_anchor(), cs_combined(), cs_distribution(), cs_percentage()

Examples

# By default, cutoff type "a" is used
cs_results <- claus_2020 |>
  cs_statistical(id, time, hamd, pre = 1, post = 4)

cs_results
summary(cs_results)
plot(cs_results)


# You can choose a different cutoff type but need to provide additional
# population summary statistics for the functional population
cs_results_c <- claus_2020 |>
  cs_statistical(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c"
  )

cs_results_c
summary(cs_results_c)
plot(cs_results_c)


# You can use a different method to calculate the cutoff
cs_results_ha <- claus_2020 |>
  cs_statistical(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    reliability = 0.80,
    cutoff_type = "c",
    cutoff_method = "HA"
  )

cs_results_ha
summary(cs_results_ha)
plot(cs_results_ha)


# And you can group the analysis by providing a grouping variable from the data
cs_results_grouped <- claus_2020 |>
  cs_statistical(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 8,
    cutoff_type = "c",
    group = treatment
  )

cs_results_grouped
summary(cs_results_grouped)
plot(cs_results_grouped)

Generic to Calculate RCI Band Data for Plotting

Description

This is an internal generic to generate data for the RCI band in clinical significance plots. This should not be called directly.

Usage

generate_plotting_band(x, lower_limit, upper_limit, ...)

Arguments

x

An object of respective class

lower_limit

Lower plotting limit

upper_limit

Upper plotting limit

...

Additional arguments

Value

A tibble with data for the ribbon indicating unchanged patients


Generate RCI Band for the Individual Anchor-Based Approach

Description

Generate RCI Band for the Individual Anchor-Based Approach

Usage

## S3 method for class 'cs_anchor_individual_within'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for EN Method

Description

Generate RCI Band for EN Method

Usage

## S3 method for class 'cs_en'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for GLN Method

Description

Generate RCI Band for GLN Method

Usage

## S3 method for class 'cs_gln'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for HA Method

Description

Generate RCI Band for HA Method

Usage

## S3 method for class 'cs_ha'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for HLL Method

Description

Generate RCI Band for HLL Method

Usage

## S3 method for class 'cs_hll'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for JT Method

Description

Generate RCI Band for JT Method

Usage

## S3 method for class 'cs_jt'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for NK Method

Description

Generate RCI Band for NK Method

Usage

## S3 method for class 'cs_nk'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Generate RCI Band for the Percentage-Change Approach

Description

Generate RCI Band for the Percentage-Change Approach

Usage

## S3 method for class 'cs_percentage'
generate_plotting_band(x, lower_limit = 0, upper_limit = 100, ...)

Chronic Pain Data

Description

A reduced version of the data collected by Hechler et al. (2014)

Usage

hechler_2014

Format

A tibble with 208 rows and 3 variables:

patient

Patient identifier

measurement

Indicator of measurement

disability

Pain-related disability as measured with the PPDI (lower is better)

References

Hechler, T., Ruhe, A.‑K., Schmidt, P., Hirsch, J., Wager, J., Dobe, M., Krummenauer, F., & Zernikow, B. (2014). Inpatient Based Intensive Interdisciplinary Pain Treatment for Highly Impaired Children with Severe Chronic Pain: Randomized Controlled Trial of Efficacy and Economic Effects. Pain, 155(1), 118–128. https://doi.org/10.1016/j.pain.2013.09.015


Marital Therapy Data

Description

A dataset containing the data from Jacobson et al. (1989). The purpose of the study was to examine two forms of behavioral marital therapy,

Usage

jacobson_1989

Format

An object of class tbl_df with 60 rows and 4 columns.

subject

Subject ID

time

Measurement

das

Dyadic Adjustment Scale score (higher is better)

gds

Global Distress Scale score (lower is better)

References


Plot an Object of Class cs_anchor_group_between

Description

This function creates a generic group level clinical significance plot by plotting the between group change with the associated uncertainty interval around the estimated change on the y-axis.

Usage

## S3 method for class 'cs_anchor_group_between'
plot(
  x,
  x_lab = "Group",
  y_lab = "Mean Intervention Effect\n(with 95%-CI)",
  ...
)

Arguments

x

An object of class cs_anchor_group_between

x_lab

String, x axis label, defaults to "Group"

y_lab

String, y axis label, defaults to "Mean Intervention Effect (with 95%-CI)"

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    mid_improvement = 8,
    target = "group",
    group = condition,
    effect = "between",
    post = "After"
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Condition", y_lab = "Treatment Effect")

Plot an Object of Class cs_anchor_group_within

Description

This function creates a generic group level clinical significance plot by plotting the within group change with the associated uncertainty interval around the estimated change on the y-axis.

Usage

## S3 method for class 'cs_anchor_group_within'
plot(
  x,
  x_lab = "Group",
  y_lab = "Mean Intervention Effect\n(with 95%-CI)",
  ...
)

Arguments

x

An object of class cs_anchor_group_within

x_lab

String, x axis label. Defaults to "Group"

y_lab

String, y axis label, defaults to "Mean Intervention Effect (with 95%-CI)"

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    mom_di,
    mid_improvement = 8,
    target = "group",
    group = condition
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Condition", y_lab = "Treatment Effect")

Plot an Object of Class cs_anchor_individual_within

Description

This function creates a generic clinical significance plot by plotting the patients' pre intervention value on the x-axis and the post intervention score on the y-axis.

Usage

## S3 method for class 'cs_anchor_individual_within'
plot(
  x,
  x_lab = "Pre",
  y_lab = "Post",
  color_lab = "Group",
  lower_limit,
  upper_limit,
  show,
  point_alpha = 1,
  mid_fill = "grey10",
  mid_alpha = 0.1,
  overplotting = 0.02,
  ...
)

Arguments

x

An object of class cs_distribution

x_lab

String, x axis label. Default is "Pre".

y_lab

String, x axis label. Default is "Post".

color_lab

String, color label (if colors are displayed). Default is "Group"

lower_limit

Numeric, lower plotting limit. Defaults to 2% smaller than minimum instrument score

upper_limit

Numeric, upper plotting limit. Defaults to 2% larger than maximum instrument score

show

Unquoted category name. You have several options to color different features. Available are

  • improved (shows improved participants)

  • unchanged (shows unchanged participants)

  • deteriorated (shows deteriorated participants)

point_alpha

Numeric, transparency adjustment for points. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

mid_fill

String, a color (name or HEX code) for the percentage range fill

mid_alpha

Numeric, controls the transparency of the percentage fill. This can be any value between 0 and 1, defaults to 0.1

overplotting

Numeric, control amount of overplotting. Defaults to 0.02 (i.e., 2% of range between lower and upper limit).

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    mid_improvement = 8
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Before Intervention", y_lab = "After Intervention")


# Show the individual categories
plot(cs_results, show = category)


# Show a specific category
plot(cs_results, show = improved)


# Show groups as specified in the data
cs_results_grouped <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    mid_improvement = 8,
    group = condition
  )

plot(cs_results_grouped)


# To avoid overplotting, generic ggplot2 code can be used to facet the plot
library(ggplot2)
plot(cs_results_grouped) +
  facet_wrap(~ group)


# Adjust the transparency of individual data points
plot(cs_results, point_alpha = 0.3)


# Adjust the fill and transparency of the "unchanged" (PCC) region
plot(cs_results, mid_fill = "firebrick", mid_alpha = 0.2)


# Control the overplotting
plot(cs_results, overplotting = 0.1)


# Or adjust the axis limits by hand
plot(cs_results, lower_limit = 0, upper_limit = 80)

Plot an Object of Class cs_combined

Description

This function creates a generic clinical significance plot by plotting the patients' pre intervention value on the x-axis and the post intervention score on the y-axis.

Usage

## S3 method for class 'cs_combined'
plot(
  x,
  x_lab = NULL,
  y_lab = NULL,
  color_lab = "Group",
  lower_limit,
  upper_limit,
  show,
  point_alpha = 1,
  trajectory_alpha = 1,
  rci_fill = "grey10",
  rci_alpha = 0.1,
  overplotting = 0.02,
  ...
)

Arguments

x

An object of class cs_distribution

x_lab

String, x axis label. Default is "Pre".

y_lab

String, x axis label. Default is "Post".

color_lab

String, color label (if colors are displayed). Default is "Group"

lower_limit

Numeric, lower plotting limit. Defaults to 2% smaller than minimum instrument score

upper_limit

Numeric, upper plotting limit. Defaults to 2% larger than maximum instrument score

show

Unquoted category name. You have several options to color different features. Available are

  • category (shows all categories at once)

  • recovered (shows recovered participants)

  • improved (shows improved participants)

  • unchanged (shows unchanged participants)

  • deteriorated (shows deteriorated participants)

  • harmed (shows harmed participants)

point_alpha

Numeric, transparency adjustment for points. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

trajectory_alpha

Numeric, transparency adjustment for trajectories. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

rci_fill

String, a color (name or HEX code) for RCI fill

rci_alpha

Numeric, controls the transparency of the RCI. This can be any value between 0 and 1, defaults to 0.1

overplotting

Numeric, control amount of overplotting. Defaults to 0.02 (i.e., 2% of range between lower and upper limit).

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_combined(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    reliability = 0.80,
    m_functional = 15,
    sd_functional = 8,
    cutoff_type = "c"
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Before Intervention", y_lab = "After Intervention")


# Show the individual categories
plot(cs_results, show = category)


# Show a specific
plot(cs_results, show = recovered)


# Show groups as specified in the data
cs_results_grouped <- antidepressants |>
  cs_combined(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    reliability = 0.80,
    m_functional = 15,
    sd_functional = 8,
    cutoff_type = "c",
    group = condition
  )

plot(cs_results_grouped)


# To avoid overplotting, generic ggplot2 code can be used to facet the plot
library(ggplot2)
plot(cs_results_grouped) +
  facet_wrap(~ group)


# Adjust the transparency of individual data points
plot(cs_results, point_alpha = 0.3)


# Adjust the fill and transparency of the "unchanged" (RCI) region
plot(cs_results, rci_fill = "firebrick", rci_alpha = 0.2)


# Control the overplotting
plot(cs_results, overplotting = 0.1)


# Or adjust the axis limits by hand
plot(cs_results, lower_limit = 0, upper_limit = 80)

Plot an Object of Class cs_distribution

Description

This function creates a generic clinical significance plot by plotting the patients' pre intervention value on the x-axis and the post intervention score on the y-axis.

Usage

## S3 method for class 'cs_distribution'
plot(
  x,
  x_lab = NULL,
  y_lab = NULL,
  color_lab = "Group",
  lower_limit,
  upper_limit,
  show,
  point_alpha = 1,
  trajectory_alpha = 1,
  rci_fill = "grey10",
  rci_alpha = 0.1,
  overplotting = 0.02,
  ...
)

Arguments

x

An object of class cs_distribution

x_lab

String, x axis label. Default is "Pre".

y_lab

String, x axis label. Default is "Post".

color_lab

String, color label (if colors are displayed). Default is "Group"

lower_limit

Numeric, lower plotting limit. Defaults to 2% smaller than minimum instrument score

upper_limit

Numeric, upper plotting limit. Defaults to 2% larger than maximum instrument score

show

Unquoted category name. You have several options to color different features. Available are

  • category (shows all categories at once)

  • improved (shows improved participants)

  • unchanged (shows unchanged participants)

  • deteriorated (shows deteriorated participants)

point_alpha

Numeric, transparency adjustment for points. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

trajectory_alpha

Numeric, transparency adjustment for trajectories. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

rci_fill

String, a color (name or HEX code) for RCI fill

rci_alpha

Numeric, controls the transparency of the RCI. This can be any value between 0 and 1, defaults to 0.1

overplotting

Numeric, control amount of overplotting. Defaults to 0.02 (i.e., 2% of range between lower and upper limit).

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_distribution(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    reliability = 0.80
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Before Intervention", y_lab = "After Intervention")


# Show the individual categories
plot(cs_results, show = category)


# Show a specific
plot(cs_results, show = improved)


# Show groups as specified in the data
cs_results_grouped <- antidepressants |>
  cs_distribution(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    reliability = 0.80,
    group = condition
  )

plot(cs_results_grouped)


# To avoid overplotting, generic ggplot2 code can be used to facet the plot
library(ggplot2)
plot(cs_results_grouped) +
  facet_wrap(~ group)


# Adjust the transparency of individual data points
plot(cs_results, point_alpha = 0.3)


# Adjust the fill and transparency of the "unchanged" (RCI) region
plot(cs_results, rci_fill = "firebrick", rci_alpha = 0.2)


# Control the overplotting
plot(cs_results, overplotting = 0.1)


# Or adjust the axis limits by hand
plot(cs_results, lower_limit = 0, upper_limit = 80)

Plot an Object of Class cs_percentage

Description

This function creates a generic clinical significance plot by plotting the patients' pre intervention value on the x-axis and the post intervention score on the y-axis.

Usage

## S3 method for class 'cs_percentage'
plot(
  x,
  x_lab = "Pre",
  y_lab = "Post",
  color_lab = "Group",
  lower_limit,
  upper_limit,
  show,
  point_alpha = 1,
  pct_fill = "grey10",
  pct_alpha = 0.1,
  overplotting = 0.02,
  ...
)

Arguments

x

An object of class cs_distribution

x_lab

String, x axis label. Default is "Pre".

y_lab

String, x axis label. Default is "Post".

color_lab

String, color label (if colors are displayed). Default is "Group"

lower_limit

Numeric, lower plotting limit. Defaults to 2% smaller than minimum instrument score

upper_limit

Numeric, upper plotting limit. Defaults to 2% larger than maximum instrument score

show

Unquoted category name. You have several options to color different features. Available are

  • improved (shows improved participants)

  • unchanged (shows unchanged participants)

  • deteriorated (shows deteriorated participants)

point_alpha

Numeric, transparency adjustment for points. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

pct_fill

String, a color (name or HEX code) for the percentage range fill

pct_alpha

Numeric, controls the transparency of the percentage fill. This can be any value between 0 and 1, defaults to 0.1

overplotting

Numeric, control amount of overplotting. Defaults to 0.02 (i.e., 2% of range between lower and upper limit).

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_percentage(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    pct_improvement = 0.4
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Before Intervention", y_lab = "After Intervention")


# Show the individual categories
plot(cs_results, show = category)


# Show a specific category
plot(cs_results, show = improved)


# Show groups as specified in the data
cs_results_grouped <- antidepressants |>
  cs_percentage(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    pct_improvement = 0.4,
    group = condition
  )

plot(cs_results_grouped)


# To avoid overplotting, generic ggplot2 code can be used to facet the plot
library(ggplot2)
plot(cs_results_grouped) +
  facet_wrap(~ group)


# Adjust the transparency of individual data points
plot(cs_results, point_alpha = 0.3)


# Adjust the fill and transparency of the "unchanged" (PCC) region
plot(cs_results, pct_fill = "firebrick", pct_alpha = 0.2)


# Control the overplotting
plot(cs_results, overplotting = 0.1)


# Or adjust the axis limits by hand
plot(cs_results, lower_limit = 0, upper_limit = 80)

Plot an Object of Class cs_statistical

Description

This function creates a generic clinical significance plot by plotting the patients' pre intervention value on the x-axis and the post intervention score on the y-axis.

Usage

## S3 method for class 'cs_statistical'
plot(
  x,
  x_lab = "Pre",
  y_lab = "Post",
  color_lab = "Group",
  include_cutoff = TRUE,
  lower_limit,
  upper_limit,
  show,
  point_alpha = 1,
  overplotting = 0.02,
  ...
)

Arguments

x

An object of class cs_statistical

x_lab

String, x axis label. Default is "Pre".

y_lab

String, x axis label. Default is "Post".

color_lab

String, color label (if colors are displayed). Default is "Group"

include_cutoff

Logical, whether to include the population cutoff. Default is TRUE.

lower_limit

Numeric, lower plotting limit. Defaults to 2% smaller than minimum instrument score

upper_limit

Numeric, upper plotting limit. Defaults to 2% larger than maximum instrument score

show

Unquoted category name. You have several options to color different features. Available are

  • category (shows all categories at once)

  • clinical_pre (shows participants with clinical scores pre intervention)

  • functional_post (shows participants with functional scores post intervention)

  • unchanged (shows unchanged participants)

point_alpha

Numeric, transparency adjustment for points. A value between 0 and 1 where 1 corresponds to not transparent at all and 0 to fully transparent.

overplotting

Numeric, control amount of overplotting. Defaults to 0.02 (i.e., 2% of range between lower and upper limit).

...

Additional arguments

Value

A ggplot2 plot

Examples

cs_results <- antidepressants |>
  cs_statistical(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    m_functional = 15,
    sd_functional = 8,
    cutoff_type = "c"
  )


# Plot the results "as is"
plot(cs_results)


# Change the axis labels
plot(cs_results, x_lab = "Before Intervention", y_lab = "After Intervention")


# Show the individual categories
plot(cs_results, show = category)


# Show groups as specified in the data
cs_results_grouped <- antidepressants |>
  cs_statistical(
    patient,
    measurement,
    pre = "Before",
    mom_di,
    m_functional = 15,
    sd_functional = 8,
    cutoff_type = "c",
    group = condition
  )

plot(cs_results_grouped)


# To avoid overplotting, generic ggplot2 code can be used to facet the plot
library(ggplot2)
plot(cs_results_grouped) +
  facet_wrap(~ group)


# Adjust the transparency of individual data points
plot(cs_results, point_alpha = 0.3)


# Control the overplotting
plot(cs_results, overplotting = 0.1)


# Or adjust the axis limits by hand
plot(cs_results, lower_limit = 0, upper_limit = 80)

Print Method for the Anchor-Based Approach for Groups (Between)

Description

Print Method for the Anchor-Based Approach for Groups (Between)

Usage

## S3 method for class 'cs_anchor_group_between'
print(x, ...)

Arguments

x

An object of class cs_anchor_group_between

...

Additional arguments

Value

No return value, called for side effects

Examples

cs_results <- claus_2020 |>
  cs_anchor(
    id,
    time,
    bdi,
    post = 4,
    mid_improvement = 7,
    group = treatment,
    target = "group",
    effect = "between"
  )

cs_results

Print Method for the Anchor-Based Approach for Groups (Within)

Description

Print Method for the Anchor-Based Approach for Groups (Within)

Usage

## S3 method for class 'cs_anchor_group_within'
print(x, ...)

Arguments

x

An object of class cs_anchor_group_within

...

Additional arguments

Value

No return value, called for side effects

Examples

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

cs_results

Print Method for the Anchor-Based Approach for Individuals

Description

Print Method for the Anchor-Based Approach for Individuals

Usage

## S3 method for class 'cs_anchor_individual_within'
print(x, ...)

Arguments

x

An object of class cs_anchor_individual_within

...

Additional arguments

Value

No return value, called for side effects

Examples

cs_results <- claus_2020 |>
  cs_distribution(id, time, hamd, pre = 1, post = 4, reliability = 0.8)
cs_results

Print Method for the Combined Approach

Description

Print Method for the Combined Approach

Usage

## S3 method for class 'cs_combined'
print(x, ...)

Arguments

x

An object of class cs_combined

...

Additional arguments

Value

No return value, called for side effects

Examples

cs_results <- claus_2020 |>
  cs_combined(id, time, hamd, pre = 1, post = 4, reliability = 0.8)

cs_results

Print Method for the Distribution-Based Approach

Description

Print Method for the Distribution-Based Approach

Usage

## S3 method for class 'cs_distribution'
print(x, ...)

Arguments

x

An object of class cs_distribution

...

Additional arguments

Value

No return value, called for side effects

Examples

cs_results <- claus_2020 |>
  cs_distribution(id, time, hamd, pre = 1, post = 4, reliability = 0.8)

cs_results

Print Method for the Percentange-Change Approach

Description

Print Method for the Percentange-Change Approach

Usage

## S3 method for class 'cs_percentage'
print(x, ...)

Arguments

x

An object of class cs_percentage

...

Additional arguments

Value

No return value, called for side effects

Examples

cs_results <- claus_2020 |>
  cs_percentage(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    pct_improvement = 0.5
  )

cs_results

Print Method for the Statistical Approach

Description

Print Method for the Statistical Approach

Usage

## S3 method for class 'cs_statistical'
print(x, ...)

Arguments

x

An object of class cs_distribution

...

Additional arguments

Value

No return value, called for side effects

Examples

cs_results <- claus_2020 |>
  cs_statistical(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 7
  )

cs_results

Summary Method for the Anchor-Based Approach for Groups (Between)

Description

Summary Method for the Anchor-Based Approach for Groups (Between)

Usage

## S3 method for class 'cs_anchor_group_between'
summary(object, ...)

Arguments

object

An object of class cs_anchor_group_between

...

Additional arguments

Value

No return value, called for side effects only

Examples

cs_results <- antidepressants |>
  cs_anchor(
    patient,
    measurement,
    post = "After",
    mom_di,
    mid_improvement = 8,
    target = "group",
    effect = "between",
    group = condition
  )

summary(cs_results)

Summary Method for the Anchor-Based Approach for Groups (Within)

Description

Summary Method for the Anchor-Based Approach for Groups (Within)

Usage

## S3 method for class 'cs_anchor_group_within'
summary(object, ...)

Arguments

object

An object of class cs_anchor_group_within

...

Additional arguments

Value

No return value, called for side effects only

Examples

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

summary(cs_results)

Summary Method for the Anchor-Based Approach

Description

Summary Method for the Anchor-Based Approach

Usage

## S3 method for class 'cs_anchor_individual_within'
summary(object, ...)

Arguments

object

An object of class cs_anchor_individual_within

...

Additional arguments

Value

No return value, called for side effects only

Examples

cs_results <- claus_2020 |>
  cs_anchor(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    mid_improvement = 7
  )

cs_results

Summary Method for the Combined Approach

Description

Summary Method for the Combined Approach

Usage

## S3 method for class 'cs_combined'
summary(object, ...)

Arguments

object

An object of class cs_combined

...

Additional arguments

Value

No return value, called for side effects only

Examples

cs_results <- claus_2020 |>
  cs_combined(id, time, hamd, pre = 1, post = 4, reliability = 0.8)

summary(cs_results)

Summary Method for the Distribution-Based Approach

Description

Summary Method for the Distribution-Based Approach

Usage

## S3 method for class 'cs_distribution'
summary(object, ...)

Arguments

object

An object of class cs_distribution

...

Additional arguments

Value

No return value, called for side effects only

Examples

cs_results <- claus_2020 |>
  cs_distribution(id, time, hamd, pre = 1, post = 4, reliability = 0.8)

summary(cs_results)

Summary Method for the Percentage-Change Approach

Description

Summary Method for the Percentage-Change Approach

Usage

## S3 method for class 'cs_percentage'
summary(object, ...)

Arguments

object

An object of class cs_percentage

...

Additional arguments

Value

No return value, called for side effects only

Examples

cs_results <- claus_2020 |>
  cs_percentage(
    id,
    time,
    bdi,
    pre = 1,
    post = 4,
    pct_improvement = 0.5
  )

summary(cs_results)

Summary Method for the Statistical Approach

Description

Summary Method for the Statistical Approach

Usage

## S3 method for class 'cs_statistical'
summary(object, ...)

Arguments

object

An object of class cs_distribution

...

Additional arguments

Value

No return value, called for side effects only

Examples

cs_results <- claus_2020 |>
  cs_statistical(
    id,
    time,
    hamd,
    pre = 1,
    post = 4,
    m_functional = 8,
    sd_functional = 7
  )

summary(cs_results)