Purpose

This workflow evaluates a four-phase ABAB single-case design for one participant. It keeps visual analysis and replication across phase transitions central, then adds phase summaries, nonoverlap measures, segmented regression, heteroskedasticity-and-autocorrelation-consistent uncertainty, an AR(1) sensitivity model, and prospective design simulation.

The included series is entirely synthetic. One case can support a within-case causal argument only when phase changes are planned, measured repeatedly, replicated, and credible against alternative explanations. A small p-value does not replace design logic.

User settings

Simulate and import

Visual analysis

Visual review addresses level, trend, variability, immediacy, overlap, consistency across similar phases, and replication of change at intervention introduction and withdrawal. Interpret every graph using the outcome direction selected above.

Phase summaries and immediacy

phase n mean sd median minimum maximum slope
A1 6 11.99 0.81 12.09 10.51 12.83 -0.03
B1 6 8.04 0.49 8.20 7.19 8.61 -0.03
A2 6 12.93 0.48 13.08 12.09 13.43 -0.01
B2 6 9.15 0.73 9.44 8.09 9.81 -0.27
from to last3_from first3_to immediate_change improvement
A1 B1 11.96 8.20 -3.77 3.77
B1 A2 7.89 13.03 5.14 -5.14
A2 B2 12.83 9.56 -3.27 3.27

Immediate-change summaries compare the final three observations of one phase with the first three of the next. They are descriptive and depend on the chosen window; inspect the raw series for delay, trend, and unusual points.

Nonoverlap effect sizes

NAP is the proportion of all baseline–intervention pairs showing improvement, with ties counted as one half. PND uses the most favorable baseline value as a threshold and is especially sensitive to one extreme baseline observation. Both are presented phase by phase because ABAB evidence depends on replicated transitions.

comparison NAP rank_biserial PND
A1 to B1 1 1 1
A2 to B2 1 1 1

Segmented regression

The model estimates the underlying A1 trend and separate level and slope changes at the start of B1, A2, and B2. Each change is conditional on the preceding fitted trajectory and the coding shown below. With only one short series, coefficients are sensitive to phase length, functional form, outliers, and residual dependence.

term estimate std_error statistic p_value conf_low conf_high
(Intercept) 12.112 0.235 51.531 0.000 11.614 12.610
time -0.035 0.097 -0.360 0.724 -0.240 0.171
B1 -3.740 0.519 -7.208 0.000 -4.839 -2.640
A2 5.010 0.374 13.394 0.000 4.217 5.803
B2 -2.810 0.566 -4.966 0.000 -4.010 -1.610
time_B1 0.001 0.117 0.005 0.996 -0.247 0.248
time_A2 0.023 0.110 0.212 0.835 -0.210 0.257
time_B2 -0.259 0.145 -1.795 0.092 -0.566 0.047

Serial-dependence sensitivity

term estimate std_error df statistic p_value conf_low conf_high
(Intercept) 12.255 0.463 16 26.444 0.000 11.273 13.237
time -0.084 0.120 16 -0.699 0.494 -0.339 0.171
B1 -3.358 0.609 16 -5.515 0.000 -4.649 -2.067
A2 5.346 0.608 16 8.787 0.000 4.056 6.636
B2 -2.535 0.610 16 -4.159 0.001 -3.828 -1.243
time_B1 -0.012 0.163 16 -0.073 0.942 -0.357 0.333
time_A2 0.027 0.162 16 0.165 0.871 -0.317 0.370
time_B2 -0.221 0.163 16 -1.358 0.193 -0.566 0.124

The HAC and AR(1) results are sensitivity analyses, not a cure for weak design or few observations. When they materially change the conclusions, report the disagreement and avoid a definitive statistical claim.

Prospective design simulation

This simulation evaluates the planned phase lengths under explicit assumptions set before data collection: the expected intervention effect, residual standard deviation, baseline trend, and AR(1) dependence. It does not reuse the observed fitted effect as if it were known.

replications B1_detection B2_detection both_detection assumed_effect assumed_ar1
500 0.998 0.996 0.994 -4 0.35

These detection rates are conditional on the stated data-generating assumptions and are not a guarantee of power for the eventual study. Vary plausible effect, variability, trend, phase length, and dependence before finalizing the design.

Dynamic results template

The synthetic ABAB series contained 24 observations, with 6, 6, 6, 6 observations across A1, B1, A2, and B2. Visual analysis should determine whether changes were immediate, consistent, and replicated. NAP was 1 for A1-to-B1 and 1 for A2-to-B2, with ties counted as one half.

In the segmented model with Newey-West uncertainty, the estimated level change at B1 was -3.74, 95% CI [-4.84, -2.64], p < .001, which provided statistical evidence of an immediate improvement under the fitted specification. The A2 transition estimate was 5.01, 95% CI [4.22, 5.8], and the B2 transition estimate was -2.81, 95% CI [-4.01, -1.61]. The AR(1) sensitivity estimate was -0.3. These statistics supplement the visual evidence and should not be interpreted as independent observations or population-level causal effects.

Reporting checklist

  • Define the case, setting, outcome, direction of improvement, and phase-change rule.
  • Report every observation, phase length, missing observation, and protocol deviation.
  • Evaluate level, trend, variability, immediacy, overlap, consistency, and replication visually.
  • State how ties and outcome direction were handled in nonoverlap statistics.
  • Explain segmented-regression coding and report uncertainty and dependence sensitivity.
  • Separate prospective design assumptions from observed effect estimates.
  • Avoid generalizing one participant’s effect to a population without systematic replication.

Exports

References

  • Kratochwill, T. R., et al. (2010). Single-case designs technical documentation. What Works Clearinghouse.
  • Parker, R. I., Vannest, K. J., & Davis, J. L. (2011). Effect size in single-case research: A review of nine nonoverlap techniques. Behavior Modification, 35(4), 303–322.
  • Manolov, R., & Moeyaert, M. (2017). How can single-case data be analyzed? Neuropsychological Rehabilitation, 27(5), 611–638.
Paid version: The download includes all editable R code, the synthetic-data generator, documented outputs, and complete software-version details.