0

I want to get ADF table critical values. However, the critical values I get are between -8 and -10. Where am I doing wrong?

set.seed(4) 
n<- 100
M<- 50000
rho<-numeric(M)
std<-numeric(M)
for (i in 1:M){
b0 <- 1.5
b1 <- 2
U<-rnorm(n, mean=0, sd=2)
X<-rnorm(n, mean=5, sd=5)
Y<-b0+b1*X+U

FY<-Y[-1]

model1<-lm(Y[1:100]~FY[1:100])
rho[i]<-summary(model1)[[4]][[2,1]]
std[i]<-summary(model1)[[4]][[2,2]]

}

t_ist<-(rho-1)/std
t_ist
Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
blh
  • 3
  • 1
  • You hardly got any part of the ADF test right. Take a few hours to read through Davidson & Mackinnon's "Econometric Theory and Methods" section 14.3. then try again. – ColorStatistics Jan 08 '22 at 11:51
  • https://stats.stackexchange.com/questions/213551/how-is-the-augmented-dickey-fuller-test-adf-table-of-critical-values-calculate/213589#213589 – Christoph Hanck Jan 10 '22 at 14:44

0 Answers0