0

I need help to predict future values for a time series (26 observations of consumer prices). This time series is not stationary (i.e I have increasing values of price). What is the best method knowing that I want to take the time series to it original scale at the end?

For now, I run this code on stata. But, all my future values are decreasing which is a non sense. So, i'm probably

tsappend, add(20)
twoway (tsline consumerpriceavocadogermany)


gen log_cp_avocado_germany = -log( consumerpriceavocadogermany )
ac consumerpriceavocadogermany
pac consumerpriceavocadogermany
arima consumerpriceavocadogermany, arima(1,0,1)
predict cp
predict cp_dynhat, dyn(2018)
list if inrange(time,2015,2025), clean
Lucas Farias
  • 1,232
  • 1
  • 8
  • 22
  • If you think the process is non-stationary, change to arima(1,1,1). But in that case you should also choose the orders p and q of the AR and MA-parts by plotting the ac and pac of the differenced series. – Jarle Tufto Jun 01 '17 at 08:49
  • hello Jarle Tufto, thank you for your response. I did this but the problem is that it changes the way my time serie looks like at first. I want to keep my original time serie with predicted value ( like the world bank does in its researches). – poofidoudou Jun 01 '17 at 08:49
  • @poofidoudou Then you just need to "integrate" it back to its level by writing a piece of code that sums the first observation to the first fitted difference, iteratively, up to the last forecast. – Lucas Farias Jun 01 '17 at 08:57
  • @lucasfariaslf this is my first attempt to estime a time serie. I am not familiar with this kind of code. Can you help me ? – poofidoudou Jun 01 '17 at 09:01
  • But this is not an estimation problem. Once you have the estimates, you just need to figure out how to do what I said in Stata. This might help you: https://stats.stackexchange.com/questions/126525/time-series-forecast-convert-differenced-forecast-back-to-before-difference-lev – Lucas Farias Jun 01 '17 at 09:04
  • @lucasfariaslf I am sorry but I did not understand exactly what you said. Can you explain me one more time ? – poofidoudou Jun 01 '17 at 09:46
  • @poofidoudou let's say you estimated an arima model. Call your first fitted value $z_1$. SInce it's the fitted value of an arima model, it's the estimated difference from $y_2$ and $y_1$. So to get the estimated level series you start with $y_1$, then $y_2=y_1+z_1$, $y_3=y_2+z_2$, and so on.... – Lucas Farias Jun 01 '17 at 09:51

0 Answers0