Since the test statistic is ~0.48 well above 0.05, we fail to reject the null hypothesis that the data is uncorrelated.
Stationary tests
library(tseries)library(ggpubr)
Attaching package: 'ggpubr'
The following object is masked from 'package:forecast':
gghistogram
adf.test(x_ts, alternative="stationary")
Warning in adf.test(x_ts, alternative = "stationary"): p-value smaller than
printed p-value
Augmented Dickey-Fuller Test
data: x_ts
Dickey-Fuller = -66.549, Lag order = 66, p-value = 0.01
alternative hypothesis: stationary
pp.test(x_ts)
Warning in pp.test(x_ts): p-value smaller than printed p-value
Phillips-Perron Unit Root Test
data: x_ts
Dickey-Fuller Z(alpha) = -297180, Truncation lag parameter = 29,
p-value = 0.01
alternative hypothesis: stationary
# ADF will not go lower than 0.01 in adf.test so we use mckannon test as alternative test of cointegration/unit roots:library(urca)summary(ur.df(x_ts, type ="drift", lags =0))
###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################
Test regression drift
Call:
lm(formula = z.diff ~ z.lag.1 + 1)
Residuals:
Min 1Q Median 3Q Max
-20043.3 -317.1 82.1 235.2 20008.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 17.640634 3.476800 5.074 3.9e-07 ***
z.lag.1 -0.998718 0.001829 -546.086 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1901 on 298975 degrees of freedom
Multiple R-squared: 0.4994, Adjusted R-squared: 0.4994
F-statistic: 2.982e+05 on 1 and 298975 DF, p-value: < 2.2e-16
Value of test-statistic is: -546.0858 149104.8
Critical values for test statistics:
1pct 5pct 10pct
tau2 -3.43 -2.86 -2.57
phi1 6.43 4.59 3.78
studentized Breusch-Pagan test
data: lm_mean
BP = 0.61205, df = 1, p-value = 0.434
null is homoskedasticity. Hence we fail to reject null at 5% significance that it is homoskedastic, at least under simple trend model. What about just for first 100 samples?