Andrii Baryshpolets
January 2017
\(x_t = x_t-1 + \varepsilon_x,t\) \(y_t = y_t-1 + \varepsilon_y,t\) where \(\varepsilon_x,t ~ N(0, \varsigma^2_x), \varepsilon_y,t~ N(0, \varsigma^2_y)\)
{xt} and {yt} are thus unrelated
it can be shown that if \(t \rightarrow \infty\) then \(\beta_1 \not\rightarrow 0\) and its \(t\)-statistics \(\rightarrow \pm \infty\)
library(zoo)
set.seed(42)
n <- 500
x <- as.ts( cumsum( rnorm(n, mean=0, sd=1) ) )
y <- as.ts( cumsum( rnorm(n, mean=0, sd=1) ) )Correlation coefficient between yt and xt is \(\varrho_y,x\) = 0.6746103
consider linear regression model \[ y = \beta_0 + \beta_1 x + \varepsilon \]
\(\hat \beta_1=1.5954\) is highly signifficant with \(p\)-value \(1.1643\times 10^{-67}\)
m1 <- lm(y~x)
summary(m1)##
## Call:
## lm(formula = y ~ x)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.170 -7.887 -0.464 7.566 18.375
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.2330 0.5857 -5.52 5.5e-08 ***
## x 1.5954 0.0782 20.39 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.4 on 498 degrees of freedom
## Multiple R-squared: 0.455, Adjusted R-squared: 0.454
## F-statistic: 416 on 1 and 498 DF, p-value: <2e-16