Calculates the HPS effect size estimator based on data from a multiple baseline design, as described in Hedges, Pustejovsky, & Shadish (2013). Note that the data must contain one row per measurement occasion per subject.

effect_size_MB(
  outcome,
  treatment,
  id,
  time,
  data = NULL,
  phi = NULL,
  rho = NULL
)

Arguments

outcome

vector of outcome data or name of variable within data. May not contain any missing values.

treatment

vector of treatment indicators or name of variable within data. Must be the same length as outcome.

id

factor vector indicating unique cases or name of variable within data. Must be the same length as outcome.

time

vector of measurement occasion times or name of variable within data. Must be the same length as outcome.

data

(Optional) dataset to use for analysis. Must be data.frame.

phi

(Optional) value of the auto-correlation nuisance parameter, to be used in calculating the small-sample adjusted effect size

rho

(Optional) value of the intra-class correlation nuisance parameter, to be used in calculating the small-sample adjusted effect size

Value

A list with the following components

g_dotdottotal number of non-missing observations
Knumber of time-by-treatment groups containing at least one observation
D_barnumerator of effect size estimate
S_sqsample variance, pooled across time points and treatment groups
delta_hat_unadjunadjusted effect size estimate
phicorrected estimate of first-order auto-correlation
sigma_sq_wcorrected estimate of within-case variance
rhoestimated intra-class correlation
thetaestimated scalar constant
nuestimated degrees of freedom
delta_hatcorrected effect size estimate
V_delta_hatestimated variance of delta_hat

Note

If phi or rho is left unspecified (or both), estimates for the nuisance parameters will be calculated.

References

Hedges, L. V., Pustejovsky, J. E., & Shadish, W. R. (2013). A standardized mean difference effect size for multiple baseline designs across individuals. Research Synthesis Methods, 4(4), 324-341. doi: 10.1002/jrsm.1086

Examples

data(Saddler)
effect_size_MB(outcome = outcome, treatment = treatment, id = case, 
               time = time, data = subset(Saddler, measure=="writing quality"))
#>                          est    se
#> unadjusted effect size 2.149 0.634
#> adjusted effect size   1.963 0.579
#> degree of freedom      8.918      

data(Laski)
effect_size_MB(outcome = outcome, treatment = treatment, id = case, 
               time = time, data = Laski)
#>                           est    se
#> unadjusted effect size  1.474 0.337
#> adjusted effect size    1.388 0.317
#> degree of freedom      13.100