Time series Series with Power BI- Arima Model-Part 10

cover

In this post, I want to explain the ARIM model (Autoregressive Integrated Moving Average).
Exponential smoothing could not consider the relationship between the values in the different time span. while ARIMA able to handle these data.
ARIMA Model needs three variables.

ARIMA(p,d,q)

First, let start with explanation of d value
what is d?
The first step in using ARIMA is to create a stationary time series data. so what is stationary time series?
Stationary time series values fluctuate around one value during the time. for instance, the annual rainfall can be as an example of stationary time series. you could not see any trend in below chart and it fluctuates around value 25. if I calculate the variance of data during the period, it would be zero.
for Arima, we should have a stationary time series like below one. for below chart, the “d” value would be 0 as we do not need to do something about making it stationary.

4

Now, look at the below time series, it is not a stationary time series. In other words: Yt is not the same as Yt-1. Hence, we need do differentiate data more
so we will have Yt=Yt-Yt-1 so if for each t time we have this formula then d=1. if not maybe we need go further that means Yt=(Yt-Yt-1)-(Yt-1-Yt-2)=Yt-2Yt-1+Yt-2 then d=2.

tking

to do this, we have a function that helps named: “diff” . This function gets a time series object plus the number of differentiation. for above example, we do it for d=1

kingArimaDiff<-diff(kingTSObj,kingTSObj=1)
plot.ts(kingArimaDiff)

so the chart will be as

Sostationary

for identify the d parameters, we have to

1- plot the Time series object first

2- if not stationary, then we have to differentiate it to reach a stationary one.

in next post, I will explain the value of p and q which is related to acf and pacf chart.

http://a-little-book-of-r-for-time-series.readthedocs.io/en/latest/src/timeseries.html

 

Leila Etaati on LinkedinLeila Etaati on TwitterLeila Etaati on Youtube
Leila Etaati
Trainer, Consultant, Mentor
Leila is the first Microsoft AI MVP in New Zealand and Australia, She has Ph.D. in Information System from the University Of Auckland. She is the Co-director and data scientist in RADACAD Company with more than 100 clients in around the world. She is the co-organizer of Microsoft Business Intelligence and Power BI Use group (meetup) in Auckland with more than 1200 members, She is the co-organizer of three main conferences in Auckland: SQL Saturday Auckland (2015 till now) with more than 400 registrations, Difinity (2017 till now) with more than 200 registrations and Global AI Bootcamp 2018. She is a Data Scientist, BI Consultant, Trainer, and Speaker. She is a well-known International Speakers to many conferences such as Microsoft ignite, SQL pass, Data Platform Summit, SQL Saturday, Power BI world Tour and so forth in Europe, USA, Asia, Australia, and New Zealand. She has over ten years’ experience working with databases and software systems. She was involved in many large-scale projects for big-sized companies. She also AI and Data Platform Microsoft MVP. Leila is an active Technical Microsoft AI blogger for RADACAD.

Leave a Reply