Skip to contents

Trials often report baseline and final SDs, or a confidence interval, standard error, t statistic or p-value for the mean change, rather than the SD of the change itself. These are the standard reconstructions of the Cochrane Handbook (sections 6.5.2.3 and 6.5.2.8), vectorized so they can be applied to whole columns before responder_analysis():

Usage

impute_change_sd(
  method = c("prepost", "ci", "se", "tstat", "pvalue"),
  sd_baseline = NULL,
  sd_final = NULL,
  r = NULL,
  lower = NULL,
  upper = NULL,
  n = NULL,
  conf_level = 0.95,
  se = NULL,
  mean_change = NULL,
  t = NULL,
  p = NULL
)

Arguments

method

One of "prepost", "ci", "se", "tstat", "pvalue".

sd_baseline, sd_final, r

Baseline and final SDs and their correlation ("prepost").

lower, upper

Confidence limits for the mean change ("ci").

n

Sample size ("ci", "se", "tstat", "pvalue").

conf_level

Confidence level of lower/upper (default 0.95).

se

Standard error of the mean change ("se").

mean_change

Mean change ("tstat", "pvalue").

t

One-sample t statistic of the mean change against 0 ("tstat").

p

Two-sided p-value of that t test ("pvalue").

Value

A numeric vector of change-score SDs.

Details

  • "prepost": sqrt(sd_baseline^2 + sd_final^2 - 2 r sd_baseline sd_final), with r the correlation between baseline and final values (estimate it with estimate_change_cor() from studies that report all three SDs, and vary it in a sensitivity analysis);

  • "ci": sqrt(n) (upper - lower) / (2 t_{n-1}) from a confidence interval for the mean change;

  • "se": se sqrt(n);

  • "tstat": |mean_change / t| sqrt(n) from a one-sample t statistic;

  • "pvalue": as "tstat", with t the upper p / 2 quantile of t_{n-1} from a two-sided p-value.

References

Higgins JPT, Li T, Deeks JJ (editors) (2023). Chapter 6: Choosing effect measures and computing estimates of effect. In: Cochrane Handbook for Systematic Reviews of Interventions, version 6.4. Cochrane.

Examples

impute_change_sd("prepost", sd_baseline = c(2.1, 1.8), sd_final = c(2.4, 2.0), r = 0.5)
#> [1] 2.264950 1.907878
impute_change_sd("ci", lower = -1.9, upper = -0.7, n = 40)
#> [1] 1.876082