Timeseries - Analysis
Timeseries - Analysis
Examples
• Sales of a given item increases due to population increase.
• Swim suits sales are high in the summer and low in the winter.
• Economic data is affected by business cycles.
Time Series Model Components
Questions to Ask
Questions to Ask
Load the data from a csv file (or any other place where the
data is stored)
tempToronto <- read.csv("torontoTemperature.csv", header=TRUE)
head(tempToronto)
Additive: Multiplicative:
Beer Production Data: the Airline passengers Data: with
magnitude of the seasonality time the magnitude of the
stays constant over time seasonality increases
(1950s-1980s). (1950s-1970s).
Time Series Model
Time Series Decomposition identifies the trend, seasonality, and
random components of the time series.
Time Series Decomposition in R
TorontoTemptsDecomposed = decompose(TorontoTempts)
plot(TorontoTemptsDecomposed)
#You can also print TorontoTemptsDecomposed for the detailed numbers