#### Overview of this book

Data Analysis with Stata
Credits
www.PacktPub.com
Preface
Free Chapter
Introduction to Stata and Data Analytics
Stata Programming and Data Management
Data Visualization
Important Statistical Tests in Stata
Linear Regression in Stata
Logistic Regression in Stata
Survey Analysis in Stata
Time Series Analysis in Stata
Survival Analysis in Stata
Index

## Time series analysis concepts

One of the best time series analysis methods is called ARIMA or Box Jenkins. ARIMA stands for Autoregressive Integrated Moving Averages.

Unlike regression models, in which Yi is explained by the k regressors (X1, X2, X3, ... , Xk), the BJ-type time series models allow Yi to be explained by past, or lagged, values of Y itself and stochastic error terms.

Let's take a small example of the GDP series, as shown in the following diagram:

Let's work with the GDP time series data for the United States given in the diagram. A plot of this time series is given in the undifferenced GDP and first-differenced GDP.

In the level form, GDP is nonstationary, but in the first-differenced form, it is stationary. If a time series is stationary, then it can fit the ARIMA model in a variety of ways. A time series is stationary when mean and variance is constant over time. Let's first understand an autoregressive (AR) process:

• Let Zt denote the GDP at a given time t.

This means that we...