2 years ago

#42483

test-img

Anna Ha

time series analysis problem with lagged residuals

I am dealing with time series analysis, I want to check residual autocorrelation, but before that I would like to draw time series lag plots and I am struggling with problem like that

enter image description here

lagged residuals seem to be the same as residuals:

here is the code:

ehata=ts(DATA1$residuals, start=c(1960), end=c(2015),freq=1)
plot(ehata,xlab="",lwd=2,col="red")
abline(h=0) 
plot(lag(ehata,-1),ehata,ylab="residuals",xlab="lag",lwd=2,col="green")

btw residuals time plot works

ehata=ts(DATA1$residuals, start=c(1960), end=c(2015),freq=frequency(DATA1))
plot(ehat,xlab="",lwd=2,col="red")
abline(h=0)

r

autocorrelation

0 Answers

Your Answer

Accepted video resources