View source: R/parametric-measures.R
SMD | R Documentation |
Calculates the within-case standardized mean difference effect size index
SMD(
A_data,
B_data,
condition,
outcome,
baseline_phase = NULL,
intervention_phase = NULL,
improvement = "increase",
std_dev = "baseline",
bias_correct = TRUE,
confidence = 0.95
)
A_data |
vector of numeric data for A phase. Missing values are dropped. |
B_data |
vector of numeric data for B phase. Missing values are dropped. |
condition |
vector identifying the treatment condition for each observation in the series. |
outcome |
vector of outcome data for the entire series. |
baseline_phase |
character string specifying which value of
|
intervention_phase |
character string specifying which value of
|
improvement |
character string indicating direction of improvement. Default is "increase". |
std_dev |
character string controlling how to calculate the standard
deviation in the denominator of the effect size. Set to |
bias_correct |
logical value indicating whether to use bias-correction
(i.e., Hedges' g). Default is |
confidence |
confidence level for the reported interval estimate. Set to
|
The standardized mean difference parameter is defined as the difference between the mean level of the outcome in phase B and the mean level of the outcome in phase A, scaled by the within-case standard deviation of the outcome in phase A. The parameter is estimated using sample means and sample standard deviations and (optionally) making a small-sample correction.
By default, the scaling factor is estimated using the sample standard
deviation in phase A (the baseline phase) only. Set std_dev = "pool"
to use the sample standard deviation pooled across both phases. Hedges'
(1981) small-sample bias correction is applied by default.
A list containing the estimate, standard error, and confidence interval.
A <- c(20, 20, 26, 25, 22, 23)
B <- c(28, 25, 24, 27, 30, 30, 29)
SMD(A_data = A, B_data = B, bias_correct = FALSE)
SMD(A_data = A, B_data = B)
SMD(A_data = A, B_data = B, std_dev = "pool")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.