scdbayes: Bayesian single-case design and meta-analysis

Demo: small data only (up to 15 cases, 1,000 rows); no identifiable data. Run locally for full analyses.
scdbayes Logo

Bayesian multilevel modeling for single-case experimental designs using brms and Stan. Fit piecewise regression models with random effects, compute posterior-based effect sizes, and assess consistency of effects across cases. Supports AB, reversal (ABAB), multiple baseline, multiple probe, alternating treatment, and changing criterion designs. Handles two- to four-level hierarchical structures for single-study and meta-analytic datasets.

Installation

The development version from GitHub with:

install.packages("devtools")
devtools::install_github("mshin77/scdbayes")

Load the scdbayes Package

library(scdbayes)

Alternatively, Launch and Browse the Shiny App

Access the web app at https://www.scdbayes.org.

Launch and browse the app on the local computer:

run_app()

Getting Started

See the Single-Case Design, Meta-Analysis, and Power Analysis articles.

Citation

Features

Available in Both Local & Web

  • AB, reversal, multiple baseline and probe designs
  • Alternating treatment and changing criterion designs
  • CSV/Excel upload with column detection
  • Visual analysis, effect sizes, and WWC screening
  • Piecewise models for continuous, count, binary, and ordinal outcomes
  • Random effects, AR(1), and custom priors
  • Posterior decisions per term and per case
  • Diagnostics, predictive checks, and LOO comparison
  • Bayesian meta-analysis and BC-SMD
  • Bayesian power simulation
  • Export: R script, data, effect sizes, reports
  • Ask AI via Gemini

Local R Package Only

  • Data beyond 15 cases or 1,000 rows
  • Ask AI via OpenAI, Anthropic, or a local model

Data Format

One row per session, with these columns.

Column Type Description
case text/numeric Case identifier
time numeric Session number
phase text Condition (A, B, …)
outcome numeric Measured behavior
study text Study (optional; meta-analysis)
moderators text/numeric Optional covariates
  • Phase labels: A, B, M, or B1, B2, B3
  • Reversal phases are numbered automatically
  • Names like “participant” or “session” are detected

Quick Start

  1. Data: upload a CSV/Excel file or pick an example.
  2. Review: check the table, plots, and WWC Check.
  3. Model: confirm the design, terms, and priors.
  4. Fit: click Fit (about 1-15 minutes).
  5. Results: read diagnostics, decisions, and per-case effects.
  6. Export: download R code, data, effect sizes, and reports.

Ask AI and Co-design priors (AI) are optional and advisory. Pick Local model or a cloud provider in each window. Context sharing is off by default.

Input Validation

  • Uploads: .csv, .xlsx, .xls only, size-capped
  • Formulas and hypotheses: allowlist-checked

API Key Security

  • Masked input, session only, never saved or logged
  • Shared Gemini key: hourly and daily request limits

Network Security

  • HTTPS with HSTS and security headers

Data Protection

  • AI audit log: in session, exported by the user
  • Restricted-use data: keep context sharing off or run locally

Infrastructure

  • Docker + Caddy deployment
  • Firewall, key-only SSH, security updates

Privacy

  • Ask AI sits beside the analysis and guides each step during the session
  • Context sharing is off by default; shared context has no data rows, and variable names are replaced
  • Uploads, AI chat, and API keys are removed when the session ends; model files stay only in temporary server storage
  • De-identified usage, never data, supports research on analysis practice. Opt out of usage tracking.

Documentation

Applications

  • R Package (full features): devtools::install_github("mshin77/scdbayes")
  • Web App (demo, small data): scdbayes.org

Support

Author

Mikyung Shin, Ph.D.
Assistant Professor, Department of Special Education
Illinois State University

Contact

Upload a file or select an Example Dataset to get started

Upload a file or select an Example Dataset to view variables

Continuous Variables

Categorical Variables

Upload a file or select an Example Dataset to view features

Case-Level Features

Key Feature Distributions

Upload a file or select an Example Dataset to view plots

Upload a file or select an Example Dataset to view within-phase patterns

Upload a file or select an Example Dataset to view baseline trend tests

Trend NAP compares the last three baseline points with earlier ones. NAP > 0.85 flags an already improving baseline.

Upload a file or select an Example Dataset to screen the design against the WWC 5.0 standards

WWC Screening

Experiments

Phases per Tier

Baseline Trend (risk of bias)

Reversibility (risk of bias)

Findings that meet standards proceed to effect sizes (BC-SMD, LRR, NAP/Tau) in Meta-Analysis > Export.

Upload a file or select an Example Dataset to view between-phase effect sizes

Descriptive (non-model) summaries supporting visual analysis: select metrics for between-phase comparison
The baseline-to-last-subphase contrast is the main summary; adjacent-subphase nonoverlap is expected by design.
LRR needs a ratio-scale outcome with a true zero. Prefer NAP, Tau, or LRR over PND, PEM, and PAND.

Immediacy of Effect

Mean of the last 3 points before each phase change versus the first 3 after it. Positive values favor the intervention.

Reversibility

NAP of the initial baseline against each later baseline. NAP <= .85 means the behavior returned, so reversibility is met.

Percentage of Conforming Data

Share of criterion-phase points inside the acceptable range around each criterion level. The range width scales with p.

Upload data to view the processed model variables (phase-centered time, level dummies, slope-change predictors).

Model variables: time ( time_A ), level change ( level_AB ), and slope change ( trend_AB ).

Load data and click Fit Model to export results

Set inputs and click Run simulation.


This tool records de-identified clicks, not data, to study analysis practice. No uploaded data or personal information is collected.