Can someone explain me what is the interpertation of each line? what is a naive prediction and hodrick-prescott filter?
data(unemp)
head(unemp)
plot(unemp)
ue<- as.data.frame(unemp)
n<-length(ue$x)
ue$lag<- c(NA,ue$x[1:(n-1)])
fit<-lm(x~lag,data=ue)
summary(fit)
hp<-hpfilter(unemp, freq=1600)
coef<-fit$coefficients
last<-ue$x[168]
pred<-coef+last
pred
dif<-hp$trend[168]-hp$trend[167]
plot(hp)
plot(hp$trend)
unemp[168]+dif
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.