Dynamic Models with Regime-Switching
Overview
Intensive longitudinal data have become increasingly prevalent in various scientific disciplines. Many such data sets are noisy, multivariate, and multi-subject in nature. The change functions may also be continuous, or continuous but interspersed with periods of discontinuities (i.e., showing regime switches). The package 'dynr' (Dynamic Modeling in R) is an R package that implements a set of computationally efficient algorithms for handling a broad class of linear and nonlinear discrete- and continuous-time models with regime-switching properties under the constraint of linear Gaussian measurement functions. The discrete-time models can generally take on the form of a state-space or difference equation model. The continuous-time models are generally expressed as a set of ordinary or stochastic differential equations. All estimation and computations are performed in C, but users are provided with the option to specify the model of interest via a set of simple and easy-to-learn model specification functions in R. Model fitting can be performed using single-subject time series data or multiple-subject longitudinal data. Ou, Hunter, & Chow (2019) doi:10.32614%2FRJ-2019-012 provided a detailed introduction to the interface and more information on the algorithms.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-02
Show 2 earlier changesHide 2 earlier changes
- ERROR11 OK, 1 ERROR2026-04-25
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 65includes a package overview page
- Examples that run
- 63%19 run in a plain check · 10 never run · 1 hold no code
- Exported functions with examples
- 33%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 15% with a bibliography file
Also includes 14 demo scripts (run with demo())
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 8
- Median days to close, 50 most recently updated closed PRs
- 498
Stars over time
Forks over time
Issues over time
PRs over time
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/mhunter1/dynr on 2026-10-21.
Dependencies
Installing dynr adds 104 packages (60 with compiled code, 82 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.
Code & Tests
Datasets
People & History
Previously maintained by Lu Ou (0.1.7 to 0.1.9-20).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.1.16-114Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.1.16-1052023-11-28 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.1.16-912022-10-17 · diff ↗
- RR 4.2.0 released · 2022-04-22
- unarchivedReturned to CRAN2021-11-18
- 0.1.16-272021-11-18 · diff ↗
- archivedRemoved from CRAN2021-11-05check problems were not corrected in time
- RR 4.1.0 released · 2021-05-18
- unarchivedReturned to CRAN2021-03-16
- 0.1.16-22021-03-16 · diff ↗
- archivedRemoved from CRAN2021-03-07check problems were not corrected in time
- 0.1.15-952021-02-20 · diff ↗
Show 23 earlier eventsHide 23 earlier events
- RR 4.0.0 released · 2020-04-24
- 0.1.15-252020-02-11 · diff ↗
- 0.1.15-1
- unarchivedReturned to CRAN2019-09-13
- 0.1.14-852019-09-13 · diff ↗
- archivedRemoved from CRAN2019-09-08policy violation Leaves a directory in '/tmp', via biber
- RR 3.6.0 released · 2019-04-26
- unarchivedReturned to CRAN2019-04-02
- 0.1.14-92019-04-02 · diff ↗
- archivedRemoved from CRAN2019-03-11policy violation Missing autoconf sources
- 0.1.13-42018-09-24 · diff ↗
- 0.1.13-32018-09-16 · diff ↗
- 0.1.13-22018-09-15 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.1.12-52018-02-08 · diff ↗
- 0.1.11-82017-08-21 · diff ↗
- 0.1.11-22017-06-17 · diff ↗
- 0.1.10-102017-05-21 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.1.9-20
- 0.1.8-172017-01-09 · diff ↗
- 0.1.72016-06-09
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2016-06-09
- Total releases
- 20 / 10 yrs
- License
- GPL-3 OSI · relicensed from Apache License (== 2.0) in 0.1.13-2
- Minimum R
- ≥ 3.0.0
- Bundled data
- 2.1 MB / 14 files
- Download size
- 4.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("dynr")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.