Design, Monitor, and Analyze Single-Case (N-of-1) Intensive Longitudinal Studies
Overview
Tools for the stages of a single-case (N-of-1) experimental study that come before analysis: generating randomization schedules that can be preregistered and reproduced exactly, under run-length constraints, exporting them for mobile data collection, validating incoming ecological momentary assessment (EMA) records, and monitoring compliance. Designed around the workflow of a 70-day randomized N-of-1 study collected with stock 'iOS' tools at 92.9% compliance; the package ships with that study's complete dataset.
First release.
design_schedule(): exact uniform sampling of balanced, run-constrained randomization schedules by dynamic programming, reproducible from a required seed.check_schedule(): design diagnostics (counts, run lengths, alternations, lag-1 autocorrelation).write_schedule(): JSON export in the format read by the companion mobile collection tools.sim_power(): simulation-based power and false-positive rates under AR(1) errors, analysed with and without the dependence, for both randomized and user-supplied schedules.read_ema(): tidy import of EMA exports (CSV or JSON), with a study-day index derived from the start date and an error when a file's own index disagrees with the calendar.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
validate_ema(): structured integrity checks, including day indices that have drifted out of step with the calendar.compliance(): prompt-level compliance against response windows, with off-window records reported separately.- Vignette running the full lifecycle on the bundled 70-day study.
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK6 OK2026-08-09
Documentation
- Help pages
- 7
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 15
PRs over time
Commits over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/haomeng797-ship-it/nof1kit on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-08 · The repository has a site deploy workflow
pkgdown site last built 2026-09-08
Show all practicesHide 1 practice
Dependencies
Code & Tests
Datasets
People & History
- 0.1.0Latestfirst seen 2026-08-08 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First seen
- 2026-08-08
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 35 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("nof1kit")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.