AR1 command changes 8/98

Motivation for changes

  1. Confusion about the 3 possible objective functions for AR(1)
    (Exact ML, GLS2 - drop first observation, and GLS1 - retain first observation but without Jacobian of Exact ML). Confusion was evident in Lovell and Selover, Econometric Software Accidents, The Economic Journal, May 1994, where these objective functions were not clearly distinguished from each other. Instead of the objective functions, packages have (partly by tradition) highlighted the algorithm instead, such as Cochrane-Orcutt or Hildreth-Lu. But this can be confusing, as pointed out in Judge et al, Introduction to the Theory and Practice of Econometrics, p.393, since "Cochrane-Orcutt" has been used to describe any 2-step iteration method, not just the GLS2 objective function. The objective function should be made clear, and the optimization algorithm merely made efficient. For a complete reference to AR(1) estimation, see Davidson and MacKinnon, Estimation and Inference in Econometrics, Chapter 10.
  2. Nonlinear Performance (multiple optima and convergence speed). The same Lovell and Selover article showed that packages are not adept at locating the global optimum, when multiple local optima exist (usually for GLS2). This is in spite of such multiple optima being common when lagged dependent variables are present. It is also ironic that the grid search methods which can find the global optimum (to some precision) are often implemented but are not used. As for convergence speed, the well known Cochrane-Orcutt method (for GLS2) can be extremely slow to converge (even when it finds the global optimum), so it can often result in answers which agree to only 1-2 digits with the true solution.

    Since the AR(1) model is one of the simplest nonlinear models (especially for GLS2), it should be possible to solve these performance problems, even though they may be too difficult to solve in general for more complicated models. With modern fast computers, it is worthwhile to make AR1 very accurate by default, so the user does not have to spend a lot of time setting various options to obtain a highly accurate solution.

  3. Preparation for Transfer Function (ARMA) models. Before tackling the estimation of more complicated ARMA regression models in TSP, it made sense to improve the AR1 model first, since it is often the first such model that people try. Even though it has been criticized because some people will try AR1 but not consider a more complicated alternative, it needs to be done correctly. Tests for more complicated alternatives should probably be added to it, as a transition to ARMA models.

Changes made to AR1

  1. Objective function. New option OBJFN=[EXACTML]/GLS2 . The old options METHOD=ML/MLGRID/CORC/HILU map to OBJFN in the obvious way. Output is labelled with the objective function, not the iteration method.
  2. Nonlinear Performance
    1. Multiple Optima. For GLS2, the new default is to use a grid search to roughly locate one or more local optima for rho. Iterations refine each local optimum, to determine the global optimum. The grid values are (-.9, -.8, ... 0, .1, ... .8, .85, .9, .95, .9999, 1.0001, 1.05). This allows optima with rho > 1 to be located, since iterations rarely can pass rho=1 (which is usually a singular point where the objective function is discontinuous). For Exact ML, multiple optima are not a common problem, so no grid search is undertaken by default.
    2. Convergence Speed. Quick and reliable iterations are needed to accurately locate local and thus global optima. So analytic second derivatives (HITER=N) were implemented and made the default. They have quadratic convergence speed near the optimum. For cases when the Hessian is indefinite, a special "modified Cholesky factorization" is used to find a change vector that will improve the objective function for all parameters. This is different from TSP's usual generalized inverse which sets some change vector elements to zero when the Hessian is indefinite.

      In testing for GLS2, the new HITER=N usually takes half the number of iterations, relative to the old default of Cochrane-Orcutt. For some models it took 1/5 or 1/10 of the iterations. And it always yields a very accurate solution (TOL = .000001 by default for AR1). For Exact ML, performance is usually about the same as the Beach-MacKinnon iteration method. HITER=G (like LSQ, without the special second derivative term) is also implemented, as are the usual Nonlinear options.

  3. RHO always in coefficient table In the past, RHO was only put into the coefficient table when it was required for consistent standard errors with explicit lagged dependent variables. Now it always appears, so that even hidden lagged dependent variables are handled (in one test, the SEs for the hidden lagged dependent variable and rho increased by a factor of two versus the inconsistent old SEs). This also makes the contents of @COEF and @RNMS more predictable to the user. Consistent SEs with instruments are now done (see also Bugfixes below). Since RHO always appears, the message about "consistent SEs" is no longer needed in the output, so it has been removed.
  4. More concise output, especially for lagged dependent variables. The warning message about changing from ML to GLS for lagged dependent variables or instruments is no longer printed; the GLS method is used by default in this case.

Bugs fixed

  1. Use with instruments (INST=) is now correct. Previously, the step which calculated RHO was incorrect (it used the wrong first order condition). The new results reproduce the LSQ(INST=(...)) numbers. In addition, @PHI = E'PZ*E is printed and stored. The identification check (number of instruments) >= (number of RHS variables) + 1 is also made. Consistent SEs with instruments and lagged dependent variables are also calculated.
  2. TSCS now handles individuals (or sample periods) with single observations correctly.

Non-upward compatibility

  1. WEIGHT= no longer supported (currently). It is too complex to handle in the new derivative code. A warning message is given, suggesting the user should try the ML or LSQ commands instead to implement a weight.
  2. @SRHO and @TRHO are no longer stored (standard error and t-statistic for RHO). These are now always stored as the last elements of @SES and @T.

Possible future enhancements

  1. HCOV=W (QMLE / heteroskedastic-robust SEs)
  2. common factor test (same as WNLAR in REGOPT), where the alternative is an unrestricted OLS regression on X, y(-1) and X(-1).
  3. TSCS with GLS2 (instead of just ML). Drops first observation of each individual or SMPL pair.
  4. test for higher order AR(p)
  5. Q-statistics for higher order autocorrelation
  6. possibly improve ML iteration speed by starting at zeroes
  7. Sargan 2SLS (rho-differenced instruments)