Displaying 1 result from an estimated 1 matches for "wageslong".
Did you mean:
nameslong
2010 May 02
0
how to plot forecast together with historical series in OLS or special ARIMA model
...s to predict the outcome:
First I built the OLS model with the same lagged variable (HCPI, look the series below):
ar<- lm(diff(HCPIlong)[2:16]~diff(HCPIlong)[1:15]-1)
ar.predict<-predict(ar, n.ahead=5)
and then the same + Wages:
ar1<-lm(diff(HCPIlong)[2:16]~diff(HCPIlong)[1:15]+diff(wageslong)[1:15]-1)
ar1.predict<-predict(ar1, n.ahead=5)
ts.plot(HCPIlong,ar1.predict$pred,lty=1:2)
(or:
ar2<-lm(diff(HCPIlong)[2:16]~diff(wageslong)[1:15]-1)
ar2.predict<-predict(ar2, n.ahead=5))
but when I try to plot it with codes that were used in ARIMA the program reports the mistake:...