[Paper Review] ctsmr - Continuous Time Stochastic Modeling in R
The ctsmr R package provides a general framework for identifying and estimating continuous-discrete time gray-box models using stochastic differential equations (SDEs) and maximum likelihood estimation via Kalman filtering. It enables flexible, physically interpretable modeling of dynamical systems with irregularly sampled data, and demonstrates accurate parameter recovery in simulation examples including pharmacokinetic and thermal systems.
ctsmr is an R package providing a general framework for identifying and estimating partially observed continuous-discrete time gray-box models. The estimation is based on maximum likelihood principles and Kalman filtering efficiently implemented in Fortran. This paper briefly demonstrates how to construct a Continuous Time Stochastic Model using multivariate time series data, and how to estimate the embedded parameters. The setup provides a unique framework for statistical modeling of physical phenomena, and the approach is often called grey box modeling. Finally three examples are provided to demonstrate the capabilities of ctsmr.
Motivation & Objective
- To develop a flexible, general-purpose R package for continuous-time stochastic modeling of physical systems with partial state observation.
- To integrate physical knowledge into statistical models through a gray-box framework that combines SDEs with discrete-time measurements.
- To enable efficient parameter estimation and model validation using maximum likelihood and Kalman filtering techniques.
- To support irregularly spaced time series data and nonlinear, nonstationary, or time-varying systems.
- To provide tools for model identification, confidence interval estimation, and model selection using AIC, BIC, and profile likelihood.
Proposed method
- Formulates a continuous-discrete time state space model using Itô stochastic differential equations (SDEs) for the system dynamics.
- Employs discrete-time measurement equations to relate observed outputs to unobserved states, with additive Gaussian measurement noise.
- Uses the Extended Kalman Filter (EKF) to efficiently compute the log-likelihood function for parameter estimation.
- Applies maximum likelihood estimation (MLE) to infer unknown parameters, including drift, diffusion, and measurement noise terms.
- Implements parameter estimation with initial values and bounds, and supports profile likelihood for confidence interval computation.
- Uses Fortran-optimized Kalman filtering for computational efficiency and scalability in multivariate settings.
Experimental results
Research questions
- RQ1How can continuous-time stochastic models be efficiently estimated from irregularly spaced multivariate time series data?
- RQ2To what extent can physical system knowledge be integrated into statistical models while allowing for unknown parameters and process noise?
- RQ3How accurate are parameter estimates obtained via maximum likelihood and EKF in nonlinear SDE-based models with partial state observation?
- RQ4How do Wald confidence intervals compare to profile likelihood intervals in terms of coverage and accuracy for SDE parameters?
- RQ5Can the ctsmr framework effectively identify and correct model deficiencies through parameter tracking and uncertainty quantification?
Key findings
- The ctsmr package successfully estimates parameters in a pharmacokinetic model with true values of $k_a = 0.025$, $k_e = 0.08$, and $σ_1 = 2$, yielding estimates of $0.0249$, $0.0795$, and $1.711$ respectively, with 95% confidence intervals covering the true values.
- Profile likelihood curves for parameters closely match the Wald approximation, indicating reliable standard errors and good coverage for the confidence intervals.
- When diffusion is added to all states, the Wald approximation deviates significantly from the profile likelihood, highlighting limitations of second-order approximations under model complexity.
- The model accurately recovers initial state values: $x_{10} = 34.492$ (true: 40), $x_{20} = 36.799$ (true: 35), $x_{30} = 10.624$ (true: 11), with confidence intervals that include the true values.
- The framework supports efficient, parallelized estimation using Fortran-optimized Kalman filtering, enabling fast computation on multivariate and nonlinear systems.
- The package enables model validation and identification through likelihood-based criteria such as AIC, BIC, and profile likelihood, supporting robust statistical inference.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.