Announcement

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

  • arimasoc vs arima -- different results

    Dear All,

    I have been working with some time-series data (please refer to the attached spreadsheet). I utilized the code below to fit an ARMA(1,2) model to the Y series. However, upon using arimasoc, it's evident from the output table that the ARMA(1,2) model yields different log-likelihood and information criteria values.

    I suspect that there might be an error on my end, or perhaps the two commands employ different convergence techniques. Could you please assist me in identifying the discrepancy, or advise if there are default options I should utilize to ensure consistency in the results obtained from the two commands? Thank you for your assistance. (The code is provided below.)

    Code:
    clear
    
    gen Time = mofd(Date)
    
    format Time %tmMonYY
    
    drop Date
    
    gen t = _n
    
    tsset t
    
    arima Y, ar(1) ma(2) 
    
    estat ic
    
    arimasoc Y, maxar(2) maxma(2)
    Attached Files

  • #2
    For lag orders greater or equal to 2 (for both the AR and MA components), the model that arimasoc estimates includes all lower level lags.

    Code:
    webuse usmacro, clear
    arimasoc ogap, maxar(2) maxma(2)
    arima ogap, ar(1) ma(1/2)
    Res.:

    Code:
    . arimasoc ogap, maxar(2) maxma(2)
    Fitting models (9): ......... done
    
    Lag-order selection criteria
    
    Sample: 1954q3 thru 2010q4                       Number of obs = 226
    --------------------------------------------------------------------
           Model |        LL         df        AIC        BIC       HQIC
    -------------+------------------------------------------------------
       ARMA(0,0) | -549.4036          2   1102.807   1109.648   1105.568
       ARMA(0,1) | -435.0753          3   876.1507   886.4123   880.2919
       ARMA(0,2) |  -361.249          4   730.4981   744.1802   736.0196
       ARMA(1,0) | -292.3313          3   590.6625   600.9241   594.8037
       ARMA(1,1) | -281.5762          4   571.1524   584.8345   576.6739
       ARMA(1,2) | -275.3697          5   560.7395   577.8422   567.6414
       ARMA(2,0) | -276.5956          4   561.1912   574.8733   566.7127
       ARMA(2,1) | -273.9052          5   557.8104   574.9131   564.7123
       ARMA(2,2) | -273.2799          6   558.5599   579.0831   566.8422
    --------------------------------------------------------------------
    Selected (max) LL:   ARMA(2,2)
    Selected (min) AIC:  ARMA(2,1)
    Selected (min) BIC:  ARMA(2,0)
    Selected (min) HQIC: ARMA(2,1)
    
    .
    . arima ogap, ar(1) ma(1/2)
    
    (setting optimization to BHHH)
    Iteration 0:  Log likelihood = -278.31258  
    Iteration 1:  Log likelihood = -276.00767  
    Iteration 2:  Log likelihood = -275.50366  
    Iteration 3:  Log likelihood = -275.40699  
    Iteration 4:  Log likelihood = -275.38101  
    (switching optimization to BFGS)
    Iteration 5:  Log likelihood = -275.37312  
    Iteration 6:  Log likelihood = -275.36975  
    Iteration 7:  Log likelihood = -275.36974  
    
    ARIMA regression
    
    Sample: 1954q3 thru 2010q4                      Number of obs     =        226
                                                    Wald chi2(3)      =    1135.72
    Log likelihood = -275.3697                      Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
                 |                 OPG
            ogap | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    ogap         |
           _cons |   -.800509   .8780935    -0.91   0.362    -2.521541    .9205226
    -------------+----------------------------------------------------------------
    ARMA         |
              ar |
             L1. |   .8990366   .0355157    25.31   0.000     .8294272    .9686461
                 |
              ma |
             L1. |   .3263841   .0623434     5.24   0.000     .2041932    .4485749
             L2. |   .2254193   .0613523     3.67   0.000     .1051709    .3456677
    -------------+----------------------------------------------------------------
          /sigma |   .8136397    .029494    27.59   0.000     .7558325    .8714469
    ------------------------------------------------------------------------------
    Note: The test of the variance against zero is one sided, and the two-sided
          confidence interval is truncated at zero.
    
    .
    Last edited by Andrew Musau; 28 Apr 2024, 09:30.

    Comment


    • #3
      Thank you Andrew. It seems my mistake was that I only included 1 lag for MA term, as opposed to both. Need to be more careful, thanks again!

      Comment

      Working...
      X