Announcement

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

  • sax12 seasonal adjustment

    Hello Statalisters,

    I am dealing with quarterly time-series data (containing GDP, revenues, and expenditures), I am in the process of seasonal adjustment using x-12-arima (sax12). I have followed the examples provided by stata-help (Seasonal adjustment for a multiseries). After running the commands, there should be a couple of files created for each variables (one example is Exp.d11 final seasonally adjusted data). The issue I faced was that not all required files were created. So, files like (d10 d11 d12 d13 isf isa itn iir) were not created, although, these are what I need. I run the following codes after setting up the directory, the data, and type of time series:

    foreach v of varlist GDPoil - Exp {
    sax12 `v', satype(single) comptype(none) transfunc(auto) regpre(const) outauto(ao ls) outlsrun(2) ammaxlag(2 1) ammaxdiff(1 1) ammaxlead(12) x11seas(x11default) sliding history justspc noview
    } # although it run successfully, it did not create all files for each variables as expected

    sax12, satype(mta) mtaspc("GDPoil GDPnon Revoil Exp") mtafile(oil.mta) compsa inpref(newoil.spc) compsadir transfunc(log) regpre(const lpyear) outauto(ao ls) outlsrun(0) x11mode(mult) x11seas(x11default) sliding history


    sax12im oil.out, ext(d10 d11 d12 d13 isf isa itn iir) # it reported an error: files do not exist, which is true!

    I would greatly appreciate your cooperation!

  • #2
    Dear all,

    I just try to use the mentioned command sax12, however, it returned this error:

    x12a.exe not found, please make sure it is under the adopath!

    Then I added the path, by typing in my do file this:

    adopath + "~/Library/Application Support/Stata/ado/"

    Yet the command doesn't run and the error is the same. (By the way I found out the path searching it by the viewsource sax12.ado)

    I don't understand; if the problem is the path then by adding it the error should be solved, isn't it? Or is there any other problem in the .ado file

    Any suggestions?

    Thanks in advance

    Marly Tati

    Comment


    • #3
      Originally posted by Ibti Al Abri View Post
      Hello Statalisters,

      I am dealing with quarterly time-series data (containing GDP, revenues, and expenditures), I am in the process of seasonal adjustment using x-12-arima (sax12). I have followed the examples provided by stata-help (Seasonal adjustment for a multiseries). After running the commands, there should be a couple of files created for each variables (one example is Exp.d11 final seasonally adjusted data). The issue I faced was that not all required files were created. So, files like (d10 d11 d12 d13 isf isa itn iir) were not created, although, these are what I need. I run the following codes after setting up the directory, the data, and type of time series:

      foreach v of varlist GDPoil - Exp {
      sax12 `v', satype(single) comptype(none) transfunc(auto) regpre(const) outauto(ao ls) outlsrun(2) ammaxlag(2 1) ammaxdiff(1 1) ammaxlead(12) x11seas(x11default) sliding history justspc noview
      } # although it run successfully, it did not create all files for each variables as expected

      sax12, satype(mta) mtaspc("GDPoil GDPnon Revoil Exp") mtafile(oil.mta) compsa inpref(newoil.spc) compsadir transfunc(log) regpre(const lpyear) outauto(ao ls) outlsrun(0) x11mode(mult) x11seas(x11default) sliding history


      sax12im oil.out, ext(d10 d11 d12 d13 isf isa itn iir) # it reported an error: files do not exist, which is true!

      I would greatly appreciate your cooperation!
      Hi Ibti,
      did you manage to find a solution for your issue?
      I'm having the same problem...
      Thank you

      Comment


      • #4
        I made some progress with this.

        The issue is in the forecast part within the sax12.ado file. I'm not entirely sure why, but the .spc file is not generated correctly for what concerns the forecasts. So I've deactivated the few lines of the code in sax12.ado that deal with forecast and now the .d11 file (i.e. the seasonally adjusted values) is now correctly created, alongside other output files that were not generated. The modified .ado file is attached.
        Attached Files

        Comment


        • #5
          Hi..
          I am getting the same error. I am trying to run the below code with the retail.dta dataset provided in the st0255 package:

          local place : pwd
          cd c:\temp
          sax12 retail, satype(single) transfunc(auto) ammaxdiff(2 1) ammaxlag(2 1) noview
          sax12im retail.out, ext(d11)
          ren retail_d11 retail_sa
          cd `place'

          it gives the error that it cannot find retail_d11 in the temp folder

          I am using the x12a.exe file obtained from here:
          http://www.eviews.com/download/older/x12.zip.

          I place this exe file inside the personal ado i.e C:/ado/plus
          This is where sax12.ado is also saved

          I have also tried using the modified sax12.ado file provided by David, but it gives the same error.

          I am using Stata 15 I/C
          Last edited by vikas sharma; 06 Oct 2018, 03:44.

          Comment

          Working...
          X