Announcement

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

  • ARIMA and SPSS

    We are discontinuing use of SPSS (a product I have never used) in our office and one of my colleagues provided me with this code and asked me to translate it into STATA. The data is a monthly time series variable name "electric" .

    Here's the SPSS Code:

    GET
    FILE='I:\HOME\JCJ\DIGEST\Indelec.sav'.

    * ARIMA.
    TSET PRINT=DEFAULT CIN=95 NEWVAR=ALL .
    PREDICT THRU YEAR 2018 MONTH 12 .
    ARIMA electric
    /MODEL=( 0 1 1 )( 0 1 1 ) LN CONSTANT
    /MXITER 10
    /PAREPS .001
    /SSQPCT .001
    /FORECAST EXACT .



    so far I successfully import the data into STATA and turn it into a time series.

    because of the use of the LN option I create a log of the variable and because of the CONSTANT option I do nothing because constant is the default in STATA.

    Here's my .do file so far:

    gen ln_electric = ln(electric)
    arima ln_electric, arima(0,1,1) sarima(0, 1 , 1 , 12)

    I'm not sure what the other sub options (MXITER PAREPS SSQPCT) do. I'm not sure how to the PREDICT functions work in SPSS. My colleague tells me the SPSS code returns a prediction of the original level. I have been unable to replicate these results in STATA.

    Any help would be appreciated.

  • #2
    Originally posted by Patrick J. Flaherty View Post
    I'm not sure what the other sub options (MXITER PAREPS SSQPCT) do. I'm not sure how to the PREDICT functions work in SPSS. My colleague tells me the SPSS code returns a prediction of the original level. I have been unable to replicate these results in STATA.
    From the SPSS 25 help file for ARIMA:

    ARIMA will continue to iterate until one of four termination criteria is met. The values of these criteria can be changed using any of the following subcommands followed by the new value:
    MXITER. Maximum number of iterations. The value specified can be any integer equal to or greater than 0. If MXITER equals 0, initial parameter values become final estimates to be used in forecasting. The default value is 10.
    PAREPS. Parameter change tolerance. The value specified can be any real number greater than 0. A change in all of the parameters by less than this amount causes termination. The default is the value set on TSET CNVERGE. If TSET CNVERGE is not specified, the default is 0.001. A value specified on PAREPS overrides the value set on TSET CNVERGE.
    SSQPCT. Sum of squares percentage. The value specified can be a real number greater than 0 and less than or equal to 100. A relative change in the adjusted sum of squares by less than this amount causes termination. The default value is 0.001%.
    MXLAMB. Maximum lambda. The value specified can be any integer. If the Marquardt constant exceeds this value, estimation is terminated. The default value is 1,000,000,000 (109).

    HTH.
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      If Bruce hasn't answered your question then a replicable example might help. Create a 100 case extract, tell us the results that SPSS gives, and then use dataex to post the extract.

      Or, conversely, use one of the arima data sets that comes with Stata and analyze it with SPSS and tell us what SPSS says.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment


      • #4
        Thanks for the help. I no longer have access to SPSS.

        Comment

        Working...
        X