Tutorial by Examples

data(AirPassengers) class(AirPassengers) 1 "ts" In the spirit of Exploratory Data Analysis (EDA) a good first step is to look at a plot of your time-series data: plot(AirPassengers) # plot the raw data abline(reg=lm(AirPassengers~time(AirPassengers))) # fit a trend line For...
Time series data can be stored as a ts object. ts objects contain information about seasonal frequency that is used by ARIMA functions. It also allows for calling of elements in the series by date using the window command. #Create a dummy dataset of 100 observations x <- rnorm(100) #Convert ...

Page 1 of 1