TIMESERIES ANALYSIS USING R

上传人:公**** 文档编号:467300410 上传时间:2023-01-03 格式:DOC 页数:19 大小:473.51KB
返回 下载 相关 举报
TIMESERIES ANALYSIS USING R_第1页
第1页 / 共19页
TIMESERIES ANALYSIS USING R_第2页
第2页 / 共19页
TIMESERIES ANALYSIS USING R_第3页
第3页 / 共19页
TIMESERIES ANALYSIS USING R_第4页
第4页 / 共19页
TIMESERIES ANALYSIS USING R_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《TIMESERIES ANALYSIS USING R》由会员分享,可在线阅读,更多相关《TIMESERIES ANALYSIS USING R(19页珍藏版)》请在金锄头文库上搜索。

1、Time Series Analysis Using R by Steve Raper and Chris ChatfieldThis document is a free appendix to the 6th edition ofThe Analysis of Time SeriesBy Chris Chatfield, published in 2004 by Chapman & Hall/CRC in the Texts in Statistical Science series.The examples in this time-series text were mostly car

2、ried out using Minitab and S-Plus (see Chapter 14 and Appendix D). Since the time the book was written, a software package called R has become the software choice of many students and staff and is now used extensively by the academic statistical community for statistical modelling, including time-se

3、ries modelling. R is a free updated version of S-Plus. Of course, many statistical software packages, including SPSS, SAS and Minitab, also contain Time Series Analysis modules which allow the analyst to model time series as they see fit. Microsoft Excel even contains a command within its Data Analy

4、sis add-in to carry out exponential smoothing! However, the R language and environment arguably provide greater depth and flexibility in many situations. Since R is used within a command-line interface, this may impose a steeper learning-curve for the new user, but the range of time series analysis

5、packages available in R, together with its publication-quality graphical capabilities, mean that it is increasingly the favoured package amongst serious time series analysts. We assume the reader is familiar with the basic use of R and indicate how to extend this to time-series analysis. The key ext

6、ension is that the time-series commands act on data called a ts object which are not just a set of numbers but have an order and a position in a cycle. For example, if the series is monthly, we may know that a particular observation is say the value in the 4th month of the second year.What is R?R is

7、 an open-source (i.e. free!) statistical software package, maintained by the user community themselves. It is distributed by CRAN (Comprehensive R Archive Network) and is available for download for Linux, MACOS X and Windows from the CRAN web-site at http:/cran.r-project.org. R uses the S language a

8、nd environment, developed at Bell Laboratories (now Lucent Technologies) by John Chambers and colleagues, and much of the code written for S can run under R.Resources in R for Time Series AnalysisA lot of resources for time series analysis are available to the R community including: several useful i

9、ndividual functions (such as plotting the sample autocorrelation and sample partial autocorrelation functions, fitting an ARIMA Model etc. for regularly spaced time series) included with the base R infrastructure additional packages for more extensive time series analysis, and for state-space models

10、 and spectral analysis time series datasets available directly in base R and in other time series packages books, on-line tutorials, and other on-line resources Time-series functions available in the base R packageSeveral commonly-used analysis tools for time series are available within the base R p

11、ackage, including (amongst others):acfproduces the sample autocorrelation function. User can specify maximum lags, or a vector of required lags. Can also produce sample autocovariance function and sample partial autocorrelation function. pacfas acf above, but produces just the sample partial autocor

12、relation functionarimafits a SARIMA model of order (p,d,q)x(P,D,Q), with period s. Method can be chosen from:MLMaximum LikelihoodCSSMinimising conditional sum of squaresCSS-MLUsing conditional sum of squares to find starting values, then maximum likelihood to fit the modelpredictpredicts n steps ahe

13、ad, from any fitted model, including a time series fitted using the command arima (see above)arima.simsimulates an ARIMA model of stated length of the order (p,d,q), with innovations having a stated variancetsdiagproduces 3 standard diagnostic charts for a fitted ARIMA model: plot of residuals from

14、the model sample autocorrelation function of the residuals from the fitted model Ljung-Box portmanteau statistic for stated maximum number of lags.spectrumproduces a spectral density using one of two methods: periodogram using Fast Fourier transforms, optionally smoothed with Daniell Smoothers to be

15、 specified autoregressive fits an AR model, and computes the spectral density of the fitted model.Alternatively, the command spec.prgrm can be used.Time series packages in RIn addition to the functions in base R, several time series analysis packages are available for specialised models, including:z

16、ooinfrastructure for both regularly- and irregularly-spaced time seriestseriescontains many specialised time series functions e.g. GARCH (Generalised AutoRegressive Conditional Heteroscedastic) model fittingctscontinuous-time AutoRegressive modelsdseDynamic Systems Estimation tools for multivariate, time-invariant models including state-space representations

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号