Introduction

We determine whether to transform it using logarithm, plot the original and transformed time series, for each time series here.

Category(A)

Real Gross Private Domestic Investment

Original

library(Quandl)
library(forecast)
library(urca)
Quandl.api_key("3fnnc4EE2uzFb1a44mAQ")
RGPI <- Quandl("FRED/GPDIC1", type="zoo")

Plot Original

plot(RGPI, type= "l",xlab= "Years", ylab="RGPI", main="Real Gross Private Domestic Investment", major.format="%Y Q%q")

Logarithm

lRGPI<-log(RGPI)

Plot Logarithm

plot(lRGPI, type= "l",xlab= "Years", ylab="lRGPI", main="Log_Real Gross Private Domestic Investment", major.format="%Y Q%q")

First differences of Logarithm

dlRGPI<-diff(lRGPI)
plot(dlRGPI, type= "l", xlab= "Years", ylab="dlRGPI", main="First differences of Logarithm Real Gross Private Domestic Investment", major.format="%Y Q%q")

Logarithm data #ADF test

ur.df(dlRGPI,type="trend", selectlags="BIC")
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -9.6906 31.3137 46.964
summary(ur.df(dlRGPI))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.171899 -0.014841  0.006751  0.029644  0.216303 
## 
## Coefficients:
##            Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -0.68294    0.07351  -9.290   <2e-16 ***
## z.diff.lag -0.09629    0.05975  -1.611    0.108    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.04763 on 275 degrees of freedom
## Multiple R-squared:  0.3836, Adjusted R-squared:  0.3792 
## F-statistic: 85.58 on 2 and 275 DF,  p-value: < 2.2e-16
## 
## 
## Value of test-statistic is: -9.29 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since -9.2895 < 2.58 -1.95 -1.62 ,we do not reject the null hypothesis of a unit root.Thus, there is a present of unit root in the Real Gross Private Domestic Investment.

KPSS test

dlRGPI.urkpss <- ur.kpss(dlRGPI, type="tau", lags="short")
summary(dlRGPI.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 5 lags. 
## 
## Value of test-statistic is: 0.0189 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 0.0188 < 0.119 0.146 0.176 0.216 ,we do not reject the null hypothesis of the stationary.Thus, the Real Gross Private Domestic Investment is stationary.

ERS test

dlRGPI.urers1 <- ur.ers(dlRGPI, type="P-test", model="trend")
summary(dlRGPI.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 0.0905 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 0.09 < 3.96 5.62 6.89 ,we do not reject the null hypothesis.

Conclution

  • We do not reject ADF, KPSS and ERS tests.
  • The model does contain a unit root
  • It is stationary.

Category(B)

S&P 500 Index

Original

SP<- Quandl("YAHOO/INDEX_GSPC", type="zoo")

Plot Original

plot(SP, type= "l",xlab= "Years", ylab="SP", main="S&P 500 Index", major.format="%Y Q%q")

Logarithm

lSP<-log(SP)

Plot Logarithm

plot(lSP, type= "l",xlab= "Years", ylab="lSP1", main="Log_S&P 500 Index", major.format="%Y Q%q")

Because this data is an index we prefer to perform tests on original data.

First differences of Logarithm

dlSP<-diff(lSP)
plot(dlSP, type= "l", xlab= "Years", ylab="dlSP", main="Difference of S&P 500 Index", major.format="%Y Q%q")

KPSS test

dlSP.urkpss <- ur.kpss(dlSP, type="tau", lags="short")
summary(dlSP.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 22 lags. 
## 
## Value of test-statistic is: 0.0067 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 0.0066 < 0.119 0.146 0.176 0.216 ,we do not reject the null hypothesis of the stationary.Thus, the S&P 500 Index is stationary.

ERS test

dlSP.urers1 <- ur.ers(dlSP, type="P-test", model="trend")
summary(dlSP.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 6e-04 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 6e-04 < 3.96 5.62 6.89 ,we do not reject the null hypothesis.

Conclution

  • We fail to reject KPSS and ERS.
  • The original time series model is stationary
  • The original time series model may contain unit root.

Category(C)

Personal Consumption Expenditures: Chain-type Price Index

Original

PCE <- Quandl("FRED/PCECTPI", type="zoo")

Plot Original

plot(PCE, type= "l",xlab= "Years", ylab="PCE", main="Personal Consumption Expenditures: Chain-type Price Index", major.format="%Y Q%q")

Logarithm

lPCE<-log(PCE)

Plot Logarithm

plot(lPCE, type= "l",xlab= "Years", ylab="lPCE", main="Log-Personal Consumption Expenditures: Chain-type Price Index", major.format="%Y Q%q")

First differences of Logarithm

dlPCE<-diff(lPCE)
plot(dlPCE, type= "l", xlab= "Years 1947-2016", ylab="dlPCE", main="Log-change of Personal Consumption Expenditures: Chain-type Price Index")

Second differences of Logarithm

dlPCE2<-diff(dlPCE)
plot(dlPCE2, type= "l", xlab= "Years 1947-2016", ylab="dlPCE2", main="Second Log-change of Personal Consumption Expenditures: Chain-type Price Index")

ADF test

ur.df(dlPCE2)
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -16.7891
summary(ur.df(dlPCE2))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0242356 -0.0019792  0.0000568  0.0019421  0.0177823 
## 
## Coefficients:
##            Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -1.54210    0.09185 -16.789  < 2e-16 ***
## z.diff.lag  0.22295    0.05784   3.855 0.000144 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.004185 on 274 degrees of freedom
## Multiple R-squared:  0.6521, Adjusted R-squared:  0.6495 
## F-statistic: 256.7 on 2 and 274 DF,  p-value: < 2.2e-16
## 
## 
## Value of test-statistic is: -16.7891 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since 16.7841 < -2.58 -1.95 -1.62 ,we do not reject the null hypothesis of a unit root. Thus there is a unit root in the Logarithm data

KPSS test

dlPCE2.urkpss <- ur.kpss(dlPCE2, type="tau", lags="short")
summary(dlPCE2.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 5 lags. 
## 
## Value of test-statistic is: 0.0169 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 0.0171 < 0.119 0.146 0.176 0.216 ,we do not reject the null hypothesis of the stationary.

ERS test

dlPCE2.urers1 <- ur.ers(dlPCE2, type="P-test", model="trend")
summary(dlPCE2.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 1.0229 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 1.0291 < 3.96 5.62 6.89 ,we do not reject the null hypothesis.

Conclution

  • We do not reject ADF KPSS and ERS.
  • The second differences does contain a unit root,
  • It is stationary.

Category(D)

10-Year Treasury Constant Maturity Rate

Original

TCM<- Quandl("FRED/GS10", type="zoo")

Plot Original

plot(TCM, type= "l",xlab= "Years", ylab="SP", main="10-Year Treasury Constant Maturity Rate", major.format="%Y Q%q")

Logarithm

lTCM<-log(TCM)

Plot Logarithm

plot(lTCM, type= "l",xlab= "Years", ylab="lSP1", main="Log_10-Year Treasury Constant Maturity Rate", major.format="%Y Q%q")

First differences of original

dTCM<-diff(TCM)
plot(dTCM, type= "l", xlab= "Years", ylab="dSP", main="Difference 10-Year Treasury Constant Maturity Rate", major.format="%Y Q%q")

The original and Logarithm look the same since the data is in percentage form.

Original data

ADF test

ur.df(TCM,type="trend", selectlags="BIC")
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -1.8664 1.5301 2.2932
summary(ur.df(TCM))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.69091 -0.11836  0.00569  0.13438  1.49725 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -0.001138   0.001414  -0.804    0.421    
## z.diff.lag  0.304983   0.034438   8.856   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2567 on 764 degrees of freedom
## Multiple R-squared:  0.09352,    Adjusted R-squared:  0.09115 
## F-statistic: 39.41 on 2 and 764 DF,  p-value: < 2.2e-16
## 
## 
## Value of test-statistic is: -0.8045 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since the -0.8073 < -2.58 -1.95 -1.62 ,we do not reject the null hypothesis of a unit root.Thus, there is a present of unit root in the 10-Year Treasury Constant Maturity Rate

KPSS test

TCM.urkpss <- ur.kpss(TCM, type="tau", lags="short")
summary(TCM.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 6 lags. 
## 
## Value of test-statistic is: 2.3444 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 2.3394 > 0.119 0.146 0.176 0.216 ,we reject the null hypothesis of the stationary.Thus, 10-Year Treasury Constant Maturity Rate is stationary.

ERS test

TCM.urers1 <- ur.ers(TCM, type="P-test", model="trend")
summary(TCM.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 32.8302 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 32.9017 > 3.96 5.62 6.89 ,we reject the null hypothesis.

Conclusion

  • We do not reject ADF and reject KPSS and ERS
  • The original time series model it contains a unit root, but it is stationary.

Category(E)

Unemployment Rate

Original

U<- Quandl("FRED/UNRATE", type="zoo")

Plot Original

plot(U, type= "l",xlab= "Years", ylab="U", main="Unemployment Rate", major.format="%Y Q%q")

Logarithm

lU<-log(U)

Plot Logarithm

plot(lSP, type= "l",xlab= "Years", ylab="lU", main="LogUnemployment Rate", major.format="%Y Q%q")

First differences of original

dU<-diff(U)
plot(dU, type= "l", xlab= "Years", ylab="dU", main="Difference of Unemployment Rate", major.format="%Y Q%q")

second differences of original

dU2<-diff(dU)
plot(dU2, type= "l", xlab= "Years", ylab="dU", main="Difference of Unemployment Rate", major.format="%Y Q%q")

#Original data #ADF test

ur.df(U,type="trend", selectlags="BIC")
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -2.0217 1.5983 2.3933
summary(ur.df(U))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.65147 -0.10760  0.00272  0.11499  1.32803 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -0.0006054  0.0012033  -0.503 0.615029    
## z.diff.lag  0.1201937  0.0344692   3.487 0.000514 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2091 on 827 degrees of freedom
## Multiple R-squared:  0.0147, Adjusted R-squared:  0.01232 
## F-statistic:  6.17 on 2 and 827 DF,  p-value: 0.002189
## 
## 
## Value of test-statistic is: -0.5031 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since -0.4639 < 2.58 -1.95 -1.62 ,we do not reject the null hypothesis of a unit root.Thus, there is present of unit root in the Unemployment Rate.

KPSS test

U.urkpss <- ur.kpss(U, type="tau", lags="short")
summary(U.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 6 lags. 
## 
## Value of test-statistic is: 0.5054 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since .5035 > 0.119 0.146 0.176 0.216 ,we reject the null hypothesis of the stationary.Thus, the Unemployment Rate is stationary.

ERS test

U.urers1 <- ur.ers(U, type="P-test", model="trend")
summary(U.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 3.8756 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 3.7551 < 3.96 5.62 6.89 ,we do not reject the null hypothesis.

ADF,ERS are rejected,but we do not reject KPSS So the original time series model it does contain a unit root, and it is not stationary. So, we will perform the test on second differences of original data which seems more stationary.

ADF test

ur.df(dU2,type="trend", selectlags="BIC")
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -36.5525 445.3747 668.0616
summary(ur.df(dU2))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.70477 -0.11423  0.00178  0.13254  1.12489 
## 
## Coefficients:
##            Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -2.13728    0.05840  -36.60   <2e-16 ***
## z.diff.lag  0.33928    0.03269   10.38   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2112 on 825 degrees of freedom
## Multiple R-squared:  0.8216, Adjusted R-squared:  0.8212 
## F-statistic:  1900 on 2 and 825 DF,  p-value: < 2.2e-16
## 
## 
## Value of test-statistic is: -36.5972 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since the absolute value of (-36.5604) > the absolute value of (-2.58 -1.95 -1.62) ,we reject the null hypothesis of a unit root.Thus, there is no present of unit root in the first diffrence of Unemployment Rate. .

KPSS test

dU2.urkpss <- ur.kpss(dU2, type="tau", lags="short")
summary(dU2.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 6 lags. 
## 
## Value of test-statistic is: 0.0074 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 0.0064 < 0.119 0.146 0.176 0.216 ,we do not reject the null hypothesis of the stationary.Thus, the first diffrence of Unemployment Rate is not stationary.

ERS test

dU2.urers1 <- ur.ers(dU2, type="P-test", model="trend")
summary(dU2.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 0.3631 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 0.3505 < 3.96 5.62 6.89 ,we do not reject the null hypothesis.

Conclution

  • We reject ADF, and fail to reject KPSS and ERS
  • The second differences of origenal time series model it does not contain a unit root - It is stationary

Category(F)

U.S. / U.K. Foreign Exchange Rate

Original

e<- Quandl("FRED/EXUSUK", type="zoo")

Plot Original

plot(e, type= "l",xlab= "Years", ylab="e", main="U.S. / U.K. Foreign Exchange Rate", major.format="%Y Q%q")

Logarithm

le<-log(e)

Plot Logarithm

plot(le, type= "l",xlab= "Years", ylab="le", main="Log_U.S. / U.K. Foreign Exchange Rate", major.format="%Y Q%q")

First differences of log-transformed

dle<-diff(le)
plot(dle, type= "l", xlab= "Years", ylab="dle", main="difference of Log_U.S. / U.K. Foreign Exchange Rate", major.format="%Y Q%q")

second differences of log-transformed

dle2<-diff(dle)
plot(dle2, type= "l", xlab= "Years", ylab="dle", main="difference of Log_U.S. / U.K. Foreign Exchange Rate", major.format="%Y Q%q")

Logarithm #ADF test

ur.df(le,type="trend", selectlags="BIC")
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -2.8874 3.0032 4.1721
summary(ur.df(le))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.091898 -0.013005  0.001127  0.014430  0.085670 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -0.002513   0.001672  -1.503    0.133    
## z.diff.lag  0.338661   0.039976   8.472   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02238 on 552 degrees of freedom
## Multiple R-squared:  0.1193, Adjusted R-squared:  0.1161 
## F-statistic: 37.39 on 2 and 552 DF,  p-value: 5.902e-16
## 
## 
## Value of test-statistic is: -1.503 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since absolute value of(-1.5038) < -2.58 -1.95 -1.62 ,we fail to reject the null hypothesis of a unit root.Thus, there is a present of unit root in the log-transformed time series of U.S. / U.K. Foreign Exchange Rate.

KPSS test

le.urkpss <- ur.kpss(le, type="tau", lags="short")
summary(le.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 6 lags. 
## 
## Value of test-statistic is: 0.6858 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 0.6976 > 0.119 0.146 0.176 0.216 ,we reject the null hypothesis of the stationary.Thus, the log-transformed time series of U.S. / U.K. Foreign Exchange Rate is stationary.

ERS test

le.urers1 <- ur.ers(le, type="P-test", model="trend")
summary(le.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 7.7578 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 7.782 > 3.96 5.62 6.89 ,we reject the null hypothesis.

ADF test

ur.df(dle2 ,type="trend", selectlags="BIC")
## 
## ############################################################### 
## # Augmented Dickey-Fuller Test Unit Root / Cointegration Test # 
## ############################################################### 
## 
## The value of the test statistic is: -27.2699 247.8843 371.8257
summary(ur.df(dle2))
## 
## ############################################### 
## # Augmented Dickey-Fuller Test Unit Root Test # 
## ############################################### 
## 
## Test regression none 
## 
## 
## Call:
## lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.090257 -0.014650  0.000612  0.014025  0.095264 
## 
## Coefficients:
##            Estimate Std. Error t value Pr(>|t|)    
## z.lag.1    -1.72751    0.06323 -27.319   <2e-16 ***
## z.diff.lag  0.36451    0.03977   9.166   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02464 on 550 degrees of freedom
## Multiple R-squared:  0.6814, Adjusted R-squared:  0.6802 
## F-statistic: 588.1 on 2 and 550 DF,  p-value: < 2.2e-16
## 
## 
## Value of test-statistic is: -27.3195 
## 
## Critical values for test statistics: 
##       1pct  5pct 10pct
## tau1 -2.58 -1.95 -1.62

Unit root test H0: time series {yt} has a unit root. Since the absolute value of (-27.308) > the absolute value of (-2.58 -1.95 -1.62) ,we reject the null hypothesis of a unit root.Thus, there is no present of unit root in the log-transformed time series of Real Gross Private Domestic Investment.

KPSS test

dle2.urkpss<- ur.kpss(dle2, type="tau", lags="short")
summary(dle2.urkpss)
## 
## ####################### 
## # KPSS Unit Root Test # 
## ####################### 
## 
## Test is of type: tau with 6 lags. 
## 
## Value of test-statistic is: 0.0065 
## 
## Critical value for a significance level of: 
##                 10pct  5pct 2.5pct  1pct
## critical values 0.119 0.146  0.176 0.216

Stationarity test H0: {yt} is stationary. Since 0.0063 < 0.119 0.146 0.176 0.216 ,we do not reject the null hypothesis of the stationary.Thus, the log-transformed time series of U.S. / U.K. Foreign Exchange Rate is not stationary.

ERS test

dle2.urers1 <- ur.ers(dle2, type="P-test", model="trend")
summary(dle2.urers1)
## 
## ############################################### 
## # Elliot, Rothenberg and Stock Unit Root Test # 
## ############################################### 
## 
## Test of type P-test 
## detrending of series with intercept and trend 
## 
## Value of test-statistic is: 0.027 
## 
## Critical values of P-test are:
##                 1pct 5pct 10pct
## critical values 3.96 5.62  6.89

Since 0.0268 < 3.96 5.62 6.89 ,we do not reject the null hypothesis.

Conclution

  • We reject ADF
  • Fail to reject KPSS and ERS
  • The second differences of log-transformed time series model it does not contain a unit root.
  • The second differences of log-transformed time series modelit is not stationary.