Time Series Practical Session Part- 1

SAS Analytics Time Series - Case Study & Practical Session
9 minutes
Share the link to this page
Copied
  Completed

Transcript

In our last video we had discussed about the case study and the data set that we will be using to do time series analysis in SAS software. Our data set is related to an airline data of Jet Airways company which consists of two variables that is date and passengers. It consists of the number of passengers that has traveled through Jet Airways from January 1914 in December 1960. So we will be predicting how many passengers will travel for the coming 12 months through Jet Airways so at first we have to bring the data set in SAS environment. For that we have to execute the live name statement. So let's execute the live name statement first.

Live name. I'm giving the library name as smiley one we can give any library name then you Up to the pack containing the data sets. This is the path which contains the data set. Let me copy the path close the double quotes semicolon non execute the live name statement. So see these data sets I got the data set that I'm going to work with is time series underscore Erlang. It consists of two variables as I told you all that is data and passengers.

That is the passengers that has traveled through the airline company which is Jet Airways from the month June 1949 till December 1960, and our objective is to predict for the coming 12 months. So for that now let's start with the practical session in this video. We would be first checking for stationarity of the data. For that we are using the procedure called proc g plot. Data equals that running is mighty Khan dot MCs underscore a lane that is the name of main data set. Then we are going to do to check the statement stationarity.

We are doing a scatter plot of the variables between two evils that is passengers and date. Passengers we are doing a scatterplot between passengers and D. So, I'm using this asterisk operator you The two variables then run a little bit let's execute this code. So, see, the data is very much non stationary in nature because see the meaning readings quote are not constant. So we know stationary data is data when mean invariant is constant here mean and variance none of them are constant. So it's a non stationary data so we have to convert it to stationarity. Do the forecasting and apply our moving.

So now we'll start with Arima modeling, we are using the procedure proc. Arima data equals liveliness. Mainly what has been everything dot m CDs underscore and then is the name of my data set MBAs in the state of Ohio in favor equals to my analytical variable over here is passengers. Because we've been forecasting the number of passengers, that is an analytical variable, so I've used it in the favor equal to passengers, drum and then quit. So let's run this code. Mr. President, you're giving the standard deviation.

We are given the mean of working cities a number of observations that is 144. This is autocorrelation. Check for vitamins seen the first leg and the 12th lap there is a huge plunge to use Remember this that in the future we have to use the lack of a period of differencing and span Commonwealth to restore stationarity. So we'll use one Commonwealth because there's a huge plan to the operations from first elected when black is the first success the next up to 12 blacks are between random book versus a huge plunge so we'll be giving the period or difference in future has gone Commonwealth to the stress and stationarity This is a recent problem PCF loveseat is very much non stationary nature. All the lines have crossed the standard a region this region which is maroon color, or we can say it's brown color, this is my standard error region and all the lines are the coalition lines have crossed every region in six famous Mr. Cheney sure and if he prefers not to change it is it implies that the PCF graph is also non stationary.

And this you can understand this is very Muslim station D is a normal squat scatterplot so data is very much non stationary in nature that we have understood by seeing these even as a graph. Now let's do the ADF test. Let us check for stationarity v2 augmented Dickey fuller test. So let's do that test. There using the procedure proc aromantic. LLC name is Malecon doc.

My data set is time series underscore airline. Okay, now I'm writing it in a favor. Equal to passengers that is men and because the passengers semantical variable I'm checking for stationarity ZDF tests stationarity is equal to up to date, EDF EDF equals two one ad F stands for augmented Dickey fuller test which we are going to check which we are going to do to check for stationarity. Then run and then quick. So let's run this code. So this is my augmented Dickey fuller tests table.

Okay. zero mean over here means no intersect. That is There is no drift parameter. Single mean means there is an intercept and trend means there is a trend component here we have to check the P values for p are less than tau. So, these are my P values. So, for augmented Dickey fuller test as we know that my h notice the data is non stationary and H one that is not hypothesis is that it is non stationary and alternative hypothesis is the data is stationary here for zero mean might be very greater than 0.05.

So, I will accept non hypothesis that if the data is non stationary for sofa zero million single mean for both the cases the data is non stationary but for trend it is showing as stationary. So, if we take over all of it, it is basically non stationary data because, for the majority cases for the majority types the data has come to us non stationarity as we accept the null hypothesis purchases data is non stationary alternative hypothesis the data is stationary. Now hypothesis data is non stationary or data hypothesis a stationary my icpc graph also shows that data is very much non stationary so in this video we'll be learning till here so for now, let me end this video over here. Goodbye. Thank you see what for the next video

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.