Welcome!

IBM Cloud Authors: Yeshim Deniz, Elizabeth White, Pat Romanski, Liz McMillan, Stefan Bernbo

Blog Feed Post

Learning Time Series with R

by Joseph Rickert Late last Saturday afternoon I was reading in my usual spot at the Dana Street Coffee House in Mt. View. A stranger walking by my table noticed my copy of Madsen’s Time Series Analysis (sitting there untouched again) said he needed to learn something about time series and asked if I could recommend a book. He looked serious so I asked him if he knew any R. To my delight the guy replied: “Of course,... I learned some R for my Ph.D.”. I suggested Cowpertwait’s Introductory Time series with R. The fellow pulled out his smartphone and bought a copy right then and there. As he left, the stranger said: “God I love this coffee shop”. Yes. I love the place too: funky Dana Street for sure, but I mean the whole Bay Area: R people are everywhere. Anyway, because this was the second time in less than a week that someone asked me about time series, I thought it would be useful to collect some information on how one might go about learning time series with R. This is by no means a comprehensive survey. I have just gathered some low hanging fruit and listed a few books that have been helpful to me. First off: Why R? Well, attempting to learn time series without good computational tools would be madness, and unless you are already a SAS, Stata or even a MatLab expert there would be little reason to even consider these systems. The three of them together can’t match the scope and depth of the time series tools listed in R’s Time Series Task View. Like all R task views, this one organizes the libraries of available R functions by topic and is the place to start if you what you are looking for. Otherwise, learning time series comes down to matching you learning style and experience with the available R resources. If you are a book person looking for a general introduction to R that has some time series material, then I would suggest Paul Teetor’s R Cookbook. Chapter 14 is very good. It begins by making the case for using zoo and time series object and then moves briskly showing how to manipulate time series and the basics of AIRMA models. If you are looking for a first book devoted entirely to time series then in addition to Cowperwait you might want to look at Time Series Analysis with Applications in R by Jonathan D. Cryer and Kung-Sik Chan. Cowperwait covers more ground: in addition to the basics he has chapters on non-stationary series, long memory processes, spectral analysis, multivariate models and state space models in less than 250 pages. Cryer and Chan take things a little slower but they still cover ARIMA models, ARCH and GARCH models, regression models and spectral analysis. The TSA package that goes with the book is also helpful. If you are looking for one book that will see you through graduate school then I don’t think you can do better than the new R friendly edition of Shumway and Stoffer’s Time Series Analysis and Its Applications with R Examples. Previous editions of this book have reached the stature of having defined time series for a generation of students. If you are interested in time series for Finance then a good place to start would be David Ruppert’s book Statistics and Data Analysis for Financial Engineering. This book has several very nice chapters on ARIMA, GARCH and regression models and even has a discussion on fitting ARMA models with Bayesian techniques.  Also, anyone interested in time series for Finance would find the ebooks on the RMetrics site are a valuable resource. If forecasting is your focus, then  Forecasting: principles and practice by Rob Hyndman and George Athanasopoulos is online and free. This book would be a good deal at full hardback prices, and it is very generous of the authors to promise to keep the online version free even after a print version becomes available on Amazon. Hyndman and Athanasopoulos are focused on basic principles and forecast accuracy, recommending simple tools when they are right for the job.The following illustrates the kind of big picture context setting knowledge that is not often explicitly mentioned by other authors: It is a com­mon myth that ARIMA mod­els are more gen­eral than expo­nen­tial smooth­ing. While lin­ear expo­nen­tial smooth­ing mod­els are all spe­cial cases of ARIMA mod­els, the non-linear expo­nen­tial smooth­ing mod­els have no equiv­a­lent ARIMA coun­ter­parts. ... There is a considerable amount of time series tutorial material online that is worth a look. If you only have a few minutes then the Quick R page Time Series and Forecasting might get you off to a good start. Coghlan’s A Little Book of R For Time Series and the Time Series Tutorial with R Part I from Zucchini and Nenadic both provide accessible elementary presentations covering seasonal decomposition and forecasting with ARIMA models. The paper by  McLeod, Yu, and Mahdi, Time Series Analysis with R, provides an overview of time series topics at a more demanding level of mathematical sophistication. For example, there is a section on stochastic differential equations. The paper contains an extensive bibliography and many links to further reading. At the risk at oversimplyfing things, here are a just few lines of R code that take you from fetching real data to automatically fitting an ARIMA model.  library(xts) library(forecast) # Fetch IBM stock data from Yahoo Finance # Go to http://finance.yahoo.com/q/hp?s=IBM+Historical+Prices and copy the link to the table url <- "http:>

Read the original blog entry...

More Stories By David Smith

David Smith is Vice President of Marketing and Community at Revolution Analytics. He has a long history with the R and statistics communities. After graduating with a degree in Statistics from the University of Adelaide, South Australia, he spent four years researching statistical methodology at Lancaster University in the United Kingdom, where he also developed a number of packages for the S-PLUS statistical modeling environment. He continued his association with S-PLUS at Insightful (now TIBCO Spotfire) overseeing the product management of S-PLUS and other statistical and data mining products.<

David smith is the co-author (with Bill Venables) of the popular tutorial manual, An Introduction to R, and one of the originating developers of the ESS: Emacs Speaks Statistics project. Today, he leads marketing for REvolution R, supports R communities worldwide, and is responsible for the Revolutions blog. Prior to joining Revolution Analytics, he served as vice president of product management at Zynchros, Inc. Follow him on twitter at @RevoDavid

IoT & Smart Cities Stories
@DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time t...
CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
Disruption, Innovation, Artificial Intelligence and Machine Learning, Leadership and Management hear these words all day every day... lofty goals but how do we make it real? Add to that, that simply put, people don't like change. But what if we could implement and utilize these enterprise tools in a fast and "Non-Disruptive" way, enabling us to glean insights about our business, identify and reduce exposure, risk and liability, and secure business continuity?
In this Women in Technology Power Panel at 15th Cloud Expo, moderated by Anne Plese, Senior Consultant, Cloud Product Marketing at Verizon Enterprise, Esmeralda Swartz, CMO at MetraTech; Evelyn de Souza, Data Privacy and Compliance Strategy Leader at Cisco Systems; Seema Jethani, Director of Product Management at Basho Technologies; Victoria Livschitz, CEO of Qubell Inc.; Anne Hungate, Senior Director of Software Quality at DIRECTV, discussed what path they took to find their spot within the tec...
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
DXWorldEXPO LLC announced today that Telecom Reseller has been named "Media Sponsor" of CloudEXPO | DXWorldEXPO 2018 New York, which will take place on November 11-13, 2018 in New York City, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.