library(tseries)
library(urca)
library(readr)
library(zoo)
data <- read.csv("M3b_stationary/module3b_data_PE_ratios.csv")
data$date <- as.Date(data$date)
subset_data <- subset(data, date >= as.Date("2000-04-01") & date <= as.Date("2015-02-01"))
ts_pe_aus <- ts(subset_data$pe_aus, start = c(2000, 4), end = c(2015, 2), frequency = 12)
plot(ts_pe_aus,
main = "Price-Earnings Ratio, Australia",
ylab = "PE Ratio",
xlab = "Year")
Compared to the PE-Ratio for India, Australia’s series tend to be
more stable except for the sharp anomaly during the global financial
crisis.
The P-E ratio spike (structural break) in late-2009 to
mid-2010 is likely due to a temporary collapse in earnings while stock
prices stayed flat or fell more slowly.
Null Hypothesis (H₀): The series has a unit root → it is
non-stationary.
p < 0.05 -> Reject H₀. Series is stationary
at 5%.
p ≥ 0.05 -> Fail to reject H₀. Series is non-stationary
at 5%.
adf_none <- ur.df(ts_pe_aus, type = "none", selectlags = "AIC")
adf_drift <- ur.df(ts_pe_aus, type = "drift", selectlags = "AIC")
adf_trend <- ur.df(ts_pe_aus, type = "trend", selectlags = "AIC")
summary(adf_none)
##
## ###############################################
## # 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
## -47.748 -0.296 0.466 1.024 19.316
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.02039 0.01401 -1.455 0.1475
## z.diff.lag 0.15506 0.07468 2.076 0.0393 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.49 on 175 degrees of freedom
## Multiple R-squared: 0.03273, Adjusted R-squared: 0.02167
## F-statistic: 2.96 on 2 and 175 DF, p-value: 0.0544
##
##
## Value of test-statistic is: -1.455
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
summary(adf_drift)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -45.231 -0.831 -0.151 0.496 19.665
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.63843 0.65536 2.500 0.01334 *
## z.lag.1 -0.07901 0.02721 -2.904 0.00417 **
## z.diff.lag 0.18452 0.07452 2.476 0.01424 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.424 on 174 degrees of freedom
## Multiple R-squared: 0.06627, Adjusted R-squared: 0.05553
## F-statistic: 6.174 on 2 and 174 DF, p-value: 0.002567
##
##
## Value of test-statistic is: -2.9035 4.2153
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
summary(adf_trend)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -45.262 -0.855 -0.135 0.522 19.633
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.462352 0.851831 1.717 0.08782 .
## z.lag.1 -0.079744 0.027375 -2.913 0.00405 **
## tt 0.002127 0.006548 0.325 0.74572
## z.diff.lag 0.184832 0.074723 2.474 0.01434 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.435 on 173 degrees of freedom
## Multiple R-squared: 0.06684, Adjusted R-squared: 0.05065
## F-statistic: 4.13 on 3 and 173 DF, p-value: 0.007379
##
##
## Value of test-statistic is: -2.913 2.8309 4.2464
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
Intercept appears to be most appropriate, since trend (tt) p-value is
not significant.
Test-stat check against tau also confirms that
the intercept level is significant. Test Statistic < Critical Value
-> Reject H₀ → evidence of stationarity. Test Statistic ≥ Critical
Value -> Fail to reject H₀ → series is likely non-stationary.
Null Hypothesis (H₀): The series has a unit root → it is
non-stationary.
p < 0.05 -> Reject H₀. Series is stationary
at 5%.
p ≥ 0.05 -> Fail to reject H₀. Series is non-stationary
at 5%.
pp_drift <- ur.pp(ts_pe_aus, type = "Z-alpha", model = "constant")
pp_trend <- ur.pp(ts_pe_aus, type = "Z-alpha", model = "trend")
summary(pp_drift)
##
## ##################################
## # Phillips-Perron Unit Root Test #
## ##################################
##
## Test regression with intercept
##
##
## Call:
## lm(formula = y ~ y.l1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -46.883 -0.761 -0.131 0.502 20.285
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.38428 0.65436 2.115 0.0358 *
## y.l1 0.93331 0.02707 34.483 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.476 on 176 degrees of freedom
## Multiple R-squared: 0.8711, Adjusted R-squared: 0.8703
## F-statistic: 1189 on 1 and 176 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic, type: Z-alpha is: -17.4956
##
## aux. Z statistics
## Z-tau-mu 2.5588
summary(pp_trend)
##
## ##################################
## # Phillips-Perron Unit Root Test #
## ##################################
##
## Test regression with intercept and trend
##
##
## Call:
## lm(formula = y ~ y.l1 + trend)
##
## Residuals:
## Min 1Q Median 3Q Max
## -46.913 -0.832 -0.104 0.519 20.258
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.395754 0.657441 2.123 0.0352 *
## y.l1 0.932717 0.027225 34.259 <2e-16 ***
## trend 0.001788 0.006567 0.272 0.7858
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.488 on 175 degrees of freedom
## Multiple R-squared: 0.8711, Adjusted R-squared: 0.8697
## F-statistic: 591.5 on 2 and 175 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic, type: Z-alpha is: -17.6488
##
## aux. Z statistics
## Z-tau-mu 0.9079
## Z-tau-beta 0.3183
Null Hypothesis (H₀): The series is stationary.
p < 0.05
-> Reject H₀. Series is non-stationary at 5%.
p ≥ 0.05 ->
Fail to reject H₀. Series is Series is stationary at 5%.
kpss_level <- kpss.test(ts_pe_aus)
## Warning in kpss.test(ts_pe_aus): p-value greater than printed p-value
kpss_trend <- kpss.test(ts_pe_aus, null = "Trend")
## Warning in kpss.test(ts_pe_aus, null = "Trend"): p-value greater than printed
## p-value
print(kpss_level)
##
## KPSS Test for Level Stationarity
##
## data: ts_pe_aus
## KPSS Level = 0.15229, Truncation lag parameter = 4, p-value = 0.1
print(kpss_trend)
##
## KPSS Test for Trend Stationarity
##
## data: ts_pe_aus
## KPSS Trend = 0.11185, Truncation lag parameter = 4, p-value = 0.1
subset_preGFC <- subset(data, date >= as.Date("2000-04-01") & date <= as.Date("2009-05-01"))
ts_pe_aus_preGFC <- ts(subset_preGFC$pe_aus, start = c(2000, 4), end = c(2009, 5), frequency = 12)
plot(ts_pe_aus_preGFC,
main = "Price-Earnings Ratio, Australia",
ylab = "PE Ratio",
xlab = "Year")
Null Hypothesis (H₀): The series has a unit root → it is
non-stationary.
p < 0.05 -> Reject H₀. Series is stationary
at 5%.
p ≥ 0.05 -> Fail to reject H₀. Series is non-stationary
at 5%.
adf_none_pre <- ur.df(ts_pe_aus_preGFC, type = "none", selectlags = "AIC")
adf_drift_pre <- ur.df(ts_pe_aus_preGFC, type = "drift", selectlags = "AIC")
adf_trend_pre <- ur.df(ts_pe_aus_preGFC, type = "trend", selectlags = "AIC")
summary(adf_none_pre)
##
## ###############################################
## # 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
## -6.1696 -0.4818 0.1898 0.5409 6.2797
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.00381 0.00821 -0.464 0.644
## z.diff.lag -0.07849 0.10047 -0.781 0.436
##
## Residual standard error: 1.528 on 106 degrees of freedom
## Multiple R-squared: 0.007802, Adjusted R-squared: -0.01092
## F-statistic: 0.4168 on 2 and 106 DF, p-value: 0.6603
##
##
## Value of test-statistic is: -0.4641
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.58 -1.95 -1.62
summary(adf_drift_pre)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.9928 -0.6348 -0.0167 0.4880 5.5515
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.87104 0.80470 2.325 0.0220 *
## z.lag.1 -0.10659 0.04493 -2.372 0.0195 *
## z.diff.lag -0.03031 0.10060 -0.301 0.7638
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.497 on 105 degrees of freedom
## Multiple R-squared: 0.05638, Adjusted R-squared: 0.03841
## F-statistic: 3.137 on 2 and 105 DF, p-value: 0.04752
##
##
## Value of test-statistic is: -2.3724 2.8153
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
summary(adf_trend_pre)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.9082 -0.5769 -0.0215 0.5346 5.5762
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.895705 1.422264 2.036 0.0443 *
## z.lag.1 -0.146548 0.064128 -2.285 0.0243 *
## tt -0.005772 0.006602 -0.874 0.3840
## z.diff.lag -0.005885 0.104522 -0.056 0.9552
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.498 on 104 degrees of freedom
## Multiple R-squared: 0.06326, Adjusted R-squared: 0.03624
## F-statistic: 2.341 on 3 and 104 DF, p-value: 0.07755
##
##
## Value of test-statistic is: -2.2852 2.1274 3.1898
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -3.99 -3.43 -3.13
## phi2 6.22 4.75 4.07
## phi3 8.43 6.49 5.47
Null Hypothesis (H₀): The series has a unit root → it is
non-stationary.
p < 0.05 -> Reject H₀. Series is stationary
at 5%.
p ≥ 0.05 -> Fail to reject H₀. Series is non-stationary
at 5%.
pp_drift_pre <- ur.pp(ts_pe_aus_preGFC, type = "Z-alpha", model = "constant")
pp_trend_pre <- ur.pp(ts_pe_aus_preGFC, type = "Z-alpha", model = "trend")
summary(pp_drift_pre)
##
## ##################################
## # Phillips-Perron Unit Root Test #
## ##################################
##
## Test regression with intercept
##
##
## Call:
## lm(formula = y ~ y.l1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.0584 -0.5844 0.0085 0.5204 5.5725
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.8688 0.7771 2.405 0.0179 *
## y.l1 0.8941 0.0433 20.648 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.486 on 107 degrees of freedom
## Multiple R-squared: 0.7994, Adjusted R-squared: 0.7975
## F-statistic: 426.3 on 1 and 107 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic, type: Z-alpha is: -10.4331
##
## aux. Z statistics
## Z-tau-mu 2.2906
summary(pp_trend_pre)
##
## ##################################
## # Phillips-Perron Unit Root Test #
## ##################################
##
## Test regression with intercept and trend
##
##
## Call:
## lm(formula = y ~ y.l1 + trend)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.9238 -0.5641 -0.0064 0.5254 5.5916
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.598900 1.071187 2.426 0.0169 *
## y.l1 0.852873 0.060052 14.202 <2e-16 ***
## trend -0.006214 0.006274 -0.990 0.3242
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.486 on 106 degrees of freedom
## Multiple R-squared: 0.8012, Adjusted R-squared: 0.7975
## F-statistic: 213.6 on 2 and 106 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic, type: Z-alpha is: -15.3423
##
## aux. Z statistics
## Z-tau-mu 2.5867
## Z-tau-beta -0.9440
Null Hypothesis (H₀): The series is stationary.
p < 0.05
-> Reject H₀. Series is non-stationary at 5%.
p ≥ 0.05 ->
Fail to reject H₀. Series is Series is stationary at 5%.
kpss_level_pre <- kpss.test(ts_pe_aus_preGFC)
kpss_trend_pre <- kpss.test(ts_pe_aus_preGFC, null = "Trend")
print(kpss_level_pre)
##
## KPSS Test for Level Stationarity
##
## data: ts_pe_aus_preGFC
## KPSS Level = 1.3587, Truncation lag parameter = 4, p-value = 0.01
print(kpss_trend_pre)
##
## KPSS Test for Trend Stationarity
##
## data: ts_pe_aus_preGFC
## KPSS Trend = 0.15853, Truncation lag parameter = 4, p-value = 0.03956
Seems to have conflicting results in ADF and PP tests, but KPSS
confirms that trend specification appears to be most appropriate.
Null Hypothesis (H₀): The time series has a unit root.
p-value
< 0.05: reject the null → The series is stationary around a broken
trend.
p-value ≥ 0.05: fail to reject the null → The series is
non-stationary, even accounting for a structural break.
Note: Based on the p-values, the test implies that the series is
non-stationary, and the breakpoint reported is 2009-09 (trend) and
2010-05 (intercept).
za_intercept <- ur.za(ts_pe_aus, model = "intercept", lag = NULL)
za_trend <- ur.za(ts_pe_aus, model = "trend", lag = NULL)
summary(za_intercept)
##
## ################################
## # Zivot-Andrews Unit Root Test #
## ################################
##
##
## Call:
## lm(formula = testmat)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.049 -1.394 0.241 1.297 18.661
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.18574 0.86010 0.216 0.829282
## y.l1 0.89725 0.02753 32.589 < 2e-16 ***
## trend 0.03925 0.01119 3.507 0.000577 ***
## du -5.01143 1.23780 -4.049 7.74e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.302 on 174 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.8822, Adjusted R-squared: 0.8802
## F-statistic: 434.5 on 3 and 174 DF, p-value: < 2.2e-16
##
##
## Teststatistic: -3.7321
## Critical values: 0.01= -5.34 0.05= -4.8 0.1= -4.58
##
## Potential break point at position: 122
summary(za_trend)
##
## ################################
## # Zivot-Andrews Unit Root Test #
## ################################
##
##
## Call:
## lm(formula = testmat)
##
## Residuals:
## Min 1Q Median 3Q Max
## -47.014 -0.864 -0.153 0.660 19.854
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.89986 0.92602 0.972 0.333
## y.l1 0.92697 0.02790 33.223 <2e-16 ***
## trend 0.01058 0.01137 0.930 0.354
## dt -0.02830 0.02991 -0.946 0.345
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.489 on 174 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.8718, Adjusted R-squared: 0.8696
## F-statistic: 394.4 on 3 and 174 DF, p-value: < 2.2e-16
##
##
## Teststatistic: -2.6173
## Critical values: 0.01= -4.93 0.05= -4.42 0.1= -4.11
##
## Potential break point at position: 114
format(as.Date(as.yearmon(time(ts_pe_aus)[122])), "%Y-%m")
## [1] "2010-05"
format(as.Date(as.yearmon(time(ts_pe_aus)[114])), "%Y-%m")
## [1] "2009-09"
subset_postGFC <- subset(data, date >= as.Date("2010-12-01") & date <= as.Date("2015-02-01"))
ts_pe_postGFC <- ts(subset_postGFC$pe_aus, start = c(2010, 12), end = c(2015, 2), frequency = 12)
plot(ts_pe_postGFC,
main = "Price-Earnings Ratio, Australia",
ylab = "PE Ratio",
xlab = "Year")
Null Hypothesis (H₀): The series has a unit root → it is
non-stationary.
p < 0.05 -> Reject H₀. Series is stationary
at 5%.
p ≥ 0.05 -> Fail to reject H₀. Series is non-stationary
at 5%.
adf_none_post <- ur.df(ts_pe_postGFC, type = "none", selectlags = "AIC")
adf_drift_post <- ur.df(ts_pe_postGFC, type = "drift", selectlags = "AIC")
adf_trend_post <- ur.df(ts_pe_postGFC, type = "trend", selectlags = "AIC")
summary(adf_none_post)
##
## ###############################################
## # 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
## -4.0261 -0.5258 0.1244 0.7281 3.0568
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## z.lag.1 -0.001351 0.009348 -0.145 0.886
## z.diff.lag -0.076502 0.170543 -0.449 0.656
##
## Residual standard error: 1.165 on 47 degrees of freedom
## Multiple R-squared: 0.005088, Adjusted R-squared: -0.03725
## F-statistic: 0.1202 on 2 and 47 DF, p-value: 0.887
##
##
## Value of test-statistic is: -0.1446
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau1 -2.6 -1.95 -1.61
summary(adf_drift_post)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8636 -0.5882 0.0311 0.8506 3.1648
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.35208 1.03833 1.302 0.199
## z.lag.1 -0.07608 0.05813 -1.309 0.197
## z.diff.lag -0.03606 0.17212 -0.209 0.835
##
## Residual standard error: 1.156 on 46 degrees of freedom
## Multiple R-squared: 0.04045, Adjusted R-squared: -0.001272
## F-statistic: 0.9695 on 2 and 46 DF, p-value: 0.3869
##
##
## Value of test-statistic is: -1.3087 0.8584
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.51 -2.89 -2.58
## phi1 6.70 4.71 3.86
summary(adf_trend_post)
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression trend
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0214 -0.6424 0.0379 0.6965 3.1814
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.78367 1.23596 1.443 0.156
## z.lag.1 -0.11717 0.08587 -1.365 0.179
## tt 0.01130 0.01729 0.654 0.517
## z.diff.lag -0.02314 0.17433 -0.133 0.895
##
## Residual standard error: 1.163 on 45 degrees of freedom
## Multiple R-squared: 0.04947, Adjusted R-squared: -0.01389
## F-statistic: 0.7807 on 3 and 45 DF, p-value: 0.5109
##
##
## Value of test-statistic is: -1.3646 0.7076 1.0594
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau3 -4.04 -3.45 -3.15
## phi2 6.50 4.88 4.16
## phi3 8.73 6.49 5.47
Null Hypothesis (H₀): The series has a unit root → it is
non-stationary.
p < 0.05 -> Reject H₀. Series is stationary
at 5%.
p ≥ 0.05 -> Fail to reject H₀. Series is non-stationary
at 5%.
pp_drift_post <- ur.pp(ts_pe_postGFC, type = "Z-alpha", model = "constant")
pp_trend_post <- ur.pp(ts_pe_postGFC, type = "Z-alpha", model = "trend")
summary(pp_drift_post)
##
## ##################################
## # Phillips-Perron Unit Root Test #
## ##################################
##
## Test regression with intercept
##
##
## Call:
## lm(formula = y ~ y.l1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8736 -0.5677 -0.0004 0.7861 3.1930
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.37160 0.99779 1.375 0.176
## y.l1 0.92232 0.05578 16.536 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.133 on 48 degrees of freedom
## Multiple R-squared: 0.8507, Adjusted R-squared: 0.8476
## F-statistic: 273.4 on 1 and 48 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic, type: Z-alpha is: -3.6343
##
## aux. Z statistics
## Z-tau-mu 1.3297
summary(pp_trend_post)
##
## ##################################
## # Phillips-Perron Unit Root Test #
## ##################################
##
## Test regression with intercept and trend
##
##
## Call:
## lm(formula = y ~ y.l1 + trend)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0355 -0.6076 0.0133 0.6307 3.1976
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.11606 1.42979 1.48 0.146
## y.l1 0.87983 0.08079 10.89 1.9e-14 ***
## trend 0.01175 0.01608 0.73 0.469
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.138 on 47 degrees of freedom
## Multiple R-squared: 0.8524, Adjusted R-squared: 0.8461
## F-statistic: 135.7 on 2 and 47 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic, type: Z-alpha is: -5.7712
##
## aux. Z statistics
## Z-tau-mu 1.5691
## Z-tau-beta 0.6849
Null Hypothesis (H₀): The series is stationary.
p < 0.05
-> Reject H₀. Series is non-stationary at 5%.
p ≥ 0.05 ->
Fail to reject H₀. Series is Series is stationary at 5%.
kpss_level_post <- kpss.test(ts_pe_postGFC, null = "Level")
## Warning in kpss.test(ts_pe_postGFC, null = "Level"): p-value smaller than
## printed p-value
kpss_trend_post <- kpss.test(ts_pe_postGFC, null = "Trend")
print(kpss_level_post)
##
## KPSS Test for Level Stationarity
##
## data: ts_pe_postGFC
## KPSS Level = 0.85134, Truncation lag parameter = 3, p-value = 0.01
print(kpss_trend_post)
##
## KPSS Test for Trend Stationarity
##
## data: ts_pe_postGFC
## KPSS Trend = 0.18051, Truncation lag parameter = 3, p-value = 0.02331
Again, the results seem to be conflicting in ADF and PP tests, but
KPSS confirms that trend specification appears to be most
appropriate.
IMF remarks: This exercise illustrates the challenges that can arise in real world data with limited observations. While the entire sample spanned 15 years of monthly data, we also observed a major break 10 years in. To complicate matters, the break did not seem to be a one-time level shift but rather two structural breaks, the first sending the P-E ratio from the 15-20 range to 65-75 for about one year and then down again to the 15-20 range. Our best guess would be that pe_aus is nonstationary, as this is consistent with our results for preferred specifications in the pre-crisis sample and the breakpoint unit root test. As for the post-crisis sample, we must bear in mind that there are only 5 years of data, and the unit root tests gave results that conflicted with those of the KPSS test.