
Between-Case Standardized Mean Difference
Source:R/between_smd.R
, R/print.sc_bcsmd.R
between_smd.Rd
Calculates a standardized mean difference from a multilevel model as described in Pustejovsky et al. (2014)
Usage
between_smd(data, include_residuals = TRUE, model = "frequentist", ...)
# S3 method for class 'sc_bcsmd'
print(x, digits = 2, ...)
Arguments
- data
Either an scdf or an object returned from the
hplm()
orbplm()
function.- include_residuals
Logical. See details.
- model
Either
"ml"
or"bayesian"
.- ...
- x
An object returned by
baseline_smd()
.- digits
The minimum number of significant digits to be use. If set to "auto" (default), values are predefined.
Details
The BC-SMD is calculate as BC-SMD = Phase difference / sqrt(residual + random_intercept)
. This is most closely related to Cohen's d. If you want
to have the most exact estimation based on the between case variance, you
have to exclude the residual variance by setting the argument
include_residuals = FALSE
you get BC-SMD = Phase difference / sqrt(random_intercept)
. The 'base' model only includes the phase level as a
predictor like originally proposed by Hedges et al. Whereas the 'Full plm'
model includes the trend and the phase slope as additional predictors.
References
Pustejovsky, J. E., Hedges, L. V., & Shadish, W. R. (2014). Design-Comparable Effect Sizes in Multiple Baseline Designs: A General Modeling Framework. Journal of Educational and Behavioral Statistics, 39(5), 368–393. https://doi.org/10.3102/1076998614547577
Examples
## Create a example scdf:
des <- design(
n = 150,
phase_design = list(A1 = 10, B1 = 10, A2 = 10, B2 = 10, C = 10),
level = list(B1 = 1, A2 = 0, B2 = 1, C = 1),
rtt = 0.7,
random_start_value = TRUE
)
study <- random_scdf(des)
## Standard BC-SMD return:
between_smd(study)
#> Between-Case Standardized Mean Difference
#>
#> Model: frequentist
#>
#> Model phaseB1 phaseA2 phaseB2 phaseC
#> Base 0.82 0.82 1.65 2.47
#> Full plm 0.83 0.80 1.65 2.41
## Specify the model and provide an hplm object:
model <- hplm(study, contrast_level = "preceding", slope = FALSE, trend = FALSE)
between_smd(model)
#> Between-Case Standardized Mean Difference
#>
#> Model: frequentist
#>
#> Model phaseB1 phaseA2 phaseB2 phaseC
#> Provided 0.82 0 0.83 0.82
## excluding the residuals gives a more accruate estimation:
between_smd(model, include_residuals = FALSE)
#> Between-Case Standardized Mean Difference
#>
#> Model: frequentist
#>
#> Model phaseB1 phaseA2 phaseB2 phaseC
#> Provided 0.97 0 0.98 0.97