welcome to the co u rse
play

Welcome to the co u rse ! TIME SE R IE S AN ALYSIS IN R Da v id S - PowerPoint PPT Presentation

Welcome to the co u rse ! TIME SE R IE S AN ALYSIS IN R Da v id S . Ma eson Associate Professor at Cornell Uni v ersit y Introd u ction Time Series : A seq u ence of data in chronological order . Data is commonl y recorded seq u entiall y, o


  1. Welcome to the co u rse ! TIME SE R IE S AN ALYSIS IN R Da v id S . Ma � eson Associate Professor at Cornell Uni v ersit y

  2. Introd u ction Time Series : A seq u ence of data in chronological order . Data is commonl y recorded seq u entiall y, o v er time . Time series data is e v er yw here . TIME SERIES ANALYSIS IN R

  3. Time series e x ample Monthl y v al u es of the Cons u mer Price Inde x ( CPI ): TIME SERIES ANALYSIS IN R

  4. Time series data Time series data is dated or time stamped in R . print(BMW_data) ... 1996-07-08 0.002 1996-07-09 -0.006 1996-07-10 -0.016 1996-07-11 -0.020 1996-07-14 -0.006 1996-07-15 -0.014 1996-07-16 0.002 1996-07-17 -0.001 ... TIME SERIES ANALYSIS IN R

  5. Time series plots plot(Time_Series) TIME SERIES ANALYSIS IN R

  6. Basic time series models White Noise ( WN ) Random Walk ( RW ) A u toregression ( AR ) Simple Mo v ing A v erage ( MA ) 1 Thro u gho u t this co u rse , y o u w ill not onl y be learning ho w to u se R for time series anal y sis and forecasting , y o u w ill also learn se v eral models for time TIME SERIES ANALYSIS IN R

  7. Time series plots TIME SE R IE S AN ALYSIS IN R

  8. Sampling freq u enc y TIME SE R IE S AN ALYSIS IN R Da v id S . Ma � eson Associate Professor at Cornell Uni v ersit y

  9. Sampling freq u enc y: e x act Some time series data is e x actl y e v enl y spaced . TIME SERIES ANALYSIS IN R

  10. Sampling freq u enc y: appro x imate Some time series data is onl y appro x imatel y e v enl y spaced . TIME SERIES ANALYSIS IN R

  11. Sampling freq u enc y: missing v al u es Some time series data is e v enl y spaced , b u t w ith missing v al u es . TIME SERIES ANALYSIS IN R

  12. Basic ass u mptions Simplif y ing ass u mptions for time series : Consec u ti v e obser v ations are eq u all y spaced . Appl y a discrete - time obser v ation inde x. This ma y onl y hold appro x imatel y. E x. Dail y log ret u rns on stock ma y onl y be a v ailable for w eekda y s . E x. Monthl y CPI v al u es are eq u all y spaced b y month , not b y da y s . TIME SERIES ANALYSIS IN R

  13. Sampling freq u enc y: R f u nctions R f u nctions : start() , frequency(Hourly_series) end() , frequency() , deltat() 24 start(Hourly_series) deltat(Hourly_series) 1 1 0.0417 end(Hourly_series) 1 24 TIME SERIES ANALYSIS IN R

  14. Let ' s practice ! TIME SE R IE S AN ALYSIS IN R

  15. Basic time series objects TIME SE R IE S AN ALYSIS IN R Da v id S . Ma � eson Associate Professor at Cornell Uni v ersit y

  16. B u ilding ts () objects - I time_series <- ts(data_vector) Start w ith a v ector of data plot(time_series) Appl y the ts() f u nction data_vector 10 6 11 8 10 3 6 9 TIME SERIES ANALYSIS IN R

  17. B u ilding ts () objects - II Specif y the start date and obser v ation freq u enc y: time_series <- ts(data_vector, start = 2001, frequency = plot(time_series) TIME SERIES ANALYSIS IN R

  18. Using is . ts () The is.ts() f u nction checks w hether an object is of the ts() class : is.ts(data_vector) FALSE is.ts(time_series) TRUE TIME SERIES ANALYSIS IN R

  19. Wh y ts () objects ? Wh y create and u se time series objects of the ts () class ? Impro v ed plo � ing . Access to time inde x information . Model estimation and forecasting ( later chapters ). TIME SERIES ANALYSIS IN R

  20. Let ' s practice ! TIME SE R IE S AN ALYSIS IN R

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend