Announcement

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

  • The new AUTOArima Mata class: you are free to use it if you want auto-ARIMA in your command

    Thanks to Kit Baum's adding the arimaauto command to the SSC, the class is publicly available after its installation.
    More in this post. You will need to install hegy (not hegy4!) and kpss commands.

    The Mata code:
    https://github.com/econcz/stata-arim...arimaauto.mata

    The certification file:
    https://github.com/econcz/stata-arim...rtification.do

    Comments:
    ARIMAAuto (stored in the larimaauto.mlib file) stores several types of variables in an associative array (of which it is itself a child) declared with:

    Code:
    . mata: AA = ARIMAAuto()
    Contents of variables are stored and read with:

    Code:
    . mata: AA.put("key", value)
    . mata: AA.get("key")
    where "key" is the name of the variable.

    The variables are varlist - [varlist] (string scalar), ifin - concatenated [if] [in] (string scalar), iw - [weight] (string scalar), o_* - options (string scalar), f_* - flags (real scalar), level - level (real scalar), mode and ic - information criteria (string scalar), and finally L, T, and MS - real matrices of limits, tests, and models.

    NB The variables should be declared in the above given order.

    L is a (1 x 8) matrix/vector of which arimaauto's r(limits) is a transposed copy, i.e. r(limits) = AA.get("L")'
    T
    is a (. x 6) matrix of which arimaauto's r(tests) is a copy, i.e. r(tests) = AA.get("T")
    MS is a (. x 12) matrix of which arimaauto's r(models) is a reduced copy, i.e. r(tests) = AA.get("MS")[,(1,3,4,6,8,10,11,12)]. The left out columns are #d, #D, #s, and constant (in the given order).

    NB The example of their use can be found in the arimaauto.ado file.

    PS ARIMAAuto includes a virtual function get_cv_seas() returning a real matrix of critical values (test x 0.01,0.05,0.10) for the hegy test (second row is retrieved), which can be replaced in an eventual child class when a different test is required (the second row rule must be observed, for example, coding AA.put("T", J(1,6,.)) in the beginning) together with the other variables). ARIMAAuto considers unit root to be present if statistic > critical value, hence signs may need to be adjusted for unit root tests other than hegy, [TS] dfgls, and kpss.

    PSS All estimations in ARIMAAuto are performed under version 13.



  • #2
    NB You may need to compile the larimaauto.mlib file yourself (running the mata file from GitHub) if you are using Stata 16 or lower. Sadly, Stata compiler does not respect version 13.0.
    The arimaauto command will be updated to address this issue in future.

    Comment

    Working...
    X