Displaying 1 result from an estimated 1 matches for "lag1resid".
Did you mean:
lag1residsq
2008 Oct 10
1
lag function doesn't work - what am i doing wrong?
I am trying to lag a time series. My data is in a matrix, but I coerce it
into a ts object.
But when I lag it and then look at the result, nothing has changed. What am
I doing wrong?????
residsq<-resid^2
residsq<-as.ts(residsq)
lag1residsq<-lag(residsq,-1)
> residsq[1:5]
1 2 3 4 5
87.759 329882.188 5325849.333 31512.334 70865.228
> lag1residsq[1:5]
1 2 3 4 5
87.759 329882.188 5325849.333 31512.334 70...