Abstract
This chapter presents various modeling options for trajectories and time series. The first part covers hidden Markov models where the aim is to find latent states between which a participant can switch back and forth during an experimental task. Extended modeling options in terms of including covariates are presented as well. The second part introduces time series analysis. The main focus is on a parametric model class called ARIMA, representing a flexible regression framework for time series able to handle autocorrelated residuals. As a special ARIMA flavor, intervention analysis is presented which allows researchers to study whether a critical event had an impact on the series or not. The third part covers functional data analysis, applicable to data settings where each individual produces its own trajectory, subject to smoothing. In addition to functional regression modeling, a functional version of principal component analysis is presented.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
We omit any positive feelings here since this is simply not realistic.
- 2.
See https://implicit.harvard.edu/; data are publicly available on https://osf.io/y9hiq/.
- 3.
The SMA function in TTR (Ulrich, 2017) can be used for decomposition nonseasonal data.
- 4.
Instead of decompose the stl function can be used which provides additional decomposition options.
- 5.
For simplicity in notation, let us ignore for the moment that we differenced the time series and write y t instead of yt′.
- 6.
Note that the first value in the correlogram is the lag-0 correlation which is of course 1 and can be ignored.
- 7.
Note the similarity of this equation to the classical true score model in the first chapter.
- 8.
A simplified version of this plot can be produced via summary( fpca) .
References
Bornstein, A. M., & Daw, N. D. (2012). Dissociating hippocampal and striatal contributions to sequential prediction learning. European Journal of Neuroscience, 35, 1011–1023.
Box, G. E. P., & Tiao, G. (1975). Intervention analysis with applications to economic and environmental problems. Journal of the American Statistical Association, 70, 70–79.
Burns, D. M., Houpt, J. W., Townsend, J. T., & Endres, M. J. (2013). Functional principal components analysis of workload capacity functions. Behavior Research Methods, 45(4), 1–18.
Cowpertwait, P. S. P., & Metcalfe, A. V. (2009). Introductory time series with R. New York: Springer.
Cryer, J. D., & Chan, K. S. (2008). Time series analysis with applications in R (2nd ed.). New York: Springer.
Cuesta-Albertos, J. A., & Febrero-Bande, M. (2010). A simple multiway anova for functional data. Test, 19, 537–557.
Epskamp, S., Cramer, A. O. J., Waldorp, L. J., Schmittmann, V. D., & Borsboom, D. (2012). qgraph: Network visualizations of relationships in psychometric data. Journal of Statistical Software, 48(4), 1–18. http://www.jstatsoft.org/v48/i04/
Febrero-Bande, M., & de la Fuente, M. (2012). Statistical computing in functional data analysis: The R package fda.usc. Journal of Statistical Software, 51(4), 1–28. https://www.jstatsoft.org/v051/i04
Goldsmith, J., Scheipl, F., Huang, L., Wrobel, J., Gellar, J., Harezlak, J., McLean, M. W., Swihart, B., Xiao, L., Crainiceanu, C., & Reiss, P. T. (2016). refund: Regression with functional data. R package version 0.1-16. https://CRAN.R-project.org/package=refund
Greenwald, A. G., & Banaji, M. R. (1995). Implicit social cognition: Attitudes, self-esteem, and stereotypes. Psychological Review, 102, 4–27.
Greenwald, A. G., McGhee, D. E., & Schwartz, J. K. L. (1998). Measuring individual differences in implicit cognition: The implicit association test. Journal of Personality and Social Psychology, 74, 1464–1480.
Greenwald, A. G., Nosek, B. A., & Banaji, M. R. (2003). Understanding and using the implicit association test: I. An improved scoring algorithm. Journal of Personality and Social Psychology, 85, 197–216.
Greven, S., & Scheipl, F. (2017). A general framework for functional regression modelling. Statistical Modelling, 17, 1–35.
Griffiths, T. L., Steyvers, M., & Firl, A. (2007). Google and the mind: Predicting fluency with PageRank. Psychological Science, 18, 1069–1076.
Hyndman, R. J., & Athanasopoulos, G. (2014). Forecasting: Principles and practice. Melbourne: OTexts. http://www.otexts.org
Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 26(3), 1–22. http://www.jstatsoft.org/article/view/v027i03
Jebb, A. T., Tay, L., Wang, W., & Huang, Q. (2015). Time series analysis for psychological research: Examining and forecasting change. Frontiers in Psychology, 6(727), 1–24. http://journal.frontiersin.org/article/10.3389/fpsyg.2015.00727
Kokoszka, P., & Reimherr, M. (2017). Introduction to functional data analysis. Boca Raton: CRC Press.
Levitin, D. J., Nuzzo, R. L., Wines, B. W., & Ramsay, J. O. (2007). Introduction to functional data analysis. Canadian Psychology, 48, 135–155.
Long, J. D. (2011). Longitudinal data analysis for the behavioral sciences using R. Thousand Oaks: SAGE Publishing.
McLean, M. W., Hooker, G., Staicu, A. M., Scheipl, F., & Ruppert, D. (2014). Functional generalized additive models. Journal of Computational and Graphical Statistics, 23, 249–269.
Mirman, D. (2014). Growth curve analysis and visualization using R. Boca Raton: Chapman & Hall/CRC.
Nosek, B. A., Banaji, M. R., & Greenwald, A. G. (2002). Harvesting implicit group attitudes and beliefs from a demonstration web site. Group Dynamics: Theory, Research, and Practice, 6, 101–115.
Petris, G., & Petrone, S. (2011). State space models in R. Journal of Statistical Software, 41(4), 1–25. https://www.jstatsoft.org/v041/i04
Pfaff, B. (2008). VAR, SVAR and SVEC models: Implementation within R package vars. Journal of Statistical Software, 27(4), 1–32. https://www.jstatsoft.org/article/view/v027i04
Ramsay, J. O., & Silverman, B. W. (2002). Applied functional data analysis: Methods and case studies. New York: Springer.
Ramsay, J. O., & Silverman, B. W. (2005). Functional data analysis (2nd ed.). New York: Springer.
Ramsay, J. O., Hooker, G., & Graves, S. (2009). Functional data analysis with R and MATLAB. New York: Springer.
Scheipl, F., Staicu, A. M., & Greven, S. (2015). Functional additive mixed models. Journal of Computational and Graphical Statistics, 24, 477–501.
Spedicato, G. A. (2017). markovchain: Easy handling of discrete time Markov chains. R package version 0.6.8.1.
Trapletti, A., & Hornik, K. (2017). tseries: Time series analysis and computational finance. R package version 0.10–42. https://CRAN.R-project.org/package=tseries
Ulrich, J. (2017). TTR: Technical trading rules. R package version 0.23–2. https://CRAN.R-project.org/package=TTR
Vines, B. W., Krumhansl, C. L., Wanderley, M. M., & Levitin, D. J. (2006). Cross-modal interactions in the perception of musical performance. Cognition, 101, 80–113.
Visser, I. (2011). Seven things to remember about hidden Markov models: A tutorial on Markovian models for time series. Journal of Mathematical Psychology, 55, 403–415.
Visser, I., & Speekenbrink, M. (2010). depmixS4: An R package for hidden Markov models. Journal of Statistical Software, 36(7), 1–21. http://www.jstatsoft.org/v36/i07/
Wickens, T. D. (1982). Models for behavior: Stochastic processes in psychology. San Francisco: W.H. Freeman and Co.
Zeileis, A., & Hothorn, T. (2002). Diagnostic checking in regression relationships. R News, 2(3), 7–10. https://CRAN.R-project.org/doc/Rnews/
Zeileis, A., Leisch, F., Hornik, K., & Kleiber, C. (2002). strucchange: An R package for testing for structural change in linear regression models. Journal of Statistical Software, 7(2), 1–38. http://www.jstatsoft.org/v07/i02/
Zhang, J. T. (2014). Analysis of variance for functional data. Boca Raton: CRC Press.
Zucchini, W., MacDonald, I. L., & Langrock, R. (2016). Hidden Markov models for time series: An introduction using R (2nd ed.). Boca Raton: Chapman & Hall/CRC.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this chapter
Cite this chapter
Mair, P. (2018). Modeling Trajectories and Time Series. In: Modern Psychometrics with R. Use R!. Springer, Cham. https://doi.org/10.1007/978-3-319-93177-7_13
Download citation
DOI: https://doi.org/10.1007/978-3-319-93177-7_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-93175-3
Online ISBN: 978-3-319-93177-7
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)