Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to predict future data by running AR Regressions

    Hello everyone, I have time-series data from the year 2007 to 2019 looking into Rail & Inland Waterways Transportation. I have carried out the first difference of the two variables 'Rail Freight' and InlandFreightTonneKm' to create the variables 'RailFreightFirstDifference' and 'INWFreightFirstDifference'. Based on these two variables created, I carried out the ADF test separately and the time-series were stationary. Similarly, I carried the Akaike Information Criterion (AIC) and found the optimal lags in both cases were two.

    Thus, my regression equations are the following:

    ΔRoadt = β0 + β1ΔRoadt-1 + β2ΔRoadt-2 + ɛt
    ΔRailt = β0 + β1ΔRailt-1 + β2ΔRailt-2 + ɛt


    I am facing the following problem: I cannot understand how should I run the regression so that from the regression results, I could calculate predictions in the changes in Rail and Inland Transportation from 2020 to 2030.

    I have also attached the example of the variables in the data set using dataex.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int year double(RailFreight InlandFreightTonneKilometers) float(RailFreightFirstDifference INWFreightFirstDifference)
    2007 5215857.5    28064         .        .
    2008   5517042    29483  301184.5     1419
    2009 6001460.5    37085  484418.5     7602
    2010 6258546.5    40259    257086     3174
    2011 6676754.5    38098    418208    -2161
    2012 6492099.5    30629   -184655    -7469
    2013   6656881    24183  164781.5    -6446
    2014   6812517    28468    155636     4285
    2015 6542969.5    34597 -269547.5     6129
    2016 6205501.5    38308   -337468     3711
    2017   6934109 41297.89  728607.5  2989.89
    2018   7389954 47421.54    455845  6123.65
    2019 7081282.5 44412.36 -308671.5 -3009.18
    end
Working...
X