SlideShare a Scribd company logo
Running head: TIME SERIES ANALYSIS OF GDP DATA 1
Time Series Analysis of Gross Domestic Product Data
Brian G. Wu
Oakland University
Competency Project for M.S. Applied Statistics
Advisor: Dorin Drignei
Committee Members: Gary McDonald, Theophilus Ogunyemi, and Xianggui Qu
April 1, 2016
TIME SERIES ANALYSIS OF GDP DATA 2
Abstract
The gross domestic product, or GDP, is a leading measurement of a nation’s production. This
report investigates the GDP of the United States of America, the United Kingdom, and Australia.
The GDP of all three countries increase exponentially, but deviations from the trend occur. This
report begins with a discussion of the definition including a comparison of Gross National
Product (GNP) and Gross Domestic Product (GDP) and the three methods of calculating the
GDP such as the production, expenditure, and income approaches. Following is a discussion of
the statistical methods used to analyze the GDP of the three countries. Using a time series
analysis, the nonstationary data with an exponential trend is differenced resulting in a more
stationary data. Then, a multivariate AR(2) model and three univariate AR(2) models are fitted to
the data followed by analysis of the residuals and predictions. With residuals passing the tests,
the report shows the predicted future GDP along with 95% prediction bounds for the next five
years. The results are obtained and compared using three statistical programs: ITSM, R, and
SAS.
Keywords: GDP, Time Series, Statistics
TIME SERIES ANALYSIS OF GDP DATA 3
Contents
Abstract............................................................................................................................... 2
Introduction......................................................................................................................... 4
A Statistical Analysis of the GDP ....................................................................................... 6
ARMA Model ................................................................................................................. 6
Predictions....................................................................................................................... 6
Results............................................................................................................................. 7
Conclusion ........................................................................................................................ 10
References......................................................................................................................... 12
Tables ................................................................................................................................ 13
Figures............................................................................................................................... 20
Codes................................................................................................................................. 41
R Code .......................................................................................................................... 41
SAS Code...................................................................................................................... 41
TIME SERIES ANALYSIS OF GDP DATA 4
Introduction
The Gross Domestic Product is one of the leading measurements of the economy. Ferrara
describes the GDP as “the most publicized and politically significant” (Indicator - Gross
Domestic Product, 2013). One of the countries with the largest economy is the United States of
America, which shifted from Gross National Product, or GNP, to GDP. While both GDP and
GNP measure in terms of produced goods and services, their coverage differs. According to the
Survey of Current Business article, the GDP “covers the goods and services produced by labor
and property located in the United States” while the GNP “covers the goods and services
produced by labor and property supplied by U.S. residents” (Gross Domestic Product as a
Measure of U.S. Production, 1991). In others words, GDP covers anything located within the
U.S. while GNP covers anything by U.S. citizens, regardless whether the citizens reside in the
U.S. or not.
There are three different ways to calculate the GDP, theoretically leading to the same
results, but experimentally leading to different results due to rounding error. The first is the
production approach. Ferrera describes it as “the final output, minus the value of intermediate
consumption” (Indicator - Gross Domestic Product, 2013). In the second approach, which is the
expenditure approach, 𝑌 = 𝐶 + 𝐼 + 𝐺 + (𝑋 − 𝑀), where 𝑌 is the GDP, 𝐶 is the consumption, 𝐼
is the investment, 𝐺 is the government expenditures, 𝑋 is the exports, 𝑀 is the imports. “To this
sum,” says Ferrera, referring to every household’s consumption of goods and services,
“statisticians add gross capital formation, which is a nation’s investment, minus its disposal of
assets to assist in capital formation or produce inventories of goods or valuables” (Indicator -
Gross Domestic Product, 2013). The final approach is the income approach. According to
Ferrera, this means summing up the compensation of employees, gross operating surplus, and
TIME SERIES ANALYSIS OF GDP DATA 5
mixed income as the subtotal, then subtracting any subsidies from productions or imports to
obtain the GDP (Indicator - Gross Domestic Product, 2013).
Table 1 displays the actual GDP (in millions of 2009 dollars) from 1920 through 2013 for
the United States (Johnston & Williamson, 2016), the United Kingdom (Williamson, 2016), and
Australia (Hutchinson, 2016), each obtained from MeasuringWorth. Figure 1, Figure 2, and
Figure 3 show a plot of the GDP for the United States, the United Kingdom, and Australia,
respectively, generated from Microsoft Excel. Notice that all three plots follow an exponential
trend. However, each of the three plots show a hump from 1940 through 1945. The GDP was
higher than expected during that time because of World War II. Around 2008, the United States
and the United Kingdom suffered a recession, which explains the dip in the plots. However, the
recession apparently did not affect Australia as much, as there does not seem to be a dip in the
plot for Australia’s GDP.
To analyze and predict the future GDP, time series analysis has been used. We compare
our analysis with three statistical packages. ITSM (Interactive Time Series Modeling) is a time
series software that comes with Introduction to Time Series and Forecasting by Brockwell and
Davis. R functions such as “ts”, “diff”, and “ar” are key functions used to create a time series
object, difference the data, and fit autoregressive models, respectively. SAS procedures such as
ARIMA and VARMAX easily fit autoregressive moving-average models to univariate and
multivariate time series data, respectively, along with predictions of future values. The methods
are further discussed in the following sections.
TIME SERIES ANALYSIS OF GDP DATA 6
A Statistical Analysis of the GDP
ARMA Model
{𝑋𝑡} is an ARMA(𝑝, 𝑞) process if {𝑋𝑡} is stationary and if for every 𝑡, 𝑋𝑡 − 𝜙1 𝑋𝑡−1 − ⋯ −
𝜙 𝑝 𝑋𝑡−𝑝 = 𝑍𝑡 + 𝜃1 𝑍𝑡−1 + ⋯ + 𝜃𝑞 𝑍𝑡−𝑞, where {𝑍𝑡}~𝑊𝑁(0, 𝜎2
), or 𝜙(𝐵)𝑋𝑡 = 𝜃(𝐵)𝑍𝑡,
{𝑍𝑡}~𝑊𝑁(0, 𝜎2
), where 𝜙(𝑧) ≔ 1 − 𝜙1 𝑧 − ⋯ − 𝜙 𝑝 𝑧 𝑝
and 𝜃(𝑧) ≔ 1 + 𝜃1 𝑧 + ⋯ + 𝜃 𝑞 𝑧 𝑞
are
polynomials and 𝐵 denotes the backward shift operator (Brockwell & Davis, 2002).
The univariate ARMA model can easily be extended to the multivariate case. {𝐗 𝑡} is an
ARMA(𝑝, 𝑞) process if {𝐗 𝑡} is stationary and if for every 𝑡, 𝐗 𝑡 − Φ1 𝐗 𝑡−1 − ⋯ − Φ 𝑝 𝐗 𝑡−𝑝 =
𝐙 𝑡 + Θ1 𝐙 𝑡−1 + ⋯ + Θ 𝑞 𝐙 𝑡−𝑞, where {𝐙 𝑡}~𝑊𝑁(𝟎, Σ), or Φ(𝐵)𝑿 𝑡 = Θ(𝐵)𝐙 𝑡, {𝐙 𝑡}~𝑊𝑁(𝟎, Σ),
where Φ(𝑧) ≔ 𝐼 − Φ1 𝑧 − ⋯ − Φ 𝑝 𝑧 𝑝
and Θ(𝑧) ≔ 𝐼 + Θ1 𝑧 + ⋯ + Θ 𝑞 𝑧 𝑞
are matrix-valued
polynomials, 𝐼 is the 𝑚 × 𝑚 identity matrix, and 𝐵 denotes the backward shift operator
(Brockwell & Davis, 2002).
The AICC is defined as AICC = −2 ln 𝐿(Φ1, … , Φ 𝑝, Σ) +
2(𝑝𝑚2+1)𝑚𝑛
𝑛𝑚−𝑝𝑚2−2
(Brockwell &
Davis, 2002). This measure allows us to choose the best model achieving minimum AICC among
a set of competing models.
Predictions
Predicting the future values is important. The best ℎ-step linear predictor is denoted by
𝑃𝑛 𝑋 𝑛+ℎ = 𝜇 + ∑ 𝑎𝑖(𝑋 𝑛+1−𝑖 − 𝜇)𝑛
𝑖=1 where 𝐚 𝑛 = (𝑎1, … , 𝑎 𝑛)′ satisfies Γ𝑛 𝐚 𝑛 = 𝜸 𝑛(ℎ), Γ𝑛 =
[𝛾(𝑖 − 𝑗)]𝑖,𝑗=1
𝑛
, and 𝜸 𝑛(ℎ) = (𝛾𝑛(ℎ), 𝛾𝑛(ℎ + 1), … , 𝛾𝑛(ℎ + 𝑛 − 1))′.
In the multivariate case, let 𝑃𝑛 𝐗 𝑛+ℎ be the best ℎ-step linear predictor based on all the
components of 𝐗1, … , 𝐗 𝑛. Going back to the multivariate AR(𝑝) process defined by 𝐗 𝑡 =
Φ1 𝐗 𝑡−1 + ⋯ + Φ 𝑝 𝐗 𝑡−𝑝 + 𝐙 𝑡, {𝐙 𝑡}~𝑊𝑁(𝟎, Σ), one applies the linear prediction operator 𝑃𝑛 to
TIME SERIES ANALYSIS OF GDP DATA 7
get 𝑃𝑛 𝐗 𝑛+ℎ = Φ1 𝑃𝑛 𝐗 𝑛+ℎ−1 + ⋯ + Φ 𝑝 𝑃𝑛 𝐗 𝑛+ℎ−𝑝 (Brockwell & Davis, 2002). The predictions
𝑃𝑛 𝐗 𝑛+ℎ are obtained recursively with respect to ℎ. Prediction formulas for undifferenced
multivariate time series are given in Brockwell and Davis page 252 (Brockwell & Davis, 2002).
To compute the prediction error covariance matrix, let 𝐗 𝑛+ℎ = ∑ Ψ𝑗 𝐙 𝑛+ℎ−𝑗
∞
𝑗=0 , where we
can compute Ψ𝑗 recursively from Ψ𝑗 = Θ𝑗 + ∑ Φ 𝑘Ψ𝑗−𝑘
∞
𝑘=1 , 𝑗 = 0,1, … with 𝑞 = 0. We define
Θ0 = 𝐼, Θ𝑗 = 0 for 𝑗 > 𝑞, Φ𝑗 = 0 for 𝑗 > 𝑝, and Ψ𝑗 = 0 for 𝑗 < 0. Then, for 𝑛 ≥ 𝑝, 𝑃𝑛 𝐗 𝑛+ℎ =
∑ Ψ𝑗 𝐙 𝑛+ℎ−𝑗
∞
𝑗=ℎ . Then, 𝐗 𝑛+ℎ − 𝑃𝑛 𝐗 𝑛+ℎ = ∑ Ψ𝑗 𝐙 𝑛+ℎ−𝑗
ℎ−1
𝑗=0 is the h-step prediction error with
covariance matrix 𝐸[(𝐗 𝑛+ℎ − 𝑃𝑛 𝐗 𝑛+ℎ)(𝐗 𝑛+ℎ − 𝑃𝑛 𝐗 𝑛+ℎ)′] = ∑ Ψ𝑗ΣΨ𝑗
′ℎ−1
𝑗=0 , 𝑛 ≥ 𝑝.
Results
To do a multivariate time series analysis of the three GDPs, each of the three series must have
equal number of observations and values between 1920 and 2013 were retained. Upon initial
glance in the original plots in Figures 1, 2, and 3, there seems to be a nonstationary trend. The
first step is to difference the data to render them stationary. In a stationary time series, the data
has constant mean and variance over time without any trend. The differenced data for the GDP
for the United States, the United Kingdom, and Australia are shown in Figures 4, 5, and 6,
respectively, obtained from R and plotted using Excel and they look more stationary i.e. constant
mean, variance, and correlation depends on distance between time points. Figure 7 shows the
sample auto- and cross-correlations 𝜌̂𝑖𝑗𝑘(ℎ), 𝑖, 𝑗, 𝑘 = 1,2,3, generated from ITSM. For each of
the autocorrelation plots, at least one of the autocorrelations at lags other than zero fall outside of
the upper bound, suggesting the data values are correlated to both within and between time
series.
For the GDP data, using the Yule-Walker method, I had ITSM generate an AR model of
order less than or equal to 10 with the least AICC. The result is an AR model of order two, which
TIME SERIES ANALYSIS OF GDP DATA 8
sets 𝑝 = 2 and 𝑞 = 0, giving the equation 𝐗 𝑡 = Φ1 𝐗 𝑡−1 + Φ2 𝐗2 + 𝐙 𝑡, {𝐙 𝑡}~𝑊𝑁(𝟎, Σ) with
parameters 𝜙0 = [
50234.8
6180.46
1865.64
], Φ̂1 = [
0.416947 0.931785 0.312629
0.027292 0.288190 0.170756
0.022081 0.076634 0.357414
],
Φ̂2 [
−0.149708 0.164620 3.144659
−0.004624 −0.190773 0.123329
−0.016030 0.077330 0.278963
], Σ̂ =
[
1.97495 × 1010
1.64800 × 109
3.90519 × 108
1.64800 × 109
2.90734 × 108
4.66759 × 107
3.90819 × 108
4.66759 × 107
7.10182 × 107
], with AICC = 6454.97. My results with
R, shown in Table 2, is identical to my results with ITSM, shown in Table 3, with AICC of
essentially zero, and different values for Σ̂. However, my results from SAS with AICC =
5849.45, shown in Table 4, has slightly different values from R and ITSM for all the parameters.
Using ITSM, the residual plots for the United States, and United Kingdom, and Australia
are shown in Series 1, 2, and 3, respectively, of Figure 8. The residuals do not seem to have an
apparent pattern, passing the white-noise assumption and making it feasible to make predictions.
At the same time, ITSM also plots the residuals autocorrelation function for each pairs of data,
shown in Figure 9. Since the residual vectors 𝐙̂ 𝑡 are nearly all within the confidence bounds, the
model seems to be a good fit. While this analysis works with ITSM and R with identical graphs,
there is no simple code for residual analysis yet for SAS. None of the three packages provide a
formal white-noise test for multivariate time series models.
Assume that the model for the GDP fitted to the multivariate series {𝐘𝑡, 𝑡 = 0, … ,93} is
correct, i.e., that Φ(𝐵)𝐗 𝑡 = 𝐙 𝑡, 𝐙 𝑡~WN(𝟎, Σ̂), where 𝐗 𝑡 = (1 − 𝐵)𝐘𝑡 −
(159570,15535,14364)′, 𝑡 = 1, … ,93, Φ(𝑧) ≔ 𝐼 − Φ̂1 𝐵 − Φ̂2 𝐵2
, and Φ̂1, Φ̂2, Σ̂ are the
matrices found in Table 4. From ITSM, the one- and two-step predictors of 𝐘94 and 𝐘95 are
𝑃̃93 𝐘94 = [
1.59 × 107
1.68 × 106
1.46 × 106
] and 𝑃̃93 𝐘95 = [
1.61 × 107
1.71 × 106
1.46 × 106
]. ITSM also easily calculates the predicted
TIME SERIES ANALYSIS OF GDP DATA 9
GDP from 2014 through 2023 along with its 95% prediction limits, shown in Figure 10. As
shown in Figures 11, 12, and 13 for the United States, the United Kingdom, and Australia,
respectively, the actual GDP is within the prediction limits from 2009 to 2013 with the exception
of the 2013 Australia GDP, which is above the upper limit.
SAS automatically gives the future GDP, its standard error, and its 95% prediction
bounds for years 2014 through 2023, shown in Table 5 and Figures 14, 15, and 16 for the United
States, the United Kingdom, and Australia, respectively. As it turns out, the 2014 GDP for U.S.
and U.K. of 15,961,700 and 1,705,000, fit within their respective bounds of (15,594,673,
16,166,143) and (1,651,906, 1,719,292). Assuming the model is correct, the GDP apparently
increases after 2015 while the prediction bounds widen year after year.
However, if I took out the last five data points (2009 through 2013) for all three
countries, refitted the model, and computed the predicted GDP, my actual data points are not all
within the predicted bounds. This is because the multivariate AR(2) model does not take into
account the 2008 recession when the data points are removed. This is shown in Figures 17, 18,
and 19 for the United States, the United Kingdom, and Australia, respectively.
I now compare my multivariate AR(2) results to my results for three separate univariate
AR(2) results using SAS. The differenced data for each of the three univariate data along with
the correlation plots, shown in Figures 20, 21, and 22 for the United States, the United Kingdom,
and Australia, respectively, are similar to the differenced data for the multivariate data. My
parameter estimates are shown in Table 6 with AIC of 2489.653, 2098.003, and 1969.965 for the
United States, the United Kingdom, and Australia, respectively.
The residual plots for the univariate models along with their corresponding correlation
plots obtained with SAS are shown in Figures 23, 24, and 25 for the United States, the United
TIME SERIES ANALYSIS OF GDP DATA 10
Kingdom, and Australia, respectively. The residuals look mostly uncorrelated and in the white-
noise probability plot in the bottom right-hand corner of each of the three figures, much of the
bars are above 0.05, making the models of adequate fit.
Assuming that the model for the GDP fitted to their respective univariate series is correct,
SAS easily calculates the future GDP, its standard error, and its 95% prediction bounds for years
2014 through 2023, shown in Table 7 and Figures 26, 27, and 28 for the United States, the
United Kingdom, and Australia, respectively. Because the univariate models do not take
correlation between the different countries’ GDP into account, the predictions reported by the
univariate models have wider bounds than those reported by the multivariate model.
Additionally, the multivariate model predicts higher future GDP than the univariate models do
for the United States and the United Kingdom, but the opposite for Australia. However, if I took
out the last five data points (2009 through 2013) for all three countries, refitted the model, and
computed the predicted GDP, I noticed that for all three countries, at least one point is out of
bounds, as shown in Figures 29, 30, and 31.
A potential line of further analysis is to difference twice each series. However, this
shortens further the sample size by one observation vector and the multivariate AR model has
many parameters to be estimated. The estimation becomes less precise with fewer data.
Conclusion
The multivariate AR(2) model better-fits the differenced GDP data of the United States, the
United Kingdom, and Australia from 1920 through 2013 than the separate univariate AR(2)
models do because the multivariate model takes into account the correlation between the
different countries’ GDP. While the residuals shown in the residual plots appear uncorrelated and
compatible with the hypothesis of white noise, the multivariate model reports substantially
TIME SERIES ANALYSIS OF GDP DATA 11
narrower prediction bounds than the univariate models do for the predicted 2014 through 2023
GDP. However, the plots show that the GDP for all three countries is expected to increase, but
with the prediction limits increasing for each successive prediction, it is difficult to make
predictions for the GDP further into the future. Additionally, variations from the model trend are
not all by chance, as assignable causes such as war or recessions can deviate the actual GDP
from the predicted GDP.
TIME SERIES ANALYSIS OF GDP DATA 12
References
Brockwell, P. J., & Davis, R. A. (2002). Introduction to Time Series and Forecasting. Springer
Science & Business Media.
Gross Domestic Product as a Measure of U.S. Production. (1991, August). Survey of Current
Business, 8. Retrieved February 26, 2016, from
http://www.bea.gov/scb/pdf/national/nipa/1991/0891od.pdf
Hutchinson, D. (2016). What Was the Australian GDP or CPI Then? Retrieved January 12, 2016,
from MeasuringWorth: www.measuringworth.com/datasets/australiadata/
Indicator - Gross Domestic Product. (2013). In M. H. Ferrara (Ed.), Gale Business Insights
Handbook of Investment Research (pp. 41-52). Detroit: Gale, Cengage Learning.
Retrieved February 24, 2016, from
http://go.galegroup.com.huaryu.kl.oakland.edu/ps/i.do?id=GALE|9781414499345&v=2.1
&u=lom_oaklandu&it=aboutBook&p=GVRL&sw=w
Johnston, L., & Williamson, S. H. (2016). What Was the U.S. GDP Then? Retrieved January 12,
2016, from MeasuringWorth: http://www.measuringworth.org/usgdp/
Williamson, S. H. (2016). What Was the U.K. GDP Then? Retrieved January 12, 2016, from
MeasuringWorth: http://www.measuringworth.com/ukgdp/
TIME SERIES ANALYSIS OF GDP DATA 13
Tables
Table 1
Original Data (Hutchinson, 2016), (Johnston & Williamson, 2016), and (Williamson, 2016)
Year U.S. GDP U.K. GDP Australia G.D.P.
1920 743,030 210,661 62,220
1921 725,995 183,182 70,722
1922 766,310 192,907 74,444
1923 867,213 198,622 76,972
1924 893,916 207,997 79,980
1925 914,914 215,316 85,187
1926 974,698 208,598 82,692
1927 984,111 224,641 86,181
1928 995,390 226,646 85,387
1929 1,056,600 233,113 83,749
1930 966,700 231,258 84,948
1931 904,800 220,530 76,972
1932 788,200 220,680 78,257
1933 778,300 227,699 82,973
1934 862,200 241,284 86,070
1935 939,000 250,208 87,985
1936 1,060,500 262,139 92,457
1937 1,114,600 271,313 95,442
1938 1,077,700 273,419 101,571
1939 1,163,600 285,451 97,524
1940 1,266,100 313,775 102,865
1941 1,490,300 341,097 110,565
1942 1,771,800 347,213 126,794
1943 2,073,700 353,179 137,835
1944 2,239,400 337,638 136,182
1945 2,217,800 322,197 128,333
1946 1,960,900 314,276 123,010
1947 1,939,400 310,266 119,303
1948 2,020,000 320,242 128,952
1949 2,008,900 331,081 135,329
1950 2,184,000 342,028 146,422
1951 2,360,000 354,899 154,670
1952 2,456,100 360,586 160,071
1953 2,571,400 380,500 158,681
1954 2,556,900 396,877 168,492
1955 2,739,000 412,072 178,442
… … … …
2013 15,583,300 1,655,450 1,398,080
TIME SERIES ANALYSIS OF GDP DATA 14
Table 2
Multivariate AR Coefficient Estimates from R
Lag Variable U.S. U.K. Australia
0 U.S. 50,234.50 - -
U.K. - 6,180.46 -
Australia - - 1,865.64
1 U.S. 0.4170 0.9318 0.3126
U.K. 0.0273 0.2882 0.1708
Australia 0.0221 0.0766 0.3574
2 U.S. -0.1497 0.1646 0.3145
U.K. -0.0046 -0.1908 0.1233
Australia -0.0160 0.0773 0.2790
Variance U.S. 2.187E+10 1.825E+09 4.324E+08
U.K. 1.825E+09 3.219E+08 5.168E+07
Australia 4.324E+08 5.168E+07 7.863E+07
TIME SERIES ANALYSIS OF GDP DATA 15
Table 3
Multivariate AR Coefficient Estimates from ITSM
Lag Variable U.S. U.K. Australia
0 U.S. 50,234.80 - -
U.K. - 6,180.46 -
Australia - - 1,865.64
1 U.S. 0.4169 0.9318 0.3126
U.K. 0.0273 0.2882 0.1708
Australia 0.0221 0.0766 0.3574
2 U.S. -0.1497 0.1646 3.1447
U.K. -0.0046 -0.1908 0.1233
Australia -0.0160 0.0773 0.2790
White Noise
Covariance
Matrix
U.S. 1.975E+10 1.648E+09 3.905E+08
U.K. 1.648E+09 2.907E+08 4.668E+07
Australia 3.908E+08 4.668E+07 7.102E+07
TIME SERIES ANALYSIS OF GDP DATA 16
Table 4
Multivariate AR Coefficient Estimates from SAS
Lag Variable U.S. U.K. Australia
0 U.S. 50,774.48 - -
U.K. - 6,234.74 -
Australia - - 1,773.37
1 U.S. 0.4068 0.9999 0.2241
U.K. 0.0254 0.3211 0.1715
Australia 0.0209 0.0836 0.3489
2 U.S. -0.1381 -0.0249 3.5959
U.K. -0.0035 -0.2187 0.1564
Australia -0.0145 0.0536 0.3317
White Noise
Covariance
Matrix
U.S. 2.125E+10 1.713E+09 3.914E+08
U.K. 1.713E+09 2.955E+08 4.622E+07
Australia 3.914E+08 4.622E+07 7.476E+07
TIME SERIES ANALYSIS OF GDP DATA 17
Table 5
Multivariate AR(2) Predictions Using SAS
Variable Year Predicted Standard Error 95% Prediction Limits
U.S. 2014 15,880,408 145,786 15,594,673 16,166,143
2015 16,177,375 262,106 15,663,657 16,691,092
2016 16,454,444 361,244 15,746,420 17,162,468
2017 16,718,136 454,572 15,827,191 17,609,082
2018 16,970,526 545,050 15,902,247 18,038,805
2019 17,213,037 634,050 15,970,321 18,455,752
2020 17,446,834 721,680 16,032,368 18,861,301
2021 17,673,073 807,707 16,089,996 19,256,150
2022 17,892,820 891,955 16,144,621 19,641,019
2023 18,106,985 974,323 16,197,347 20,016,623
U.K. 2014 1,685,599 17,191 1,651,906 1,719,292
2015 1,712,940 31,085 1,652,015 1,773,865
2016 1,738,024 41,647 1,656,397 1,819,650
2017 1,762,032 50,569 1,662,918 1,861,145
2018 1,785,315 59,093 1,669,495 1,901,135
2019 1,807,845 67,538 1,675,473 1,940,218
2020 1,829,643 75,841 1,680,998 1,978,288
2021 1,850,810 83,935 1,686,300 2,015,320
2022 1,871,451 91,815 1,691,497 2,051,405
2023 1,891,644 99,491 1,696,646 2,086,642
Australia 2014 1,429,523 8,646 1,412,576 1,446,470
2015 1,460,225 16,142 1,428,587 1,491,862
2016 1,488,921 24,959 1,440,002 1,537,840
2017 1,515,920 34,359 1,448,578 1,583,263
2018 1,541,461 43,988 1,455,246 1,627,676
2019 1,565,770 53,693 1,460,533 1,671,007
2020 1,589,022 63,381 1,464,797 1,713,246
2021 1,611,356 72,978 1,468,321 1,754,391
2022 1,632,896 82,432 1,471,333 1,794,460
2023 1,653,752 91,705 1,474,013 1,833,492
TIME SERIES ANALYSIS OF GDP DATA 18
Table 6
Univariate AR Coefficient Estimates from SAS
Country Lag Coefficient Variance
U.S. 1 0.65398 24,020,000,000
2 0.12905
Intercept 159,572.8
U.K. 1 0.66183 357,100,000
2 0.01682
Intercept 15,535.37
Australia 1 0.57638 89,023,459
2 0.34599
Intercept 14,364.09
TIME SERIES ANALYSIS OF GDP DATA 19
Table 7
Univariate AR(2) Predictions Using SAS
Variable Year Predicted Standard Error 95% Prediction Limits
U.S. 2014 15,775,967 154,975 15,472,223 16,079,712
2015 15,931,482 299,532 15,344,409 16,518,554
2016 16,058,048 455,080 15,166,107 16,949,989
2017 16,160,889 613,949 14,957,572 17,364,206
2018 16,244,478 772,406 14,730,589 17,758,367
2019 16,312,415 928,172 14,493,231 18,131,599
2020 16,367,631 1,079,935 14,250,997 18,484,266
2021 16,412,509 1,226,978 14,007,676 18,817,341
2022 16,448,984 1,368,961 13,765,869 19,132,098
2023 16,478,629 1,505,788 13,527,338 19,429,919
U.K. 2014 1,673,572 18,897 1,636,534 1,710,609
2015 1,686,021 36,651 1,614,186 1,757,856
2016 1,694,565 54,251 1,588,234 1,800,896
2017 1,700,429 71,062 1,561,150 1,839,708
2018 1,704,454 86,859 1,534,214 1,874,694
2019 1,707,216 101,609 1,508,066 1,906,366
2020 1,709,112 115,365 1,483,001 1,935,223
2021 1,710,413 128,213 1,459,121 1,961,705
2022 1,711,306 140,247 1,436,428 1,986,185
2023 1,711,919 151,560 1,414,868 2,008,971
Australia 2014 1,433,265 9,435 1,414,772 1,451,758
2015 1,465,130 17,614 1,430,608 1,499,653
2016 1,495,671 27,618 1,441,540 1,549,801
2017 1,524,299 38,513 1,448,814 1,599,783
2018 1,551,366 50,244 1,452,890 1,649,842
2019 1,576,872 62,588 1,454,202 1,699,542
2020 1,600,938 75,435 1,453,088 1,748,789
2021 1,623,635 88,678 1,449,828 1,797,441
2022 1,645,043 102,236 1,444,665 1,845,421
2023 1,665,235 116,038 1,437,804 1,892,666
TIME SERIES ANALYSIS OF GDP DATA 20
Figures
Figure 1. United States GDP
Figure 2. United Kingdom GDP
-
2,000,000
4,000,000
6,000,000
8,000,000
10,000,000
12,000,000
14,000,000
16,000,000
18,000,000
1920
1923
1926
1929
1932
1935
1938
1941
1944
1947
1950
1953
1956
1959
1962
1965
1968
1971
1974
1977
1980
1983
1986
1989
1992
1995
1998
2001
2004
2007
2010
2013
-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1,800,000
1920
1923
1926
1929
1932
1935
1938
1941
1944
1947
1950
1953
1956
1959
1962
1965
1968
1971
1974
1977
1980
1983
1986
1989
1992
1995
1998
2001
2004
2007
2010
2013
TIME SERIES ANALYSIS OF GDP DATA 21
Figure 3. Australia GDP
Figure 4. Differenced Data for U.S. GDP Using R
-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1920
1923
1926
1929
1932
1935
1938
1941
1944
1947
1950
1953
1956
1959
1962
1965
1968
1971
1974
1977
1980
1983
1986
1989
1992
1995
1998
2001
2004
2007
2010
2013
(600,000)
(400,000)
(200,000)
-
200,000
400,000
600,000
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91
TIME SERIES ANALYSIS OF GDP DATA 22
Figure 5. Differenced Data for U.K. GDP Using R
Figure 6. Differenced Data for Australia GDP Using R
(80,000)
(60,000)
(40,000)
(20,000)
-
20,000
40,000
60,000
80,000
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91
(20,000)
(10,000)
-
10,000
20,000
30,000
40,000
50,000
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91
TIME SERIES ANALYSIS OF GDP DATA 23
Figure 7. Autocorrelations for GDP Data Using ITSM
Figure 8. Multivariate AR(2) Residuals Using ITSM
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series1
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series1x Series2
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series1x Series3
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series2 x Series1
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series2
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series2 x Series3
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series3 x Series1
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series3 x Series2
-1.00
-.80
-.60
-.40
-.20
.00
.20
.40
.60
.80
1.00
0 2 4 6 8 10 12 14 16 18 20
Series3
-6.00E+05
-4.00E+05
-2.00E+05
0.00E+00
2.00E+05
4.00E+05
10 20 30 40 50 60 70 80 90
Series 1
-8.00E+04
-6.00E+04
-4.00E+04
-2.00E+04
0.00E+00
2.00E+04
4.00E+04
10 20 30 40 50 60 70 80 90
Series 2
-2.00E+04
-1.00E+04
0.00E+00
1.00E+04
2.00E+04
10 20 30 40 50 60 70 80 90
Series 3
TIME SERIES ANALYSIS OF GDP DATA 24
Figure 9. Multivariate AR(2) Residuals Autocorrelations Using ITSM
Figure 10. Original Data with Multivariate AR(2) Predictions Using ITSM
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series1
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series1x Series2
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series1x Series3
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series2 x Series1
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series2
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series2 x Series3
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series3 x Series1
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series3 x Series2
-1.00
-.60
-.20
.20
.60
1.00
0 2 4 6 8 10 12 14 16 18 20
Series3
0.00E+00
2.00E+06
4.00E+06
6.00E+06
8.00E+06
1.00E+07
1.20E+07
1.40E+07
1.60E+07
1.80E+07
2.00E+07
0 20 40 60 80 100
Series 1
0.00E+00
2.00E+05
4.00E+05
6.00E+05
8.00E+05
1.00E+06
1.20E+06
1.40E+06
1.60E+06
1.80E+06
2.00E+06
2.20E+06
0 20 40 60 80 100
Series 2
0.00E+00
2.00E+05
4.00E+05
6.00E+05
8.00E+05
1.00E+06
1.20E+06
1.40E+06
1.60E+06
1.80E+06
0 20 40 60 80 100
Series 3
TIME SERIES ANALYSIS OF GDP DATA 25
Figure 11. Multivariate AR(2) Predictions for U.S. GDP with Original Data Using ITSM
Figure 12. Multivariate AR(2) Predictions for U.K. GDP with Original Data Using ITSM
12,500,000
13,000,000
13,500,000
14,000,000
14,500,000
15,000,000
15,500,000
16,000,000
16,500,000
2009 2010 2011 2012 2013
United States
GDP Predicted GDP Lower Limit Upper Limit
1,350,000
1,400,000
1,450,000
1,500,000
1,550,000
1,600,000
1,650,000
1,700,000
1,750,000
2009 2010 2011 2012 2013
United Kingdom
GDP Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 26
Figure 13. Multivariate AR(2) Predictions for Australia GDP with Original Data Using ITSM
Figure 14. Multivariate AR(2) Predictions for U.S. GDP Using SAS
1,100,000
1,150,000
1,200,000
1,250,000
1,300,000
1,350,000
1,400,000
1,450,000
2009 2010 2011 2012 2013
Australia
GDP Predicted GDP Lower Limit Upper Limit
14,000,000
15,000,000
16,000,000
17,000,000
18,000,000
19,000,000
20,000,000
2014 2015 2016 2017 2018 2019 2020 2021 2022 2023
United States
Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 27
Figure 15. Multivariate AR(2) Predictions for U.K. GDP Using SAS
Figure 16. Multivariate AR(2) Predictions for Australia GDP Using SAS
1,400,000
1,500,000
1,600,000
1,700,000
1,800,000
1,900,000
2,000,000
2,100,000
2,200,000
2014 2015 2016 2017 2018 2019 2020 2021 2022 2023
United Kingdom
Predicted GDP Lower Limit Upper Limit
1,400,000
1,450,000
1,500,000
1,550,000
1,600,000
1,650,000
1,700,000
1,750,000
1,800,000
1,850,000
1,900,000
2014 2015 2016 2017 2018 2019 2020 2021 2022 2023
Australia
Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 28
Figure 17. Multivariate AR(2) Predictions for U.S. GDP with Original Data Using SAS
Figure 18. Multivariate AR(2) Predictions for U.K. GDP with Original Data Using SAS
13,000,000
13,500,000
14,000,000
14,500,000
15,000,000
15,500,000
16,000,000
16,500,000
17,000,000
17,500,000
2009 2010 2011 2012 2013
United States
GDP Predicted GDP Lower Limit Upper Limit
-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1,800,000
2,000,000
2009 2010 2011 2012 2013
United Kingdom
GDP Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 29
Figure 19. Multivariate AR(2) Predictions for Australia GDP with Original Data Using SAS
1,150,000
1,200,000
1,250,000
1,300,000
1,350,000
1,400,000
1,450,000
1,500,000
2009 2010 2011 2012 2013
Australia
GDP Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 30
Figure 20. Differenced Data and Correlation Plots for U.S. GDP Using SAS
TrendandCorrelationAnalysisfor us(1)
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
IACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
PACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
ACF
-400000
-200000
0
200000
400000
600000
us(1)
0 20 40 60 80 100
Observation
TIME SERIES ANALYSIS OF GDP DATA 31
Figure 21. Differenced Data and Correlation Plots for U.K. GDP Using SAS
TrendandCorrelationAnalysisfor uk(1)
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
IACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
PACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
ACF
-75000
-50000
-25000
0
25000
50000
uk(1)
0 20 40 60 80 100
Observation
TIME SERIES ANALYSIS OF GDP DATA 32
Figure 22. Differenced Data and Correlation Plots for Australia GDP Using SAS
TrendandCorrelationAnalysisfor au(1)
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
IACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
PACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
ACF
0
20000
40000
au(1)
0 20 40 60 80 100
Observation
TIME SERIES ANALYSIS OF GDP DATA 33
Figure 23. Univariate AR(2) Residual Analysis of U.S. Data Using SAS
Residual CorrelationDiagnosticsfor us(1)
0 5 10 15
Lag
1.0
.05
.001
WhiteNoiseProb
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
IACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
PACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
ACF
TIME SERIES ANALYSIS OF GDP DATA 34
Figure 24. Univariate AR(2) Residual Analysis of U.K. Data Using SAS
Residual CorrelationDiagnosticsfor uk(1)
0 5 10 15
Lag
1.0
.05
.001
WhiteNoiseProb
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
IACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
PACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
ACF
TIME SERIES ANALYSIS OF GDP DATA 35
Figure 25. Univariate AR(2) Residual Analysis of Australia Data Using SAS
Residual CorrelationDiagnosticsfor au(1)
0 5 10 15
Lag
1.0
.05
.001
WhiteNoiseProb
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
IACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
PACF
0 5 10 15
Lag
-1.0
-0.5
0.0
0.5
1.0
ACF
TIME SERIES ANALYSIS OF GDP DATA 36
Figure 26. Univariate AR(2) Predictions for U.S. GDP Using SAS
14000000
16000000
18000000
20000000
Forecast
96 98 100 102 104
Obs
95% ConfidenceLimitsPredicted
Forecastsfor us
TIME SERIES ANALYSIS OF GDP DATA 37
Figure 27. Univariate AR(2) Predictions for U.K. GDP Using SAS
1400000
1600000
1800000
2000000
Forecast
96 98 100 102 104
Obs
95% ConfidenceLimitsPredicted
Forecastsfor uk
TIME SERIES ANALYSIS OF GDP DATA 38
Figure 28. Univariate AR(2) Predictions for Australia GDP Using SAS
1400000
1500000
1600000
1700000
1800000
1900000
Forecast
96 98 100 102 104
Obs
95% ConfidenceLimitsPredicted
Forecastsfor au
TIME SERIES ANALYSIS OF GDP DATA 39
Figure 29. Univariate AR(2) Predictions for U.S. GDP with Original Data Using SAS
Figure 30. Univariate AR(2) Predictions for U.K. GDP with Original Data Using SAS
-
2,000,000
4,000,000
6,000,000
8,000,000
10,000,000
12,000,000
14,000,000
16,000,000
18,000,000
2009 2010 2011 2012 2013
United States
GDP Predicted GDP Lower Limit Upper Limit
-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1,800,000
2,000,000
2009 2010 2011 2012 2013
United Kingdom
GDP Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 40
Figure 31. Univariate AR(2) Predictions for Australia GDP with Original Data Using SAS
-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1,800,000
2009 2010 2011 2012 2013
Australia
GDP Predicted GDP Lower Limit Upper Limit
TIME SERIES ANALYSIS OF GDP DATA 41
Codes
R Code
us=read.table(“USgdp.txt”)
uk=read.table(“UKgdp.txt”)
gdp=matrix(NA,dim(us)[1],2)
gdp[,1]=us[,2]
gdp[,2]=uk[,2]
gdp[1:4,]
write(t(gdp),ncol=2,file=“gdp.tsm”)
au=read.table(“AUgdp.txt”)
gdp=matrix(NA,dim(us)[1]-1,3)
gdp[,1]=us[1:94,2]
gdp[,2]=uk[1:94,2]
gdp[,3]=au[,2]
write(t(gdp),ncol=3,file=“gdp.tsm”)
jj=ts(gdp)
plot(jj)
dljj=diff(jj,lag=1)
plot(dljj,type=“l”)
mod<-ar(dljj,se.fit=TRUE,n.ahead=10,order.max=10,dmean=T)
mod$x.mean - (mod$ar[1,,]%*%mod$x.mean + mod$ar[2,,]%*%mod$x.mean)
mod
mod$aic
TIME SERIES ANALYSIS OF GDP DATA 42
mod$resid
acf(mod$resid[3:93,1])
plot(mod$resid)
SAS Code
/* *** GDP for U.S., U.K., and Australia: Multivariate Time Series Analysis*** */
title1 'GDP';
data mseries;
input us uk au @@;
date=_n_;
datalines;
743030 210661 62220
725995 183182 70722
766310 192907 74444
867213 198622 76972
893916 207997 79980
914914 215316 85187
974698 208598 82692
984111 224641 86181
995390 226646 85387
1056600 233113 83749
966700 231258 84948
904800 220530 76972
TIME SERIES ANALYSIS OF GDP DATA 43
788200 220680 78257
778300 227699 82973
862200 241284 86070
939000 250208 87985
1060500 262139 92457
1114600 271313 95442
1077700 273419 101571
1163600 285451 97524
1266100 313775 102865
1490300 341097 110565
1771800 347213 126794
2073700 353179 137835
2239400 337638 136182
2217800 322197 128333
1960900 314276 123010
1939400 310266 119303
2020000 320242 128952
2008900 331081 135329
2184000 342028 146422
2360000 354899 154670
2456100 360586 160071
2571400 380500 158681
2556900 396877 168492
TIME SERIES ANALYSIS OF GDP DATA 44
2739000 412072 178442
2797400 418812 187246
2856300 426840 190761
2835300 432231 194983
3031000 449989 209422
3108700 478286 221887
3188100 491094 227831
3383100 496502 230455
3530400 520729 246051
3734000 549704 261852
3976700 561532 278964
4238900 570299 286224
4355200 586219 304730
4569000 618442 320385
4712500 630478 340542
4722000 647570 364861
4877600 670117 380311
5134300 698446 397036
5424100 744112 404447
5396000 725362 421566
5385400 714123 428524
5675400 735749 438089
5937000 754851 455237
TIME SERIES ANALYSIS OF GDP DATA 45
6267200 786031 458022
6466200 814930 478157
6450400 797251 492571
6617700 790496 509488
6491300 806903 526186
6792000 840811 514212
7285000 859797 538401
7593800 890278 564633
7860500 918415 591257
8132600 969352 606221
8474500 1026870 640191
8786400 1052730 665675
8955000 1058380 689479
8948400 1045300 686939
9266600 1049970 690667
9521000 1077750 719249
9905400 1121130 748006
10174800 1149500 778094
10561000 1180150 808710
11034900 1210280 840094
11525900 1252770 878308
12065900 1292240 922142
12559700 1340950 956701
TIME SERIES ANALYSIS OF GDP DATA 46
12682200 1376680 975028
12908800 1410440 1013353
13271100 1471090 1045576
13773500 1507190 1089337
14234200 1549490 1123048
14613800 1596630 1158094
14873700 1637430 1202064
14830400 1632000 1247030
14418700 1561650 1263590
14783800 1591490 1293380
15020600 1617680 1318684
15354600 1628340 1364595
15583300 1655450 1398080
symbol1 i=join v=dot;
proc gplot data=mseries;
plot us * date=1 / haxis=date;
plot uk * date=1 / haxis=date;
plot au * date=1 / haxis=date;
run;
proc varmax data=mseries;
TIME SERIES ANALYSIS OF GDP DATA 47
model us uk au / p=2 lagmax=3 dif=(us(1) uk(1) au(1)) print=(estimates
diagnose);
output out=for lead=10;
run;
proc arima data=mseries;
identify var=us(1) nlag=15;
estimate p=2 noconstant method=ml;
forecast out=b lead=10;
run;
proc arima data=mseries;
identify var=uk(1) nlag=15;
estimate p=2 noconstant method=ml;
forecast out=b lead=10;
run;
proc arima data=mseries;
identify var=au(1) nlag=15;
estimate p=2 noconstant method=ml;
forecast out=b lead=10;
run;
title1 'GDP';
TIME SERIES ANALYSIS OF GDP DATA 48
data mmseries;
input us uk au @@;
date=_n_;
datalines;
743030 210661 62220
725995 183182 70722
766310 192907 74444
867213 198622 76972
893916 207997 79980
914914 215316 85187
974698 208598 82692
984111 224641 86181
995390 226646 85387
1056600 233113 83749
966700 231258 84948
904800 220530 76972
788200 220680 78257
778300 227699 82973
862200 241284 86070
939000 250208 87985
1060500 262139 92457
1114600 271313 95442
TIME SERIES ANALYSIS OF GDP DATA 49
1077700 273419 101571
1163600 285451 97524
1266100 313775 102865
1490300 341097 110565
1771800 347213 126794
2073700 353179 137835
2239400 337638 136182
2217800 322197 128333
1960900 314276 123010
1939400 310266 119303
2020000 320242 128952
2008900 331081 135329
2184000 342028 146422
2360000 354899 154670
2456100 360586 160071
2571400 380500 158681
2556900 396877 168492
2739000 412072 178442
2797400 418812 187246
2856300 426840 190761
2835300 432231 194983
3031000 449989 209422
3108700 478286 221887
TIME SERIES ANALYSIS OF GDP DATA 50
3188100 491094 227831
3383100 496502 230455
3530400 520729 246051
3734000 549704 261852
3976700 561532 278964
4238900 570299 286224
4355200 586219 304730
4569000 618442 320385
4712500 630478 340542
4722000 647570 364861
4877600 670117 380311
5134300 698446 397036
5424100 744112 404447
5396000 725362 421566
5385400 714123 428524
5675400 735749 438089
5937000 754851 455237
6267200 786031 458022
6466200 814930 478157
6450400 797251 492571
6617700 790496 509488
6491300 806903 526186
6792000 840811 514212
TIME SERIES ANALYSIS OF GDP DATA 51
7285000 859797 538401
7593800 890278 564633
7860500 918415 591257
8132600 969352 606221
8474500 1026870 640191
8786400 1052730 665675
8955000 1058380 689479
8948400 1045300 686939
9266600 1049970 690667
9521000 1077750 719249
9905400 1121130 748006
10174800 1149500 778094
10561000 1180150 808710
11034900 1210280 840094
11525900 1252770 878308
12065900 1292240 922142
12559700 1340950 956701
12682200 1376680 975028
12908800 1410440 1013353
13271100 1471090 1045576
13773500 1507190 1089337
14234200 1549490 1123048
14613800 1596630 1158094
TIME SERIES ANALYSIS OF GDP DATA 52
14873700 1637430 1202064
14830400 1632000 1247030
symbol1 i=join v=dot;
proc gplot data=mmseries;
plot us * date=1 / haxis=date;
plot uk * date=1 / haxis=date;
plot au * date=1 / haxis=date;
run;
proc varmax data=mmseries;
model us uk au / p=2 lagmax=3 dif=(us(1) uk(1) au(1)) print=(estimates
diagnose);
output out=for lead=5;
run;
proc arima data=mmseries;
identify var=us(1) nlag=15;
estimate p=2 noconstant method=ml;
forecast out=b lead=5;
run;
TIME SERIES ANALYSIS OF GDP DATA 53
proc arima data=mmseries;
identify var=uk(1) nlag=15;
estimate p=2 noconstant method=ml;
forecast out=b lead=5;
run;
proc arima data=mmseries;
identify var=au(1) nlag=15;
estimate p=2 noconstant method=ml;
forecast out=b lead=5;
run;

More Related Content

What's hot

Year 12 Maths A Textbook - Chapter 10
Year 12 Maths A Textbook - Chapter 10Year 12 Maths A Textbook - Chapter 10
Year 12 Maths A Textbook - Chapter 10westy67968
 
MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...
MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...
MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...
gerogepatton
 
Bmb12e ppt 1_3
Bmb12e ppt 1_3Bmb12e ppt 1_3
Bmb12e ppt 1_3
John Hani
 
Correlation analysis ppt
Correlation analysis pptCorrelation analysis ppt
Correlation analysis ppt
Anil Mishra
 
Bayesian Estimation for Missing Values in Latin Square Design
Bayesian Estimation for Missing Values in Latin Square DesignBayesian Estimation for Missing Values in Latin Square Design
Bayesian Estimation for Missing Values in Latin Square Design
inventionjournals
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
nadiazaheer
 
Impact of road accident on Bangladesh's economy
Impact of road accident on Bangladesh's economyImpact of road accident on Bangladesh's economy
Impact of road accident on Bangladesh's economy
MasrurHasanKhan
 
Numerical simulation of marangoni driven boundary layer flow over a flat plat...
Numerical simulation of marangoni driven boundary layer flow over a flat plat...Numerical simulation of marangoni driven boundary layer flow over a flat plat...
Numerical simulation of marangoni driven boundary layer flow over a flat plat...
eSAT Journals
 
Measure of Dispersion (statistics)
Measure of Dispersion (statistics)Measure of Dispersion (statistics)
Measure of Dispersion (statistics)
Dr. Tushar J Bhatt
 
Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...
Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...
Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...
IJERA Editor
 
An alternative approach to estimation of population
An alternative approach to estimation of populationAn alternative approach to estimation of population
An alternative approach to estimation of population
Alexander Decker
 
1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.
1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.
1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.
Gogely The Great
 
PROJECT EVERYTHNG
PROJECT EVERYTHNGPROJECT EVERYTHNG
PROJECT EVERYTHNGFalade John
 
Reg
RegReg

What's hot (16)

Year 12 Maths A Textbook - Chapter 10
Year 12 Maths A Textbook - Chapter 10Year 12 Maths A Textbook - Chapter 10
Year 12 Maths A Textbook - Chapter 10
 
MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...
MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...
MIXTURES OF TRAINED REGRESSION CURVES MODELS FOR HANDWRITTEN ARABIC CHARACTER...
 
20120140506020
2012014050602020120140506020
20120140506020
 
Bmb12e ppt 1_3
Bmb12e ppt 1_3Bmb12e ppt 1_3
Bmb12e ppt 1_3
 
Correlation analysis ppt
Correlation analysis pptCorrelation analysis ppt
Correlation analysis ppt
 
Mathematical modeling
Mathematical modelingMathematical modeling
Mathematical modeling
 
Bayesian Estimation for Missing Values in Latin Square Design
Bayesian Estimation for Missing Values in Latin Square DesignBayesian Estimation for Missing Values in Latin Square Design
Bayesian Estimation for Missing Values in Latin Square Design
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Impact of road accident on Bangladesh's economy
Impact of road accident on Bangladesh's economyImpact of road accident on Bangladesh's economy
Impact of road accident on Bangladesh's economy
 
Numerical simulation of marangoni driven boundary layer flow over a flat plat...
Numerical simulation of marangoni driven boundary layer flow over a flat plat...Numerical simulation of marangoni driven boundary layer flow over a flat plat...
Numerical simulation of marangoni driven boundary layer flow over a flat plat...
 
Measure of Dispersion (statistics)
Measure of Dispersion (statistics)Measure of Dispersion (statistics)
Measure of Dispersion (statistics)
 
Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...
Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...
Solving Transportation Problems with Hexagonal Fuzzy Numbers Using Best Candi...
 
An alternative approach to estimation of population
An alternative approach to estimation of populationAn alternative approach to estimation of population
An alternative approach to estimation of population
 
1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.
1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.
1 ESO - UNIT 11 - GRAPHS AND TABLES. PROBABILITY.
 
PROJECT EVERYTHNG
PROJECT EVERYTHNGPROJECT EVERYTHNG
PROJECT EVERYTHNG
 
Reg
RegReg
Reg
 

Similar to Final Report

Curve_Fitting.pdf
Curve_Fitting.pdfCurve_Fitting.pdf
Curve_Fitting.pdf
Irfan Khan
 
assignment on business environment of abc
assignment on business environment of abcassignment on business environment of abc
assignment on business environment of abc
MdJahangirAlam877557
 
Regression
RegressionRegression
InstructionsPlease answer the following question in a minimum.docx
InstructionsPlease answer the following question in a minimum.docxInstructionsPlease answer the following question in a minimum.docx
InstructionsPlease answer the following question in a minimum.docx
dirkrplav
 
Data mining
Data miningData mining
Data mining
Scilab
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regressionKhalid Aziz
 
Frequency Tables - Statistics
Frequency Tables - StatisticsFrequency Tables - Statistics
Frequency Tables - Statisticsmscartersmaths
 
Lecture-2 Descriptive Statistics-Box Plot Descriptive Measures.pdf
Lecture-2 Descriptive Statistics-Box Plot  Descriptive Measures.pdfLecture-2 Descriptive Statistics-Box Plot  Descriptive Measures.pdf
Lecture-2 Descriptive Statistics-Box Plot Descriptive Measures.pdf
AzanHaider1
 
Basic Concepts of Statistics - Lecture Notes
Basic Concepts of Statistics - Lecture NotesBasic Concepts of Statistics - Lecture Notes
Basic Concepts of Statistics - Lecture Notes
Dr. Nirav Vyas
 
Regression and Classification with R
Regression and Classification with RRegression and Classification with R
Regression and Classification with R
Yanchang Zhao
 
Session 03 Probability & sampling Distribution NEW.pptx
Session 03 Probability & sampling Distribution NEW.pptxSession 03 Probability & sampling Distribution NEW.pptx
Session 03 Probability & sampling Distribution NEW.pptx
Muneer Akhter
 
PATTEM JAGADESH_21mt0269_research proposal presentation.pptx
PATTEM JAGADESH_21mt0269_research proposal presentation.pptxPATTEM JAGADESH_21mt0269_research proposal presentation.pptx
PATTEM JAGADESH_21mt0269_research proposal presentation.pptx
PATTEMJAGADESH
 
Test of Random Walk Hypothesis: Before & After the 2007-09 Crisis
Test of Random Walk Hypothesis: Before & After the 2007-09 CrisisTest of Random Walk Hypothesis: Before & After the 2007-09 Crisis
Test of Random Walk Hypothesis: Before & After the 2007-09 Crisis
Gabriel Koh
 
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docxTSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
nanamonkton
 
Comparing the methods of Estimation of Three-Parameter Weibull distribution
Comparing the methods of Estimation of Three-Parameter Weibull distributionComparing the methods of Estimation of Three-Parameter Weibull distribution
Comparing the methods of Estimation of Three-Parameter Weibull distribution
IOSRJM
 
Materi_Business_Intelligence_1.pdf
Materi_Business_Intelligence_1.pdfMateri_Business_Intelligence_1.pdf
Materi_Business_Intelligence_1.pdf
Hasan Dwi Cahyono
 
Finding the Extreme Values with some Application of Derivatives
Finding the Extreme Values with some Application of DerivativesFinding the Extreme Values with some Application of Derivatives
Finding the Extreme Values with some Application of Derivatives
ijtsrd
 
Ijmet 10 01_192
Ijmet 10 01_192Ijmet 10 01_192
Ijmet 10 01_192
IAEME Publication
 

Similar to Final Report (20)

Curve_Fitting.pdf
Curve_Fitting.pdfCurve_Fitting.pdf
Curve_Fitting.pdf
 
assignment on business environment of abc
assignment on business environment of abcassignment on business environment of abc
assignment on business environment of abc
 
Regression
RegressionRegression
Regression
 
InstructionsPlease answer the following question in a minimum.docx
InstructionsPlease answer the following question in a minimum.docxInstructionsPlease answer the following question in a minimum.docx
InstructionsPlease answer the following question in a minimum.docx
 
Data mining
Data miningData mining
Data mining
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Frequency Tables - Statistics
Frequency Tables - StatisticsFrequency Tables - Statistics
Frequency Tables - Statistics
 
Lecture-2 Descriptive Statistics-Box Plot Descriptive Measures.pdf
Lecture-2 Descriptive Statistics-Box Plot  Descriptive Measures.pdfLecture-2 Descriptive Statistics-Box Plot  Descriptive Measures.pdf
Lecture-2 Descriptive Statistics-Box Plot Descriptive Measures.pdf
 
Module4
Module4Module4
Module4
 
Basic Concepts of Statistics - Lecture Notes
Basic Concepts of Statistics - Lecture NotesBasic Concepts of Statistics - Lecture Notes
Basic Concepts of Statistics - Lecture Notes
 
Regression and Classification with R
Regression and Classification with RRegression and Classification with R
Regression and Classification with R
 
Session 03 Probability & sampling Distribution NEW.pptx
Session 03 Probability & sampling Distribution NEW.pptxSession 03 Probability & sampling Distribution NEW.pptx
Session 03 Probability & sampling Distribution NEW.pptx
 
PATTEM JAGADESH_21mt0269_research proposal presentation.pptx
PATTEM JAGADESH_21mt0269_research proposal presentation.pptxPATTEM JAGADESH_21mt0269_research proposal presentation.pptx
PATTEM JAGADESH_21mt0269_research proposal presentation.pptx
 
Statistics for entrepreneurs
Statistics for entrepreneurs Statistics for entrepreneurs
Statistics for entrepreneurs
 
Test of Random Walk Hypothesis: Before & After the 2007-09 Crisis
Test of Random Walk Hypothesis: Before & After the 2007-09 CrisisTest of Random Walk Hypothesis: Before & After the 2007-09 Crisis
Test of Random Walk Hypothesis: Before & After the 2007-09 Crisis
 
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docxTSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
 
Comparing the methods of Estimation of Three-Parameter Weibull distribution
Comparing the methods of Estimation of Three-Parameter Weibull distributionComparing the methods of Estimation of Three-Parameter Weibull distribution
Comparing the methods of Estimation of Three-Parameter Weibull distribution
 
Materi_Business_Intelligence_1.pdf
Materi_Business_Intelligence_1.pdfMateri_Business_Intelligence_1.pdf
Materi_Business_Intelligence_1.pdf
 
Finding the Extreme Values with some Application of Derivatives
Finding the Extreme Values with some Application of DerivativesFinding the Extreme Values with some Application of Derivatives
Finding the Extreme Values with some Application of Derivatives
 
Ijmet 10 01_192
Ijmet 10 01_192Ijmet 10 01_192
Ijmet 10 01_192
 

Final Report

  • 1. Running head: TIME SERIES ANALYSIS OF GDP DATA 1 Time Series Analysis of Gross Domestic Product Data Brian G. Wu Oakland University Competency Project for M.S. Applied Statistics Advisor: Dorin Drignei Committee Members: Gary McDonald, Theophilus Ogunyemi, and Xianggui Qu April 1, 2016
  • 2. TIME SERIES ANALYSIS OF GDP DATA 2 Abstract The gross domestic product, or GDP, is a leading measurement of a nation’s production. This report investigates the GDP of the United States of America, the United Kingdom, and Australia. The GDP of all three countries increase exponentially, but deviations from the trend occur. This report begins with a discussion of the definition including a comparison of Gross National Product (GNP) and Gross Domestic Product (GDP) and the three methods of calculating the GDP such as the production, expenditure, and income approaches. Following is a discussion of the statistical methods used to analyze the GDP of the three countries. Using a time series analysis, the nonstationary data with an exponential trend is differenced resulting in a more stationary data. Then, a multivariate AR(2) model and three univariate AR(2) models are fitted to the data followed by analysis of the residuals and predictions. With residuals passing the tests, the report shows the predicted future GDP along with 95% prediction bounds for the next five years. The results are obtained and compared using three statistical programs: ITSM, R, and SAS. Keywords: GDP, Time Series, Statistics
  • 3. TIME SERIES ANALYSIS OF GDP DATA 3 Contents Abstract............................................................................................................................... 2 Introduction......................................................................................................................... 4 A Statistical Analysis of the GDP ....................................................................................... 6 ARMA Model ................................................................................................................. 6 Predictions....................................................................................................................... 6 Results............................................................................................................................. 7 Conclusion ........................................................................................................................ 10 References......................................................................................................................... 12 Tables ................................................................................................................................ 13 Figures............................................................................................................................... 20 Codes................................................................................................................................. 41 R Code .......................................................................................................................... 41 SAS Code...................................................................................................................... 41
  • 4. TIME SERIES ANALYSIS OF GDP DATA 4 Introduction The Gross Domestic Product is one of the leading measurements of the economy. Ferrara describes the GDP as “the most publicized and politically significant” (Indicator - Gross Domestic Product, 2013). One of the countries with the largest economy is the United States of America, which shifted from Gross National Product, or GNP, to GDP. While both GDP and GNP measure in terms of produced goods and services, their coverage differs. According to the Survey of Current Business article, the GDP “covers the goods and services produced by labor and property located in the United States” while the GNP “covers the goods and services produced by labor and property supplied by U.S. residents” (Gross Domestic Product as a Measure of U.S. Production, 1991). In others words, GDP covers anything located within the U.S. while GNP covers anything by U.S. citizens, regardless whether the citizens reside in the U.S. or not. There are three different ways to calculate the GDP, theoretically leading to the same results, but experimentally leading to different results due to rounding error. The first is the production approach. Ferrera describes it as “the final output, minus the value of intermediate consumption” (Indicator - Gross Domestic Product, 2013). In the second approach, which is the expenditure approach, 𝑌 = 𝐶 + 𝐼 + 𝐺 + (𝑋 − 𝑀), where 𝑌 is the GDP, 𝐶 is the consumption, 𝐼 is the investment, 𝐺 is the government expenditures, 𝑋 is the exports, 𝑀 is the imports. “To this sum,” says Ferrera, referring to every household’s consumption of goods and services, “statisticians add gross capital formation, which is a nation’s investment, minus its disposal of assets to assist in capital formation or produce inventories of goods or valuables” (Indicator - Gross Domestic Product, 2013). The final approach is the income approach. According to Ferrera, this means summing up the compensation of employees, gross operating surplus, and
  • 5. TIME SERIES ANALYSIS OF GDP DATA 5 mixed income as the subtotal, then subtracting any subsidies from productions or imports to obtain the GDP (Indicator - Gross Domestic Product, 2013). Table 1 displays the actual GDP (in millions of 2009 dollars) from 1920 through 2013 for the United States (Johnston & Williamson, 2016), the United Kingdom (Williamson, 2016), and Australia (Hutchinson, 2016), each obtained from MeasuringWorth. Figure 1, Figure 2, and Figure 3 show a plot of the GDP for the United States, the United Kingdom, and Australia, respectively, generated from Microsoft Excel. Notice that all three plots follow an exponential trend. However, each of the three plots show a hump from 1940 through 1945. The GDP was higher than expected during that time because of World War II. Around 2008, the United States and the United Kingdom suffered a recession, which explains the dip in the plots. However, the recession apparently did not affect Australia as much, as there does not seem to be a dip in the plot for Australia’s GDP. To analyze and predict the future GDP, time series analysis has been used. We compare our analysis with three statistical packages. ITSM (Interactive Time Series Modeling) is a time series software that comes with Introduction to Time Series and Forecasting by Brockwell and Davis. R functions such as “ts”, “diff”, and “ar” are key functions used to create a time series object, difference the data, and fit autoregressive models, respectively. SAS procedures such as ARIMA and VARMAX easily fit autoregressive moving-average models to univariate and multivariate time series data, respectively, along with predictions of future values. The methods are further discussed in the following sections.
  • 6. TIME SERIES ANALYSIS OF GDP DATA 6 A Statistical Analysis of the GDP ARMA Model {𝑋𝑡} is an ARMA(𝑝, 𝑞) process if {𝑋𝑡} is stationary and if for every 𝑡, 𝑋𝑡 − 𝜙1 𝑋𝑡−1 − ⋯ − 𝜙 𝑝 𝑋𝑡−𝑝 = 𝑍𝑡 + 𝜃1 𝑍𝑡−1 + ⋯ + 𝜃𝑞 𝑍𝑡−𝑞, where {𝑍𝑡}~𝑊𝑁(0, 𝜎2 ), or 𝜙(𝐵)𝑋𝑡 = 𝜃(𝐵)𝑍𝑡, {𝑍𝑡}~𝑊𝑁(0, 𝜎2 ), where 𝜙(𝑧) ≔ 1 − 𝜙1 𝑧 − ⋯ − 𝜙 𝑝 𝑧 𝑝 and 𝜃(𝑧) ≔ 1 + 𝜃1 𝑧 + ⋯ + 𝜃 𝑞 𝑧 𝑞 are polynomials and 𝐵 denotes the backward shift operator (Brockwell & Davis, 2002). The univariate ARMA model can easily be extended to the multivariate case. {𝐗 𝑡} is an ARMA(𝑝, 𝑞) process if {𝐗 𝑡} is stationary and if for every 𝑡, 𝐗 𝑡 − Φ1 𝐗 𝑡−1 − ⋯ − Φ 𝑝 𝐗 𝑡−𝑝 = 𝐙 𝑡 + Θ1 𝐙 𝑡−1 + ⋯ + Θ 𝑞 𝐙 𝑡−𝑞, where {𝐙 𝑡}~𝑊𝑁(𝟎, Σ), or Φ(𝐵)𝑿 𝑡 = Θ(𝐵)𝐙 𝑡, {𝐙 𝑡}~𝑊𝑁(𝟎, Σ), where Φ(𝑧) ≔ 𝐼 − Φ1 𝑧 − ⋯ − Φ 𝑝 𝑧 𝑝 and Θ(𝑧) ≔ 𝐼 + Θ1 𝑧 + ⋯ + Θ 𝑞 𝑧 𝑞 are matrix-valued polynomials, 𝐼 is the 𝑚 × 𝑚 identity matrix, and 𝐵 denotes the backward shift operator (Brockwell & Davis, 2002). The AICC is defined as AICC = −2 ln 𝐿(Φ1, … , Φ 𝑝, Σ) + 2(𝑝𝑚2+1)𝑚𝑛 𝑛𝑚−𝑝𝑚2−2 (Brockwell & Davis, 2002). This measure allows us to choose the best model achieving minimum AICC among a set of competing models. Predictions Predicting the future values is important. The best ℎ-step linear predictor is denoted by 𝑃𝑛 𝑋 𝑛+ℎ = 𝜇 + ∑ 𝑎𝑖(𝑋 𝑛+1−𝑖 − 𝜇)𝑛 𝑖=1 where 𝐚 𝑛 = (𝑎1, … , 𝑎 𝑛)′ satisfies Γ𝑛 𝐚 𝑛 = 𝜸 𝑛(ℎ), Γ𝑛 = [𝛾(𝑖 − 𝑗)]𝑖,𝑗=1 𝑛 , and 𝜸 𝑛(ℎ) = (𝛾𝑛(ℎ), 𝛾𝑛(ℎ + 1), … , 𝛾𝑛(ℎ + 𝑛 − 1))′. In the multivariate case, let 𝑃𝑛 𝐗 𝑛+ℎ be the best ℎ-step linear predictor based on all the components of 𝐗1, … , 𝐗 𝑛. Going back to the multivariate AR(𝑝) process defined by 𝐗 𝑡 = Φ1 𝐗 𝑡−1 + ⋯ + Φ 𝑝 𝐗 𝑡−𝑝 + 𝐙 𝑡, {𝐙 𝑡}~𝑊𝑁(𝟎, Σ), one applies the linear prediction operator 𝑃𝑛 to
  • 7. TIME SERIES ANALYSIS OF GDP DATA 7 get 𝑃𝑛 𝐗 𝑛+ℎ = Φ1 𝑃𝑛 𝐗 𝑛+ℎ−1 + ⋯ + Φ 𝑝 𝑃𝑛 𝐗 𝑛+ℎ−𝑝 (Brockwell & Davis, 2002). The predictions 𝑃𝑛 𝐗 𝑛+ℎ are obtained recursively with respect to ℎ. Prediction formulas for undifferenced multivariate time series are given in Brockwell and Davis page 252 (Brockwell & Davis, 2002). To compute the prediction error covariance matrix, let 𝐗 𝑛+ℎ = ∑ Ψ𝑗 𝐙 𝑛+ℎ−𝑗 ∞ 𝑗=0 , where we can compute Ψ𝑗 recursively from Ψ𝑗 = Θ𝑗 + ∑ Φ 𝑘Ψ𝑗−𝑘 ∞ 𝑘=1 , 𝑗 = 0,1, … with 𝑞 = 0. We define Θ0 = 𝐼, Θ𝑗 = 0 for 𝑗 > 𝑞, Φ𝑗 = 0 for 𝑗 > 𝑝, and Ψ𝑗 = 0 for 𝑗 < 0. Then, for 𝑛 ≥ 𝑝, 𝑃𝑛 𝐗 𝑛+ℎ = ∑ Ψ𝑗 𝐙 𝑛+ℎ−𝑗 ∞ 𝑗=ℎ . Then, 𝐗 𝑛+ℎ − 𝑃𝑛 𝐗 𝑛+ℎ = ∑ Ψ𝑗 𝐙 𝑛+ℎ−𝑗 ℎ−1 𝑗=0 is the h-step prediction error with covariance matrix 𝐸[(𝐗 𝑛+ℎ − 𝑃𝑛 𝐗 𝑛+ℎ)(𝐗 𝑛+ℎ − 𝑃𝑛 𝐗 𝑛+ℎ)′] = ∑ Ψ𝑗ΣΨ𝑗 ′ℎ−1 𝑗=0 , 𝑛 ≥ 𝑝. Results To do a multivariate time series analysis of the three GDPs, each of the three series must have equal number of observations and values between 1920 and 2013 were retained. Upon initial glance in the original plots in Figures 1, 2, and 3, there seems to be a nonstationary trend. The first step is to difference the data to render them stationary. In a stationary time series, the data has constant mean and variance over time without any trend. The differenced data for the GDP for the United States, the United Kingdom, and Australia are shown in Figures 4, 5, and 6, respectively, obtained from R and plotted using Excel and they look more stationary i.e. constant mean, variance, and correlation depends on distance between time points. Figure 7 shows the sample auto- and cross-correlations 𝜌̂𝑖𝑗𝑘(ℎ), 𝑖, 𝑗, 𝑘 = 1,2,3, generated from ITSM. For each of the autocorrelation plots, at least one of the autocorrelations at lags other than zero fall outside of the upper bound, suggesting the data values are correlated to both within and between time series. For the GDP data, using the Yule-Walker method, I had ITSM generate an AR model of order less than or equal to 10 with the least AICC. The result is an AR model of order two, which
  • 8. TIME SERIES ANALYSIS OF GDP DATA 8 sets 𝑝 = 2 and 𝑞 = 0, giving the equation 𝐗 𝑡 = Φ1 𝐗 𝑡−1 + Φ2 𝐗2 + 𝐙 𝑡, {𝐙 𝑡}~𝑊𝑁(𝟎, Σ) with parameters 𝜙0 = [ 50234.8 6180.46 1865.64 ], Φ̂1 = [ 0.416947 0.931785 0.312629 0.027292 0.288190 0.170756 0.022081 0.076634 0.357414 ], Φ̂2 [ −0.149708 0.164620 3.144659 −0.004624 −0.190773 0.123329 −0.016030 0.077330 0.278963 ], Σ̂ = [ 1.97495 × 1010 1.64800 × 109 3.90519 × 108 1.64800 × 109 2.90734 × 108 4.66759 × 107 3.90819 × 108 4.66759 × 107 7.10182 × 107 ], with AICC = 6454.97. My results with R, shown in Table 2, is identical to my results with ITSM, shown in Table 3, with AICC of essentially zero, and different values for Σ̂. However, my results from SAS with AICC = 5849.45, shown in Table 4, has slightly different values from R and ITSM for all the parameters. Using ITSM, the residual plots for the United States, and United Kingdom, and Australia are shown in Series 1, 2, and 3, respectively, of Figure 8. The residuals do not seem to have an apparent pattern, passing the white-noise assumption and making it feasible to make predictions. At the same time, ITSM also plots the residuals autocorrelation function for each pairs of data, shown in Figure 9. Since the residual vectors 𝐙̂ 𝑡 are nearly all within the confidence bounds, the model seems to be a good fit. While this analysis works with ITSM and R with identical graphs, there is no simple code for residual analysis yet for SAS. None of the three packages provide a formal white-noise test for multivariate time series models. Assume that the model for the GDP fitted to the multivariate series {𝐘𝑡, 𝑡 = 0, … ,93} is correct, i.e., that Φ(𝐵)𝐗 𝑡 = 𝐙 𝑡, 𝐙 𝑡~WN(𝟎, Σ̂), where 𝐗 𝑡 = (1 − 𝐵)𝐘𝑡 − (159570,15535,14364)′, 𝑡 = 1, … ,93, Φ(𝑧) ≔ 𝐼 − Φ̂1 𝐵 − Φ̂2 𝐵2 , and Φ̂1, Φ̂2, Σ̂ are the matrices found in Table 4. From ITSM, the one- and two-step predictors of 𝐘94 and 𝐘95 are 𝑃̃93 𝐘94 = [ 1.59 × 107 1.68 × 106 1.46 × 106 ] and 𝑃̃93 𝐘95 = [ 1.61 × 107 1.71 × 106 1.46 × 106 ]. ITSM also easily calculates the predicted
  • 9. TIME SERIES ANALYSIS OF GDP DATA 9 GDP from 2014 through 2023 along with its 95% prediction limits, shown in Figure 10. As shown in Figures 11, 12, and 13 for the United States, the United Kingdom, and Australia, respectively, the actual GDP is within the prediction limits from 2009 to 2013 with the exception of the 2013 Australia GDP, which is above the upper limit. SAS automatically gives the future GDP, its standard error, and its 95% prediction bounds for years 2014 through 2023, shown in Table 5 and Figures 14, 15, and 16 for the United States, the United Kingdom, and Australia, respectively. As it turns out, the 2014 GDP for U.S. and U.K. of 15,961,700 and 1,705,000, fit within their respective bounds of (15,594,673, 16,166,143) and (1,651,906, 1,719,292). Assuming the model is correct, the GDP apparently increases after 2015 while the prediction bounds widen year after year. However, if I took out the last five data points (2009 through 2013) for all three countries, refitted the model, and computed the predicted GDP, my actual data points are not all within the predicted bounds. This is because the multivariate AR(2) model does not take into account the 2008 recession when the data points are removed. This is shown in Figures 17, 18, and 19 for the United States, the United Kingdom, and Australia, respectively. I now compare my multivariate AR(2) results to my results for three separate univariate AR(2) results using SAS. The differenced data for each of the three univariate data along with the correlation plots, shown in Figures 20, 21, and 22 for the United States, the United Kingdom, and Australia, respectively, are similar to the differenced data for the multivariate data. My parameter estimates are shown in Table 6 with AIC of 2489.653, 2098.003, and 1969.965 for the United States, the United Kingdom, and Australia, respectively. The residual plots for the univariate models along with their corresponding correlation plots obtained with SAS are shown in Figures 23, 24, and 25 for the United States, the United
  • 10. TIME SERIES ANALYSIS OF GDP DATA 10 Kingdom, and Australia, respectively. The residuals look mostly uncorrelated and in the white- noise probability plot in the bottom right-hand corner of each of the three figures, much of the bars are above 0.05, making the models of adequate fit. Assuming that the model for the GDP fitted to their respective univariate series is correct, SAS easily calculates the future GDP, its standard error, and its 95% prediction bounds for years 2014 through 2023, shown in Table 7 and Figures 26, 27, and 28 for the United States, the United Kingdom, and Australia, respectively. Because the univariate models do not take correlation between the different countries’ GDP into account, the predictions reported by the univariate models have wider bounds than those reported by the multivariate model. Additionally, the multivariate model predicts higher future GDP than the univariate models do for the United States and the United Kingdom, but the opposite for Australia. However, if I took out the last five data points (2009 through 2013) for all three countries, refitted the model, and computed the predicted GDP, I noticed that for all three countries, at least one point is out of bounds, as shown in Figures 29, 30, and 31. A potential line of further analysis is to difference twice each series. However, this shortens further the sample size by one observation vector and the multivariate AR model has many parameters to be estimated. The estimation becomes less precise with fewer data. Conclusion The multivariate AR(2) model better-fits the differenced GDP data of the United States, the United Kingdom, and Australia from 1920 through 2013 than the separate univariate AR(2) models do because the multivariate model takes into account the correlation between the different countries’ GDP. While the residuals shown in the residual plots appear uncorrelated and compatible with the hypothesis of white noise, the multivariate model reports substantially
  • 11. TIME SERIES ANALYSIS OF GDP DATA 11 narrower prediction bounds than the univariate models do for the predicted 2014 through 2023 GDP. However, the plots show that the GDP for all three countries is expected to increase, but with the prediction limits increasing for each successive prediction, it is difficult to make predictions for the GDP further into the future. Additionally, variations from the model trend are not all by chance, as assignable causes such as war or recessions can deviate the actual GDP from the predicted GDP.
  • 12. TIME SERIES ANALYSIS OF GDP DATA 12 References Brockwell, P. J., & Davis, R. A. (2002). Introduction to Time Series and Forecasting. Springer Science & Business Media. Gross Domestic Product as a Measure of U.S. Production. (1991, August). Survey of Current Business, 8. Retrieved February 26, 2016, from http://www.bea.gov/scb/pdf/national/nipa/1991/0891od.pdf Hutchinson, D. (2016). What Was the Australian GDP or CPI Then? Retrieved January 12, 2016, from MeasuringWorth: www.measuringworth.com/datasets/australiadata/ Indicator - Gross Domestic Product. (2013). In M. H. Ferrara (Ed.), Gale Business Insights Handbook of Investment Research (pp. 41-52). Detroit: Gale, Cengage Learning. Retrieved February 24, 2016, from http://go.galegroup.com.huaryu.kl.oakland.edu/ps/i.do?id=GALE|9781414499345&v=2.1 &u=lom_oaklandu&it=aboutBook&p=GVRL&sw=w Johnston, L., & Williamson, S. H. (2016). What Was the U.S. GDP Then? Retrieved January 12, 2016, from MeasuringWorth: http://www.measuringworth.org/usgdp/ Williamson, S. H. (2016). What Was the U.K. GDP Then? Retrieved January 12, 2016, from MeasuringWorth: http://www.measuringworth.com/ukgdp/
  • 13. TIME SERIES ANALYSIS OF GDP DATA 13 Tables Table 1 Original Data (Hutchinson, 2016), (Johnston & Williamson, 2016), and (Williamson, 2016) Year U.S. GDP U.K. GDP Australia G.D.P. 1920 743,030 210,661 62,220 1921 725,995 183,182 70,722 1922 766,310 192,907 74,444 1923 867,213 198,622 76,972 1924 893,916 207,997 79,980 1925 914,914 215,316 85,187 1926 974,698 208,598 82,692 1927 984,111 224,641 86,181 1928 995,390 226,646 85,387 1929 1,056,600 233,113 83,749 1930 966,700 231,258 84,948 1931 904,800 220,530 76,972 1932 788,200 220,680 78,257 1933 778,300 227,699 82,973 1934 862,200 241,284 86,070 1935 939,000 250,208 87,985 1936 1,060,500 262,139 92,457 1937 1,114,600 271,313 95,442 1938 1,077,700 273,419 101,571 1939 1,163,600 285,451 97,524 1940 1,266,100 313,775 102,865 1941 1,490,300 341,097 110,565 1942 1,771,800 347,213 126,794 1943 2,073,700 353,179 137,835 1944 2,239,400 337,638 136,182 1945 2,217,800 322,197 128,333 1946 1,960,900 314,276 123,010 1947 1,939,400 310,266 119,303 1948 2,020,000 320,242 128,952 1949 2,008,900 331,081 135,329 1950 2,184,000 342,028 146,422 1951 2,360,000 354,899 154,670 1952 2,456,100 360,586 160,071 1953 2,571,400 380,500 158,681 1954 2,556,900 396,877 168,492 1955 2,739,000 412,072 178,442 … … … … 2013 15,583,300 1,655,450 1,398,080
  • 14. TIME SERIES ANALYSIS OF GDP DATA 14 Table 2 Multivariate AR Coefficient Estimates from R Lag Variable U.S. U.K. Australia 0 U.S. 50,234.50 - - U.K. - 6,180.46 - Australia - - 1,865.64 1 U.S. 0.4170 0.9318 0.3126 U.K. 0.0273 0.2882 0.1708 Australia 0.0221 0.0766 0.3574 2 U.S. -0.1497 0.1646 0.3145 U.K. -0.0046 -0.1908 0.1233 Australia -0.0160 0.0773 0.2790 Variance U.S. 2.187E+10 1.825E+09 4.324E+08 U.K. 1.825E+09 3.219E+08 5.168E+07 Australia 4.324E+08 5.168E+07 7.863E+07
  • 15. TIME SERIES ANALYSIS OF GDP DATA 15 Table 3 Multivariate AR Coefficient Estimates from ITSM Lag Variable U.S. U.K. Australia 0 U.S. 50,234.80 - - U.K. - 6,180.46 - Australia - - 1,865.64 1 U.S. 0.4169 0.9318 0.3126 U.K. 0.0273 0.2882 0.1708 Australia 0.0221 0.0766 0.3574 2 U.S. -0.1497 0.1646 3.1447 U.K. -0.0046 -0.1908 0.1233 Australia -0.0160 0.0773 0.2790 White Noise Covariance Matrix U.S. 1.975E+10 1.648E+09 3.905E+08 U.K. 1.648E+09 2.907E+08 4.668E+07 Australia 3.908E+08 4.668E+07 7.102E+07
  • 16. TIME SERIES ANALYSIS OF GDP DATA 16 Table 4 Multivariate AR Coefficient Estimates from SAS Lag Variable U.S. U.K. Australia 0 U.S. 50,774.48 - - U.K. - 6,234.74 - Australia - - 1,773.37 1 U.S. 0.4068 0.9999 0.2241 U.K. 0.0254 0.3211 0.1715 Australia 0.0209 0.0836 0.3489 2 U.S. -0.1381 -0.0249 3.5959 U.K. -0.0035 -0.2187 0.1564 Australia -0.0145 0.0536 0.3317 White Noise Covariance Matrix U.S. 2.125E+10 1.713E+09 3.914E+08 U.K. 1.713E+09 2.955E+08 4.622E+07 Australia 3.914E+08 4.622E+07 7.476E+07
  • 17. TIME SERIES ANALYSIS OF GDP DATA 17 Table 5 Multivariate AR(2) Predictions Using SAS Variable Year Predicted Standard Error 95% Prediction Limits U.S. 2014 15,880,408 145,786 15,594,673 16,166,143 2015 16,177,375 262,106 15,663,657 16,691,092 2016 16,454,444 361,244 15,746,420 17,162,468 2017 16,718,136 454,572 15,827,191 17,609,082 2018 16,970,526 545,050 15,902,247 18,038,805 2019 17,213,037 634,050 15,970,321 18,455,752 2020 17,446,834 721,680 16,032,368 18,861,301 2021 17,673,073 807,707 16,089,996 19,256,150 2022 17,892,820 891,955 16,144,621 19,641,019 2023 18,106,985 974,323 16,197,347 20,016,623 U.K. 2014 1,685,599 17,191 1,651,906 1,719,292 2015 1,712,940 31,085 1,652,015 1,773,865 2016 1,738,024 41,647 1,656,397 1,819,650 2017 1,762,032 50,569 1,662,918 1,861,145 2018 1,785,315 59,093 1,669,495 1,901,135 2019 1,807,845 67,538 1,675,473 1,940,218 2020 1,829,643 75,841 1,680,998 1,978,288 2021 1,850,810 83,935 1,686,300 2,015,320 2022 1,871,451 91,815 1,691,497 2,051,405 2023 1,891,644 99,491 1,696,646 2,086,642 Australia 2014 1,429,523 8,646 1,412,576 1,446,470 2015 1,460,225 16,142 1,428,587 1,491,862 2016 1,488,921 24,959 1,440,002 1,537,840 2017 1,515,920 34,359 1,448,578 1,583,263 2018 1,541,461 43,988 1,455,246 1,627,676 2019 1,565,770 53,693 1,460,533 1,671,007 2020 1,589,022 63,381 1,464,797 1,713,246 2021 1,611,356 72,978 1,468,321 1,754,391 2022 1,632,896 82,432 1,471,333 1,794,460 2023 1,653,752 91,705 1,474,013 1,833,492
  • 18. TIME SERIES ANALYSIS OF GDP DATA 18 Table 6 Univariate AR Coefficient Estimates from SAS Country Lag Coefficient Variance U.S. 1 0.65398 24,020,000,000 2 0.12905 Intercept 159,572.8 U.K. 1 0.66183 357,100,000 2 0.01682 Intercept 15,535.37 Australia 1 0.57638 89,023,459 2 0.34599 Intercept 14,364.09
  • 19. TIME SERIES ANALYSIS OF GDP DATA 19 Table 7 Univariate AR(2) Predictions Using SAS Variable Year Predicted Standard Error 95% Prediction Limits U.S. 2014 15,775,967 154,975 15,472,223 16,079,712 2015 15,931,482 299,532 15,344,409 16,518,554 2016 16,058,048 455,080 15,166,107 16,949,989 2017 16,160,889 613,949 14,957,572 17,364,206 2018 16,244,478 772,406 14,730,589 17,758,367 2019 16,312,415 928,172 14,493,231 18,131,599 2020 16,367,631 1,079,935 14,250,997 18,484,266 2021 16,412,509 1,226,978 14,007,676 18,817,341 2022 16,448,984 1,368,961 13,765,869 19,132,098 2023 16,478,629 1,505,788 13,527,338 19,429,919 U.K. 2014 1,673,572 18,897 1,636,534 1,710,609 2015 1,686,021 36,651 1,614,186 1,757,856 2016 1,694,565 54,251 1,588,234 1,800,896 2017 1,700,429 71,062 1,561,150 1,839,708 2018 1,704,454 86,859 1,534,214 1,874,694 2019 1,707,216 101,609 1,508,066 1,906,366 2020 1,709,112 115,365 1,483,001 1,935,223 2021 1,710,413 128,213 1,459,121 1,961,705 2022 1,711,306 140,247 1,436,428 1,986,185 2023 1,711,919 151,560 1,414,868 2,008,971 Australia 2014 1,433,265 9,435 1,414,772 1,451,758 2015 1,465,130 17,614 1,430,608 1,499,653 2016 1,495,671 27,618 1,441,540 1,549,801 2017 1,524,299 38,513 1,448,814 1,599,783 2018 1,551,366 50,244 1,452,890 1,649,842 2019 1,576,872 62,588 1,454,202 1,699,542 2020 1,600,938 75,435 1,453,088 1,748,789 2021 1,623,635 88,678 1,449,828 1,797,441 2022 1,645,043 102,236 1,444,665 1,845,421 2023 1,665,235 116,038 1,437,804 1,892,666
  • 20. TIME SERIES ANALYSIS OF GDP DATA 20 Figures Figure 1. United States GDP Figure 2. United Kingdom GDP - 2,000,000 4,000,000 6,000,000 8,000,000 10,000,000 12,000,000 14,000,000 16,000,000 18,000,000 1920 1923 1926 1929 1932 1935 1938 1941 1944 1947 1950 1953 1956 1959 1962 1965 1968 1971 1974 1977 1980 1983 1986 1989 1992 1995 1998 2001 2004 2007 2010 2013 - 200,000 400,000 600,000 800,000 1,000,000 1,200,000 1,400,000 1,600,000 1,800,000 1920 1923 1926 1929 1932 1935 1938 1941 1944 1947 1950 1953 1956 1959 1962 1965 1968 1971 1974 1977 1980 1983 1986 1989 1992 1995 1998 2001 2004 2007 2010 2013
  • 21. TIME SERIES ANALYSIS OF GDP DATA 21 Figure 3. Australia GDP Figure 4. Differenced Data for U.S. GDP Using R - 200,000 400,000 600,000 800,000 1,000,000 1,200,000 1,400,000 1,600,000 1920 1923 1926 1929 1932 1935 1938 1941 1944 1947 1950 1953 1956 1959 1962 1965 1968 1971 1974 1977 1980 1983 1986 1989 1992 1995 1998 2001 2004 2007 2010 2013 (600,000) (400,000) (200,000) - 200,000 400,000 600,000 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91
  • 22. TIME SERIES ANALYSIS OF GDP DATA 22 Figure 5. Differenced Data for U.K. GDP Using R Figure 6. Differenced Data for Australia GDP Using R (80,000) (60,000) (40,000) (20,000) - 20,000 40,000 60,000 80,000 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 (20,000) (10,000) - 10,000 20,000 30,000 40,000 50,000 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91
  • 23. TIME SERIES ANALYSIS OF GDP DATA 23 Figure 7. Autocorrelations for GDP Data Using ITSM Figure 8. Multivariate AR(2) Residuals Using ITSM -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series1 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series1x Series2 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series1x Series3 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series2 x Series1 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series2 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series2 x Series3 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series3 x Series1 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series3 x Series2 -1.00 -.80 -.60 -.40 -.20 .00 .20 .40 .60 .80 1.00 0 2 4 6 8 10 12 14 16 18 20 Series3 -6.00E+05 -4.00E+05 -2.00E+05 0.00E+00 2.00E+05 4.00E+05 10 20 30 40 50 60 70 80 90 Series 1 -8.00E+04 -6.00E+04 -4.00E+04 -2.00E+04 0.00E+00 2.00E+04 4.00E+04 10 20 30 40 50 60 70 80 90 Series 2 -2.00E+04 -1.00E+04 0.00E+00 1.00E+04 2.00E+04 10 20 30 40 50 60 70 80 90 Series 3
  • 24. TIME SERIES ANALYSIS OF GDP DATA 24 Figure 9. Multivariate AR(2) Residuals Autocorrelations Using ITSM Figure 10. Original Data with Multivariate AR(2) Predictions Using ITSM -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series1 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series1x Series2 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series1x Series3 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series2 x Series1 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series2 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series2 x Series3 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series3 x Series1 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series3 x Series2 -1.00 -.60 -.20 .20 .60 1.00 0 2 4 6 8 10 12 14 16 18 20 Series3 0.00E+00 2.00E+06 4.00E+06 6.00E+06 8.00E+06 1.00E+07 1.20E+07 1.40E+07 1.60E+07 1.80E+07 2.00E+07 0 20 40 60 80 100 Series 1 0.00E+00 2.00E+05 4.00E+05 6.00E+05 8.00E+05 1.00E+06 1.20E+06 1.40E+06 1.60E+06 1.80E+06 2.00E+06 2.20E+06 0 20 40 60 80 100 Series 2 0.00E+00 2.00E+05 4.00E+05 6.00E+05 8.00E+05 1.00E+06 1.20E+06 1.40E+06 1.60E+06 1.80E+06 0 20 40 60 80 100 Series 3
  • 25. TIME SERIES ANALYSIS OF GDP DATA 25 Figure 11. Multivariate AR(2) Predictions for U.S. GDP with Original Data Using ITSM Figure 12. Multivariate AR(2) Predictions for U.K. GDP with Original Data Using ITSM 12,500,000 13,000,000 13,500,000 14,000,000 14,500,000 15,000,000 15,500,000 16,000,000 16,500,000 2009 2010 2011 2012 2013 United States GDP Predicted GDP Lower Limit Upper Limit 1,350,000 1,400,000 1,450,000 1,500,000 1,550,000 1,600,000 1,650,000 1,700,000 1,750,000 2009 2010 2011 2012 2013 United Kingdom GDP Predicted GDP Lower Limit Upper Limit
  • 26. TIME SERIES ANALYSIS OF GDP DATA 26 Figure 13. Multivariate AR(2) Predictions for Australia GDP with Original Data Using ITSM Figure 14. Multivariate AR(2) Predictions for U.S. GDP Using SAS 1,100,000 1,150,000 1,200,000 1,250,000 1,300,000 1,350,000 1,400,000 1,450,000 2009 2010 2011 2012 2013 Australia GDP Predicted GDP Lower Limit Upper Limit 14,000,000 15,000,000 16,000,000 17,000,000 18,000,000 19,000,000 20,000,000 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 United States Predicted GDP Lower Limit Upper Limit
  • 27. TIME SERIES ANALYSIS OF GDP DATA 27 Figure 15. Multivariate AR(2) Predictions for U.K. GDP Using SAS Figure 16. Multivariate AR(2) Predictions for Australia GDP Using SAS 1,400,000 1,500,000 1,600,000 1,700,000 1,800,000 1,900,000 2,000,000 2,100,000 2,200,000 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 United Kingdom Predicted GDP Lower Limit Upper Limit 1,400,000 1,450,000 1,500,000 1,550,000 1,600,000 1,650,000 1,700,000 1,750,000 1,800,000 1,850,000 1,900,000 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 Australia Predicted GDP Lower Limit Upper Limit
  • 28. TIME SERIES ANALYSIS OF GDP DATA 28 Figure 17. Multivariate AR(2) Predictions for U.S. GDP with Original Data Using SAS Figure 18. Multivariate AR(2) Predictions for U.K. GDP with Original Data Using SAS 13,000,000 13,500,000 14,000,000 14,500,000 15,000,000 15,500,000 16,000,000 16,500,000 17,000,000 17,500,000 2009 2010 2011 2012 2013 United States GDP Predicted GDP Lower Limit Upper Limit - 200,000 400,000 600,000 800,000 1,000,000 1,200,000 1,400,000 1,600,000 1,800,000 2,000,000 2009 2010 2011 2012 2013 United Kingdom GDP Predicted GDP Lower Limit Upper Limit
  • 29. TIME SERIES ANALYSIS OF GDP DATA 29 Figure 19. Multivariate AR(2) Predictions for Australia GDP with Original Data Using SAS 1,150,000 1,200,000 1,250,000 1,300,000 1,350,000 1,400,000 1,450,000 1,500,000 2009 2010 2011 2012 2013 Australia GDP Predicted GDP Lower Limit Upper Limit
  • 30. TIME SERIES ANALYSIS OF GDP DATA 30 Figure 20. Differenced Data and Correlation Plots for U.S. GDP Using SAS TrendandCorrelationAnalysisfor us(1) 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 IACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 PACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 ACF -400000 -200000 0 200000 400000 600000 us(1) 0 20 40 60 80 100 Observation
  • 31. TIME SERIES ANALYSIS OF GDP DATA 31 Figure 21. Differenced Data and Correlation Plots for U.K. GDP Using SAS TrendandCorrelationAnalysisfor uk(1) 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 IACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 PACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 ACF -75000 -50000 -25000 0 25000 50000 uk(1) 0 20 40 60 80 100 Observation
  • 32. TIME SERIES ANALYSIS OF GDP DATA 32 Figure 22. Differenced Data and Correlation Plots for Australia GDP Using SAS TrendandCorrelationAnalysisfor au(1) 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 IACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 PACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 ACF 0 20000 40000 au(1) 0 20 40 60 80 100 Observation
  • 33. TIME SERIES ANALYSIS OF GDP DATA 33 Figure 23. Univariate AR(2) Residual Analysis of U.S. Data Using SAS Residual CorrelationDiagnosticsfor us(1) 0 5 10 15 Lag 1.0 .05 .001 WhiteNoiseProb 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 IACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 PACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 ACF
  • 34. TIME SERIES ANALYSIS OF GDP DATA 34 Figure 24. Univariate AR(2) Residual Analysis of U.K. Data Using SAS Residual CorrelationDiagnosticsfor uk(1) 0 5 10 15 Lag 1.0 .05 .001 WhiteNoiseProb 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 IACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 PACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 ACF
  • 35. TIME SERIES ANALYSIS OF GDP DATA 35 Figure 25. Univariate AR(2) Residual Analysis of Australia Data Using SAS Residual CorrelationDiagnosticsfor au(1) 0 5 10 15 Lag 1.0 .05 .001 WhiteNoiseProb 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 IACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 PACF 0 5 10 15 Lag -1.0 -0.5 0.0 0.5 1.0 ACF
  • 36. TIME SERIES ANALYSIS OF GDP DATA 36 Figure 26. Univariate AR(2) Predictions for U.S. GDP Using SAS 14000000 16000000 18000000 20000000 Forecast 96 98 100 102 104 Obs 95% ConfidenceLimitsPredicted Forecastsfor us
  • 37. TIME SERIES ANALYSIS OF GDP DATA 37 Figure 27. Univariate AR(2) Predictions for U.K. GDP Using SAS 1400000 1600000 1800000 2000000 Forecast 96 98 100 102 104 Obs 95% ConfidenceLimitsPredicted Forecastsfor uk
  • 38. TIME SERIES ANALYSIS OF GDP DATA 38 Figure 28. Univariate AR(2) Predictions for Australia GDP Using SAS 1400000 1500000 1600000 1700000 1800000 1900000 Forecast 96 98 100 102 104 Obs 95% ConfidenceLimitsPredicted Forecastsfor au
  • 39. TIME SERIES ANALYSIS OF GDP DATA 39 Figure 29. Univariate AR(2) Predictions for U.S. GDP with Original Data Using SAS Figure 30. Univariate AR(2) Predictions for U.K. GDP with Original Data Using SAS - 2,000,000 4,000,000 6,000,000 8,000,000 10,000,000 12,000,000 14,000,000 16,000,000 18,000,000 2009 2010 2011 2012 2013 United States GDP Predicted GDP Lower Limit Upper Limit - 200,000 400,000 600,000 800,000 1,000,000 1,200,000 1,400,000 1,600,000 1,800,000 2,000,000 2009 2010 2011 2012 2013 United Kingdom GDP Predicted GDP Lower Limit Upper Limit
  • 40. TIME SERIES ANALYSIS OF GDP DATA 40 Figure 31. Univariate AR(2) Predictions for Australia GDP with Original Data Using SAS - 200,000 400,000 600,000 800,000 1,000,000 1,200,000 1,400,000 1,600,000 1,800,000 2009 2010 2011 2012 2013 Australia GDP Predicted GDP Lower Limit Upper Limit
  • 41. TIME SERIES ANALYSIS OF GDP DATA 41 Codes R Code us=read.table(“USgdp.txt”) uk=read.table(“UKgdp.txt”) gdp=matrix(NA,dim(us)[1],2) gdp[,1]=us[,2] gdp[,2]=uk[,2] gdp[1:4,] write(t(gdp),ncol=2,file=“gdp.tsm”) au=read.table(“AUgdp.txt”) gdp=matrix(NA,dim(us)[1]-1,3) gdp[,1]=us[1:94,2] gdp[,2]=uk[1:94,2] gdp[,3]=au[,2] write(t(gdp),ncol=3,file=“gdp.tsm”) jj=ts(gdp) plot(jj) dljj=diff(jj,lag=1) plot(dljj,type=“l”) mod<-ar(dljj,se.fit=TRUE,n.ahead=10,order.max=10,dmean=T) mod$x.mean - (mod$ar[1,,]%*%mod$x.mean + mod$ar[2,,]%*%mod$x.mean) mod mod$aic
  • 42. TIME SERIES ANALYSIS OF GDP DATA 42 mod$resid acf(mod$resid[3:93,1]) plot(mod$resid) SAS Code /* *** GDP for U.S., U.K., and Australia: Multivariate Time Series Analysis*** */ title1 'GDP'; data mseries; input us uk au @@; date=_n_; datalines; 743030 210661 62220 725995 183182 70722 766310 192907 74444 867213 198622 76972 893916 207997 79980 914914 215316 85187 974698 208598 82692 984111 224641 86181 995390 226646 85387 1056600 233113 83749 966700 231258 84948 904800 220530 76972
  • 43. TIME SERIES ANALYSIS OF GDP DATA 43 788200 220680 78257 778300 227699 82973 862200 241284 86070 939000 250208 87985 1060500 262139 92457 1114600 271313 95442 1077700 273419 101571 1163600 285451 97524 1266100 313775 102865 1490300 341097 110565 1771800 347213 126794 2073700 353179 137835 2239400 337638 136182 2217800 322197 128333 1960900 314276 123010 1939400 310266 119303 2020000 320242 128952 2008900 331081 135329 2184000 342028 146422 2360000 354899 154670 2456100 360586 160071 2571400 380500 158681 2556900 396877 168492
  • 44. TIME SERIES ANALYSIS OF GDP DATA 44 2739000 412072 178442 2797400 418812 187246 2856300 426840 190761 2835300 432231 194983 3031000 449989 209422 3108700 478286 221887 3188100 491094 227831 3383100 496502 230455 3530400 520729 246051 3734000 549704 261852 3976700 561532 278964 4238900 570299 286224 4355200 586219 304730 4569000 618442 320385 4712500 630478 340542 4722000 647570 364861 4877600 670117 380311 5134300 698446 397036 5424100 744112 404447 5396000 725362 421566 5385400 714123 428524 5675400 735749 438089 5937000 754851 455237
  • 45. TIME SERIES ANALYSIS OF GDP DATA 45 6267200 786031 458022 6466200 814930 478157 6450400 797251 492571 6617700 790496 509488 6491300 806903 526186 6792000 840811 514212 7285000 859797 538401 7593800 890278 564633 7860500 918415 591257 8132600 969352 606221 8474500 1026870 640191 8786400 1052730 665675 8955000 1058380 689479 8948400 1045300 686939 9266600 1049970 690667 9521000 1077750 719249 9905400 1121130 748006 10174800 1149500 778094 10561000 1180150 808710 11034900 1210280 840094 11525900 1252770 878308 12065900 1292240 922142 12559700 1340950 956701
  • 46. TIME SERIES ANALYSIS OF GDP DATA 46 12682200 1376680 975028 12908800 1410440 1013353 13271100 1471090 1045576 13773500 1507190 1089337 14234200 1549490 1123048 14613800 1596630 1158094 14873700 1637430 1202064 14830400 1632000 1247030 14418700 1561650 1263590 14783800 1591490 1293380 15020600 1617680 1318684 15354600 1628340 1364595 15583300 1655450 1398080 symbol1 i=join v=dot; proc gplot data=mseries; plot us * date=1 / haxis=date; plot uk * date=1 / haxis=date; plot au * date=1 / haxis=date; run; proc varmax data=mseries;
  • 47. TIME SERIES ANALYSIS OF GDP DATA 47 model us uk au / p=2 lagmax=3 dif=(us(1) uk(1) au(1)) print=(estimates diagnose); output out=for lead=10; run; proc arima data=mseries; identify var=us(1) nlag=15; estimate p=2 noconstant method=ml; forecast out=b lead=10; run; proc arima data=mseries; identify var=uk(1) nlag=15; estimate p=2 noconstant method=ml; forecast out=b lead=10; run; proc arima data=mseries; identify var=au(1) nlag=15; estimate p=2 noconstant method=ml; forecast out=b lead=10; run; title1 'GDP';
  • 48. TIME SERIES ANALYSIS OF GDP DATA 48 data mmseries; input us uk au @@; date=_n_; datalines; 743030 210661 62220 725995 183182 70722 766310 192907 74444 867213 198622 76972 893916 207997 79980 914914 215316 85187 974698 208598 82692 984111 224641 86181 995390 226646 85387 1056600 233113 83749 966700 231258 84948 904800 220530 76972 788200 220680 78257 778300 227699 82973 862200 241284 86070 939000 250208 87985 1060500 262139 92457 1114600 271313 95442
  • 49. TIME SERIES ANALYSIS OF GDP DATA 49 1077700 273419 101571 1163600 285451 97524 1266100 313775 102865 1490300 341097 110565 1771800 347213 126794 2073700 353179 137835 2239400 337638 136182 2217800 322197 128333 1960900 314276 123010 1939400 310266 119303 2020000 320242 128952 2008900 331081 135329 2184000 342028 146422 2360000 354899 154670 2456100 360586 160071 2571400 380500 158681 2556900 396877 168492 2739000 412072 178442 2797400 418812 187246 2856300 426840 190761 2835300 432231 194983 3031000 449989 209422 3108700 478286 221887
  • 50. TIME SERIES ANALYSIS OF GDP DATA 50 3188100 491094 227831 3383100 496502 230455 3530400 520729 246051 3734000 549704 261852 3976700 561532 278964 4238900 570299 286224 4355200 586219 304730 4569000 618442 320385 4712500 630478 340542 4722000 647570 364861 4877600 670117 380311 5134300 698446 397036 5424100 744112 404447 5396000 725362 421566 5385400 714123 428524 5675400 735749 438089 5937000 754851 455237 6267200 786031 458022 6466200 814930 478157 6450400 797251 492571 6617700 790496 509488 6491300 806903 526186 6792000 840811 514212
  • 51. TIME SERIES ANALYSIS OF GDP DATA 51 7285000 859797 538401 7593800 890278 564633 7860500 918415 591257 8132600 969352 606221 8474500 1026870 640191 8786400 1052730 665675 8955000 1058380 689479 8948400 1045300 686939 9266600 1049970 690667 9521000 1077750 719249 9905400 1121130 748006 10174800 1149500 778094 10561000 1180150 808710 11034900 1210280 840094 11525900 1252770 878308 12065900 1292240 922142 12559700 1340950 956701 12682200 1376680 975028 12908800 1410440 1013353 13271100 1471090 1045576 13773500 1507190 1089337 14234200 1549490 1123048 14613800 1596630 1158094
  • 52. TIME SERIES ANALYSIS OF GDP DATA 52 14873700 1637430 1202064 14830400 1632000 1247030 symbol1 i=join v=dot; proc gplot data=mmseries; plot us * date=1 / haxis=date; plot uk * date=1 / haxis=date; plot au * date=1 / haxis=date; run; proc varmax data=mmseries; model us uk au / p=2 lagmax=3 dif=(us(1) uk(1) au(1)) print=(estimates diagnose); output out=for lead=5; run; proc arima data=mmseries; identify var=us(1) nlag=15; estimate p=2 noconstant method=ml; forecast out=b lead=5; run;
  • 53. TIME SERIES ANALYSIS OF GDP DATA 53 proc arima data=mmseries; identify var=uk(1) nlag=15; estimate p=2 noconstant method=ml; forecast out=b lead=5; run; proc arima data=mmseries; identify var=au(1) nlag=15; estimate p=2 noconstant method=ml; forecast out=b lead=5; run;