Abstract
With the advent of new data collection technologies, intensive longitudinal data (ILD) are collected more frequently than ever. Along with the increased prevalence of ILD, more methods are being developed to analyze these data. However, relatively few methods have yet been applied for making long- or even short-term predictions from ILD in behavioral settings. Applications of forecasting methods to behavioral ILD are still scant. We first establish a general framework for modeling ILD and then extend that frame to two previously existing forecasting methods: these methods are Kalman prediction and ensemble prediction. After implementing Kalman and ensemble forecasts in free and open-source software, we apply these methods to daily drug and alcohol use data. In doing so, we create a simple, but nonlinear dynamical system model of daily drug and alcohol use and illustrate important differences between the forecasting methods. We further compare the Kalman and ensemble forecasting methods to several simpler forecasts of daily drug and alcohol use. Ensemble forecasts may be more appropriate than Kalman forecasts for nonlinear dynamical systems models, but further forecasting evaluation methods must be put into practice.
Similar content being viewed by others
Change history
13 April 2022
An Erratum to this paper has been published: https://doi.org/10.1007/s11336-022-09862-w
Notes
For example, many psychological time series exhibit “burn-in” or habituation periods where early observations may have different behavior than later observations. Equally weighting early and late observations would produce a worse forecast than a weighting scheme that emphasized the more recent observations (Gregson, 1983).
Under ergodic conditions (i.e., Hannan, 1970, p. 201), time series are appropriate even for single-occasion data from multiple subjects.
Note that to ease readability, we state this equation in its derivative form rather than its differential form. Although this lacks some rigor, we feel it increases clarity.
This result necessarily follows from the linear case (e.g., Brockwell, 1995) because the linear dynamics are a special case of the nonlinear dynamics.
Although the dynamical system we consider may be nonlinear, all of them are stable. Stable systems in discrete time and continuous time show no sensitive dependence on initial conditions (Arrowsmith & Place, 1990, Ch. 3). Instead, these systems have continuous dependence on initial conditions and perturbations (Hirsch et al., 2003, Ch. 17; V. I. Arnold, 1988, Ch. 3–4).
If the standard error of measurement is .707, then an 85% confidence interval would be \(\pm .707 \cdot 1.44 \approx 1.00\) assuming asymptotic normality.
The naive carry-forward forecast method has no necessary forecast error, but we augment it with one by using a random walk, as is common (e.g., Hyndman & Athanasopoulos, 2018, Ch. 3).
References
Allen, P. M., Strathern, M., & Baldwin, J. (2008). Complexity: The integrating framework for models of urban and regional systems. In S. Albeverio, D. Andrey, P. Giordano, & A. Vancheri (Eds.), The dynamics of complex urban systems (pp. 21–41). Physica-Verlag HD. https://doi.org/10.1007/978-3-7908-1937-3_2
Anderson, B. D. O., & Moore, J. B. (1979). Optimal filtering. Prentice-Hall.
Anderson, J. L. (1996). A method for producing and evaluating probabilistic forecasts from ensemble model integrations. Journal of Climate, 9(7), 1518–1530. 10.1175/1520-0442(1996)009\(<\)1518:amfpae\(>\)2.0.co;2
Anderson, J. L. (2001). An ensemble adjustment Kalman filter for data assimilation. Monthly Weather Review, 129(12), 2884–2903. 10.1175/1520-0493(2001)129\(<\)2884:aeakff\(>\)2.0.co;2
Anderson, J. L., & Anderson, S. L. (1999). A Monte Carlo implementation of the nonlinear filtering problem to produce ensemble assimilations and forecasts. Monthly Weather Review, 127(12), 2741–2758. 10.1175/1520-0493(1999)127\(<\)2741:amciot\(>\)2.0.co;2
Arnold, L. (1974). Stochastic differential equations: Theory and applications. John Wiley & Sons.
Arnold, V. I. (1973). Ordinary differential equations. Cambridge, MA: MIT Press. Translated from the Russian by R. A. Silverman.
Arnold, V. I. (1988). Geometrical methods in the theory of ordinary differential equations (2nd ed.). Springer.
Arrowsmith, D. K., & Place, C. M. (1990). An introduction to dynamical systems. Cambridge University Press.
Baltes, P. B., Reese, H. W., & Nesselroade, J. R. (1977). Life-span developmental psychology: Introduction to research methods. Belmont, CA: Wadsworth.
Bar-Shalom, Y., Ti, X. R., & Kirubarajan, T. (2001). Estimation with applications to tracking and navigation (Vol. 45). New York: Wiley. https://doi.org/10.1037/a0014170 (No. 1).
Bates, D., Mächler, M., Bolker, B., & Walker, S. (2015). Fitting linear mixed-effects models using lme4. Journal of Statistical Software, 67(1). https://doi.org/10.18637/jss.v067.i01
Bergmeir, C., & Benítez, J. M. (2012). On the use of cross-validation for time series predictor evaluation. Information Sciences, 191, 192–213. https://doi.org/10.1016/j.ins.2011.12.028
Bergmeir, C., Costantini, M., & Benítez, J. M. (2014). On the usefulness of cross-validation for directional forecast evaluation. Computational Statistics& Data Analysis, 76, 132–143. https://doi.org/10.1016/j.csda.2014.02.001
Bergmeir, C., Hyndman, R. J., & Koo, B. (2018). A note on the validity of cross-validation for evaluating autoregressive time series prediction. Computational Statistics& Data Analysis, 120, 70–83. https://doi.org/10.1016/j.csda.2017.11.003
Boker, S. M., & Laurenceau, J. P. (2006). Dynamical Systems Modeling: An Application to the Regulation of Intimacy and Disclosure in Marriage. In T. A. Walls & J. L. Schafer (Eds.), Models for Intensive Longitudinal Data (pp. 195–218). Oxford University Press. https://doi.org/10.1093/acprof:oso/9780195173444.003.0009
Bornovalova, M. A., Gratz, K. L., Daughters, S. B., Hunt, E. D., & Lejuez, C. (2012). Initial RCT of a distress tolerance treatment for individuals with substance use disorders. Drug and Alcohol Dependence, 122(1–2), 70–76. https://doi.org/10.1016/j.drugalcdep.2011.09.012
Bowen, S., Witkiewitz, K., Clifasefi, S. L., Grow, J., Chawla, N., Hsu, S. H., & Larimer, M. E. (2014). Relative Efficacy of Mindfulness-Based Relapse Prevention, Standard Relapse Prevention, and Treatment as Usual for Substance Use Disorders: A Randomized Clinical Trial. JAMA Psychiatry, 71(5), 547–556. https://doi.org/10.1001/jamapsychiatry.2013.4546
Box, G. E. P., & Jenkins, G. M. (1976). Time series analysis: Forecasting and control (Revised). San Francisco: Holden-Day.
Brockwell, P. J. (1995). A note on the embedding of discrete-time ARMA processes. Journal of Time Series Analysis, 16(5), 451–460. https://doi.org/10.1111/j.1467-9892.1995.tb00246.x
Brookner, E. (1998). Tracking and Kalman filtering made easy. New York: Wiley.
Brooks, H. E. (2004). Tornado warning performance in the past and future: a perspective from signal detection theory. Bulletin of the American Meteorological Society, 85(6), 837–844. https://doi.org/10.1175/bams-85-6-837
Chan, K. S., & Tong, H. (1987). A note on embedding a discrete parameter ARMA model in a continuous parameter ARMA model. Journal of Time Series Analysis, 8(3), 277–281. https://doi.org/10.1111/j.1467-9892.1987.tb00439.x
Coiffier, J. (2011). Fundamentals of numerical weather prediction. Cambridge New York: Cambridge University Press.
Culbertson, D. S., & Sinclair, T. M. (2014). The failure of forecasts in the great recession. Challenge, 57(6), 34–45. https://doi.org/10.2753/0577-5132570603
Cvitanović, P., Artuso, R., Mainieri, R., Tanner, G., & Vattay, G. (2017). Chaos: Classical and quantum. Copenhagen: Niels Bohr Institute. http://ChaosBook.org
de Jong, P. (1988). The likelihood for a state space model. Biometrika, 75(1), 165–169. https://doi.org/10.2307/2336450
Durbin, J. (1997). Monte carlo maximum likelihood estimation for non-Gaussian state space models. Biometrika, 84(3), 669–684. https://doi.org/10.1093/biomet/84.3.669
Durbin, J., & Koopman, S. J. (2000). Time series analysis of non-Gaussian observations based on state space models from both classical and bayesian perspectives. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 62(1), 3–56. https://doi.org/10.1111/1467-9868.00218
Durbin, J., & Koopman, S. J. (2001). Time series analysis by state space methods. Oxford University Press.
Edwards, C. H., & Penney, D. E. (2004). Differential equations and boundary value problems: Computing and modeling (3rd ed.). Upper Saddle River, NJ: Pearson Education.
Epstein, E. S. (1969). Stochastic dynamic prediction. Tellus, 21(6), 739–759. https://doi.org/10.1111/j.2153-3490.1969.tb00483.x
Fredrickson, B. L., & Losada, M. F. (2005). Positive affect and the complex dynamics of human flourishing. American Psychologist, 60(7), 678–686. https://doi.org/10.1037/0003-066x.60.7.678
Friston, K. J., Harrison, L., & Penny, W. (2003). Dynamic causal modelling. NeuroImage, 19(4), 1273–1302. https://doi.org/10.1016/s1053-8119(03)00202-7
Gregson, R. A. M. (1983). Time series in psychology. Hillsdale, NJ: Lawrence Erlbaum.
Hall, P., & Heyde, C. C. (1980). Martingale limit theory and its application. New York: Academic Press.
Hamerle, A., Nagl, W., & Singer, H. (1991). Problems with the estimation of stochastic differential equations using structural equations models. Journal of Mathematical Sociology, 16(3), 201–220.
Hamilton, J. D. (1994). State-space models. In R. F. Engle & D. L. McFadden (Eds.), Handbook of econometrics (Vol. 4, p. 3039-3080). Elsevier. http://www-stat.wharton.upenn.edu/~stine/stat910/
Hannan, E. J. (1970). Multiple time series. New York: Wiley.
Harvey, A. C. (1989). Forecasting, structural time series models and the Kalman filter. Cambridge: Cambridge University Press.
Hastie, T., Tibshirani, R., & Friedman, J. (2009). The elements of statistical learning. Springer.
Havlicek, M., Friston, K. J., Jan, J., Brazdil, M., & Calhoun, V. D. (2011). Dynamic modeling of neuronal responses in fMRI using cubature Kalman filtering. NeuroImage, 56(4), 2109–2128. https://doi.org/10.1016/j.neuroimage.2011.03.005
Hayes, A. M., Laurenceau, J. P., Feldman, G., Strauss, J. L., & Cardaciotto, L. (2007). Change is not always linear: The study of nonlinear and discontinuous patterns of change in psychotherapy. Clinical Psychology Review, 27(6), 715–723. https://doi.org/10.1016/j.cpr.2007.01.008
Haykin, S. O. (2008). Neural networks and learning machines (3rd ed.). Upper Saddle River, NJ: Pearson Education.
He, S. W., & Wang, J. G. (1989). On embedding a discrete-parameter ARMA model in a continuous-parameter ARMA model. Journal of Time Series Analysis, 10(4), 315–323. https://doi.org/10.1111/j.1467-9892.1989.tb00031.x
Helske, J. (2017). KFAS: Exponential family state space models in r. Journal of Statistical Software, 78(10). https://doi.org/10.18637/jss.v078.i10
Hirsch, M. W., & Smale, S. (1974). Differential equations, dynamical systems and bifurcations of vector fields. Academic Press.
Hirsch, M. W., Smale, S., & Devaney, R. (2003). Differential equations, dynamical systems, and an introduction to chaos (2nd ed.). Burlington, MA: Academic Press.
Hufford, M. R., Witkiewitz, K., Shields, A. L., Kodya, S., & Caruso, J. C. (2003). Relapse as a nonlinear dynamic system: Application to patients with alcohol use disorders. Journal of Abnormal Psychology, 112(2), 219–227. https://doi.org/10.1037/0021-843X.112.2.219
Hunter, M. D. (2018). State space modeling in an open source, modular, structural equation modeling environment. Structural Equation Modeling: A Multidisciplinary Journal, 25(2), 307–324. https://doi.org/10.1080/10705511.2017.1369354
Huzii, M. (2007). Embedding a Gaussian discrete-time autoregressive moving average process in a gaussian continuous-time autoregressive moving average process. Journal of Time Series Analysis, 28(4), 498–520. https://doi.org/10.1111/j.1467-9892.2006.00520.x
Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and practice. OTexts.
Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 27(3). https://doi.org/10.18637/jss.v027.i03
Kalman, R. E. (1960). A new approach to linear filtering and prediction problems. Basic Engineering, 82, 35–45. https://doi.org/10.1115/1.3662552
Kalman, R. E. (1963). Mathematical description of linear dynamical systems. Journal of the Society for Industrial and Applied Mathematics. Series A (Control), 1, 152–192.
Kalman, R. E., & Bucy, R. S. (1961). New results in linear filtering and prediction theory. Transactions of the ASME, Series D, Journal of Basic Engineering, 83, 95–108. https://doi.org/10.1115/1.3658902
Katzfuss, M., Stroud, J. R., & Wikle, C. K. (2016). Understanding the ensemble Kalman filter. The American Statistician, 70(4), 350–357. https://doi.org/10.1080/00031305.2016.1141709
Kulikov, G. Y., & Kulikova, M. V. (2014). Accurate numerical implementation of the continuous-discrete extended Kalman filter. IEEE Transactions on Automatic Control, 59(1), 273–279. https://doi.org/10.1109/tac.2013.2272136
Lazo, J. K., Morss, R. E., & Demuth, J. L. (2009). 300 billion served. Bulletin of the American Meteorological Society, 90(6), 785–798. https://doi.org/10.1175/2008bams2604.1
Leith, C. E. (1974). Theoretical skill of Monte Carlo forecasts. Monthly Weather Review, 102(6), 409–418. 10.1175/1520-0493(1974)102\(<\)0409:tsomcf\(>\)2.0.co;2
Li, Y., Ji, L., Oravecz, Z., Brick, T. R., Hunter, M. D., & Chow, S. M. (2019). dynr.mi: An R program for multiple imputation in dynamic modeling. International Journal of Computer, Electrical, Automation, Control and Information Engineering, 13(5), 302–311. http://waset.org/Publicationsp=149
Lipari, R. N., & Van Horn, S. L. (2017). Trends in substance use disorders among adults aged 18 or older. The CBHSQ Report,, 1–10.
Lucas, R. E., Wallsworth, C., Anusic, I., & Donnellan, M. B. (2020). A direct comparison of the day reconstruction method (DRM) and the experience sampling method (ESM). Journal of Personality and Social Psychology. https://doi.org/10.1037/pspp0000289
Maisto, S. A., Hallgren, K. A., Roos, C. R., & Witkiewitz, K. (2018). Course of remission from and relapse to heavy drinking following outpatient treatment of alcohol use disorder. Drug and Alcohol Dependence, 187, 319–326. https://doi.org/10.1016/j.drugalcdep.2018.03.011
Mandelbrot, B. B. (1971). When can price be arbitraged efficiently A limit to the validity of the random walk and martingale models. The Review of Economics and Statistics, 53(3), 225. https://doi.org/10.2307/1937966
McArdle, J. J., & Epstein, D. (1987). Latent growth curves within developmental structural equation models. Child Development, 58, 110–133.
McLellan, A. T., Lewis, D. C., O’Brien, C. P., & Kleber, H. D. (2000). Drug dependence, a chronic medical illness: implications for treatment, insurance, and outcomes evaluation. Journal of the American Medical Association, 284(13), 1689–1695.
Mischel, W. (1968). Personality and assessment. Lawrence Erlbaum.
Molenaar, P. C. M. (1997). Time series analysis and its relationship with longitudinal analysis. International Journal of Sports Medicine, 18(S 3), S232–S237. https://doi.org/10.1055/s-2007-972720
Molenaar, P. C. M. (2004). A manifesto on psychology as idiographic science: Bringing the person back into scientific psychology, this time forever. Measurement, 2, 201–218. https://doi.org/10.1207/s15366359mea0204_1
Neale, M. C., Hunter, M. D., Pritikin, J. N., Zahery, M., Brick, T. R., Kirkpatrick, R. M., & Boker, S. M. (2016). OpenMx 2.0: Extended structural equation and statistical modeling. Psychometrika, 80(2), 535–549. https://doi.org/10.1007/s11336-014-9435-8
Ou, L., Hunter, M. D., & Chow, S. (2019). What’s for dynr: A package for linear and nonlinear dynamic modeling in R. The R Journal, 11(1). https://doi.org/10.32614/RJ-2019-012
Ou, L., Hunter, M. D., Lu, Z., Stifter, C. A., & Chow, S. (under review). Estimation of nonlinear mixed-effects continuous-time models using the continuous-discrete extended Kalman filter.
Oud, J. H. L., & Jansen, R. A. R. G. (2000). Continuous time state space modeling of panel data by means of SEM. Psychometrika, 65(2), 199–215.
Priestley, M., & Subba Rao, T. (1975). The estimation of factor scores and Kalman filtering for discrete parameter stationary processes. International Journal of Control, 21(6), 971–975. https://doi.org/10.1080/00207177508922050
R Development Core Team. (2020). R: A language and environment for statistical computing [Computer software manual]. Vienna, Austria. Retrieved from http://www.R-project.org (ISBN 3-900051-07-0)
Rao, C. R. (2001). Linear statistical inference (2nd ed.). John Wiley & Sons.
Ripberger, J. T., Silva, C. L., Jenkins-Smith, H. C., Carlson, D. E., James, M., & Herron, K. G. (2014). False alarms and missed events: The impact and origins of perceived inaccuracy in tornado warning systems. Risk Analysis, 35(1), 44–56. https://doi.org/10.1111/risa.12262
Robinson, S. M., Sobell, L. C., Sobell, M. B., & Leo, G. I. (2014). Reliability of the timeline followback for cocaine, cannabis, and cigarette use. Psychology of Addictive Behaviors, 28(1), 154–162. https://doi.org/10.1037/a0030992
Schweppe, F. C. (1965). Evaluation of likelihood functions for Gaussian signals. IEEE Transactions on Information Theory, IT–11, 61–70.
Simmons, K. M., & Sutter, D. (2009). False alarms, tornado warnings, and tornado casualties. Weather, Climate, and Society, 1(1), 38–53. https://doi.org/10.1175/2009wcas1005.1
Simons, J. S., Wills, T. A., Emery, N. N., & Marks, R. M. (2015). Quantifying alcohol consumption: Self-report, transdermal assessment, and prediction of dependence symptoms. Addictive Behaviors, 50, 205–212. https://doi.org/10.1016/j.addbeh.2015.06.042
Smale, S. (1961). On gradient dynamical systems. The Annals of Mathematics, 74(1), 199. https://doi.org/10.2307/1970311
Sobell, L. C., Agrawal, S., Annis, H., Ayala-Velazquez, H., Echeverria, L., Leo, G. I., & Ziólkowski, M. (2001). Cross-cultural evaluation of two drinking assessment instruments: Alcohol timeline followback and inventory of drinking situations. Substance Use & Misuse, 36(3), 313–331. https://doi.org/10.1081/ja-100102628
Squire, P. (1988). Why the 1936 Literary Digest poll failed. Public Opinion Quarterly, 52(1), 125. https://doi.org/10.1086/269085
Stephan, K. E., Kasper, L., Harrison, L. M., Daunizeau, J., den Ouden, H. E. M., Breakspear, M., & Friston, K. J. (2008). Nonlinear dynamic causal models for fMRI. NeuroImage, 42(2), 649–662. https://doi.org/10.1016/j.neuroimage.2008.04.262
Substance Abuse and Mental Health Services Administration. (2018). Key substance use and mental health indicators in the United States: Results from the 2017 National Survey on Drug Use and Health (HHS Publication No. SMA 18-5068, NSDUH Series H-53). Rockville, MD: Center for Behavioral Health Statistics and Quality, Substance Abuse and Mental Health Services Administration. [2020-04-16]https://www.samhsa.gov/data/sites/default/files/cbhsq-reports/NSDUHFFR2017/NSDUHFFR2017.pdf
Van Loan, C. (1978). Computing integrals involving the matrix exponential. IEEE Transactions on Automatic Control, 23(3), 395–404. https://doi.org/10.1109/tac.1978.1101743
Warner, T. T. (2014). Numerical weather and climate prediction. Cambridge University Press.
West, M., & Harrison, P. (1997). Bayesian forecasting and dynamic models. New York: Springer.
Witkiewitz, K., & Marlatt, G. A. (2004). Relapse prevention for alcohol and drug problems: That was Zen, this is Tao. American Psychologist, 59(4), 224–235. https://doi.org/10.1037/0003-066X.59.4.224
Author information
Authors and Affiliations
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The work was supported by DA032582 (NIDA).
Rights and permissions
About this article
Cite this article
Hunter, M.D., Fatimah, H. & Bornovalova, M.A. Two Filtering Methods of Forecasting Linear and Nonlinear Dynamics of Intensive Longitudinal Data. Psychometrika 87, 477–505 (2022). https://doi.org/10.1007/s11336-021-09827-5
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11336-021-09827-5