IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v016i01.html
   My bibliography  Save this article

Formulating State Space Models in R with Focus on Longitudinal Regression Models

Author

Listed:
  • Dethlefsen, Claus
  • Lundbye-Christensen, Søren

Abstract

We provide a language for formulating a range of state space models with response densities within the exponential family. The described methodology is implemented in the R-package sspir. A state space model is specified similarly to a generalized linear model in R, and then the time-varying terms are marked in the formula. Special functions for specifying polynomial time trends, harmonic seasonal patterns, unstructured seasonal patterns and time-varying covariates can be used in the formula. The model is fitted to data using iterated extended Kalman filtering, but the formulation of models does not depend on the implemented method of inference. The package is demonstrated on three datasets.

Suggested Citation

  • Dethlefsen, Claus & Lundbye-Christensen, Søren, 2006. "Formulating State Space Models in R with Focus on Longitudinal Regression Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 16(i01).
  • Handle: RePEc:jss:jstsof:v:016:i01
    DOI: http://hdl.handle.net/10.18637/jss.v016.i01
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v016i01/v16i01.pdf
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v016.i01?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. J. Durbin & S. J. Koopman, 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, Royal Statistical Society, vol. 62(1), pages 3-56.
    2. Siem Jan Koopman & Neil Shephard & Jurgen A. Doornik, 1999. "Statistical algorithms for models in state space using SsfPack 2.2," Econometrics Journal, Royal Economic Society, vol. 2(1), pages 107-160.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Dani Gamerman & Thiago Rezende Santos & Glaura C. Franco, 2013. "A Non-Gaussian Family Of State-Space Models With Exact Marginal Likelihood," Journal of Time Series Analysis, Wiley Blackwell, vol. 34(6), pages 625-645, November.
    2. repec:jss:jstsof:41:i04 is not listed on IDEAS
    3. Cabral, Celso Rômulo Barbosa & da-Silva, Cibele Queiroz & Migon, Helio S., 2014. "A dynamic linear model with extended skew-normal for the initial distribution of the state parameter," Computational Statistics & Data Analysis, Elsevier, vol. 74(C), pages 64-80.
    4. Ruiz-Cárdenas, Ramiro & Krainski, Elias T. & Rue, Håvard, 2012. "Direct fitting of dynamic models using integrated nested Laplace approximations — INLA," Computational Statistics & Data Analysis, Elsevier, vol. 56(6), pages 1808-1828.
    5. repec:jss:jstsof:39:i02 is not listed on IDEAS

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Motta, Anderson C. O. & Hotta, Luiz K., 2003. "Exact Maximum Likelihood and Bayesian Estimation of the Stochastic Volatility Model," Brazilian Review of Econometrics, Sociedade Brasileira de Econometria - SBE, vol. 23(2), November.
    2. Koopman, Siem Jan & Jungbacker, Borus & Hol, Eugenie, 2005. "Forecasting daily variability of the S&P 100 stock index using historical, realised and implied volatility measurements," Journal of Empirical Finance, Elsevier, vol. 12(3), pages 445-475, June.
    3. repec:jss:jstsof:16:i01 is not listed on IDEAS
    4. Siem Jan Koopman & Kai Ming Lee, 2009. "Seasonality with trend and cycle interactions in unobserved components models," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 58(4), pages 427-448, September.
    5. Ruiz-Cárdenas, Ramiro & Krainski, Elias T. & Rue, Håvard, 2012. "Direct fitting of dynamic models using integrated nested Laplace approximations — INLA," Computational Statistics & Data Analysis, Elsevier, vol. 56(6), pages 1808-1828.
    6. Siem Jan Koopman & Eugenie Hol Uspensky, 2000. "The Stochastic Volatility in Mean Model," Tinbergen Institute Discussion Papers 00-024/4, Tinbergen Institute.
    7. Carmen Broto & Esther Ruiz, 2004. "Estimation methods for stochastic volatility models: a survey," Journal of Economic Surveys, Wiley Blackwell, vol. 18(5), pages 613-649, December.
    8. DeRossi, G. & Harvey, A., 2006. "Time-Varying Quantiles," Cambridge Working Papers in Economics 0649, Faculty of Economics, University of Cambridge.
    9. Christian Brinch, 2012. "Efficient simulated maximum likelihood estimation through explicitly parameter dependent importance sampling," Computational Statistics, Springer, vol. 27(1), pages 13-28, March.
    10. Eugenie Hol & Siem Jan Koopman, 2002. "Stock Index Volatility Forecasting with High Frequency Data," Tinbergen Institute Discussion Papers 02-068/4, Tinbergen Institute.
    11. Drew Creal & Siem Jan Koopman & Eric Zivot, 2008. "The Effect of the Great Moderation on the U.S. Business Cycle in a Time-varying Multivariate Trend-cycle Model," Tinbergen Institute Discussion Papers 08-069/4, Tinbergen Institute.
    12. Raggi, Davide & Bordignon, Silvano, 2012. "Long memory and nonlinearities in realized volatility: A Markov switching approach," Computational Statistics & Data Analysis, Elsevier, vol. 56(11), pages 3730-3742.
    13. Garnier, Julien & Wilhelmsen, Björn-Roger, 2005. "The natural real interest rate and the output gap in the euro area: a joint estimation," Working Paper Series 546, European Central Bank.
    14. Bowsher, Clive G. & Meeks, Roland, 2008. "The Dynamics of Economic Functions: Modeling and Forecasting the Yield Curve," Journal of the American Statistical Association, American Statistical Association, vol. 103(484), pages 1419-1437.
    15. Tommaso Proietti, 2002. "Some Reflections on Trend-Cycle Decompositions with Correlated Components," Econometrics 0209002, University Library of Munich, Germany.
    16. Harvey, A., 2008. "Dynamic distributions and changing copulas," Cambridge Working Papers in Economics 0839, Faculty of Economics, University of Cambridge.
    17. Maravall, A. & del Rio, A., 2007. "Temporal aggregation, systematic sampling, and the Hodrick-Prescott filter," Computational Statistics & Data Analysis, Elsevier, vol. 52(2), pages 975-998, October.
    18. Siem Jan Koopman & Joao Valle e Azevedo, 2003. "Measuring Synchronisation and Convergence of Business Cycles," Tinbergen Institute Discussion Papers 03-052/4, Tinbergen Institute.
    19. Hautsch, Nikolaus & Yang, Fuyu, 2012. "Bayesian inference in a Stochastic Volatility Nelson–Siegel model," Computational Statistics & Data Analysis, Elsevier, vol. 56(11), pages 3774-3792.
    20. Bidarkota, Prasad V. & Dupoyet, Brice V. & McCulloch, J. Huston, 2009. "Asset pricing with incomplete information and fat tails," Journal of Economic Dynamics and Control, Elsevier, vol. 33(6), pages 1314-1331, June.
    21. Kleijn, R.H. & van Dijk, H.K., 2001. "A Bayesian analysis of the PPP puzzle using an unobserved components model," Econometric Institute Research Papers EI 2001-35, Erasmus University Rotterdam, Erasmus School of Economics (ESE), Econometric Institute.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:016:i01. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.