Optimization Settings for Conditional Mean Model Estimation

Optimization Options

estimate maximizes the loglikelihood function using fmincon from Optimization Toolbox™. fmincon has many optimization options, such as choice of optimization algorithm and constraint violation tolerance. Choose optimization options using optimoptions.

estimate uses the fmincon optimization options by default, with these exceptions. For details, see fmincon and optimoptions in Optimization Toolbox.

optimoptions PropertiesDescriptionestimate Settings
AlgorithmAlgorithm for minimizing the negative loglikelihood function'sqp'
DisplayLevel of display for optimization progress'off'
DiagnosticsDisplay for diagnostic information about the function to be minimized'off'
TolConTermination tolerance on constraint violations1e-7

If you want to use optimization options that differ from the default, then set your own using optimoptions.

For example, suppose that you want estimate to display optimization diagnostics. The best practice is to set the name-value pair argument 'Display','diagnostics' in estimate. Alternatively, you can direct the optimizer to display optimization diagnostics.

Define an AR(1) model Mdl and simulate data from it.

Mdl = arima('AR',0.5,'Constant',0,'Variance',1);
rng(1); % For reproducibility
y = simulate(Mdl,25);

By default, fmincon does not display the optimization diagnostics. Use optimoptions to set it to display the optimization diagnostics, and set the other fmincon properties to the default settings of estimate listed in the previous table.

options = optimoptions(@fmincon,'Diagnostics','on',...
    'Algorithm','sqp','Display','off','TolCon',1e-7)
% @fmincon is the function handle for fmincon
options = 

  fmincon options:

   Options used by current Algorithm ('sqp'):
   (Other available algorithms: 'active-set', 'interior-point', 'trust-region-reflective')

   Set by user:
      Algorithm: 'sqp'
    Diagnostics: 'on'
        Display: 'off'
         TolCon: 1.0000e-07

   Default:
    DerivativeCheck: 'off'
      DiffMaxChange: Inf
      DiffMinChange: 0
     FinDiffRelStep: 'sqrt(eps)'
        FinDiffType: 'forward'
        FunValCheck: 'off'
         GradConstr: 'off'
            GradObj: 'off'
        MaxFunEvals: '100*numberOfVariables'
            MaxIter: 400
     ObjectiveLimit: -1.0000e+20
          OutputFcn: []
           PlotFcns: []
       ScaleProblem: 'none'
             TolFun: 1.0000e-06
               TolX: 1.0000e-06
           TypicalX: 'ones(numberOfVariables,1)'
        UseParallel: 0

   Options not used by current Algorithm ('sqp')
   Default:
    AlwaysHonorConstraints: 'bounds'
                   HessFcn: []
                  HessMult: []
               HessPattern: 'sparse(ones(numberOfVariables))'
                   Hessian: 'not applicable'
          InitBarrierParam: 0.1000
     InitTrustRegionRadius: 'sqrt(numberOfVariables)'
                MaxPCGIter: 'max(1,floor(numberOfVariables/2))'
             MaxProjCGIter: '2*(numberOfVariables-numberOfEqualities)'
                MaxSQPIter: '10*max(numberOfVariables,numberOfInequalities...'
          PrecondBandWidth: 0
            RelLineSrchBnd: []
    RelLineSrchBndDuration: 1
       SubproblemAlgorithm: 'ldl-factorization'
                 TolConSQP: 1.0000e-06
                    TolPCG: 0.1000
                 TolProjCG: 0.0100
              TolProjCGAbs: 1.0000e-10


The options that you set appear under the Set by user: heading. The properties under the Default: heading are other options that you can set.

Fit Mdl to y using the new optimization options.

ToEstMdl = arima(1,0,0);
EstMdl = estimate(ToEstMdl,y,'Options',options);
____________________________________________________________
   Diagnostic Information

Number of variables: 3

Functions 
Objective:                            @(X)nLogLike(X,YData,XData,E,V,Mdl,AR.Lags,MA.Lags,maxPQ,T,isDistributionT,options,userSpecifiedY0,userSpecifiedE0,userSpecifiedV0,trapValue)
Gradient:                             finite-differencing
Hessian:                              finite-differencing (or Quasi-Newton)
Nonlinear constraints:                @(x)internal.econ.arimaNonLinearConstraints(x,LagsAR,LagsSAR,LagsMA,LagsSMA,tolerance)
Nonlinear constraints gradient:       finite-differencing

Constraints
Number of nonlinear inequality constraints: 1
Number of nonlinear equality constraints:   0
 
Number of linear inequality constraints:    0
Number of linear equality constraints:      0
Number of lower bound constraints:          3
Number of upper bound constraints:          3

Algorithm selected
   sequential quadratic programming


____________________________________________________________
   End diagnostic information
 
    ARIMA(1,0,0) Model:
    --------------------
    Conditional Probability Distribution: Gaussian

                                  Standard          t     
     Parameter       Value          Error       Statistic 
    -----------   -----------   ------------   -----------
     Constant     -0.0648568      0.234565      -0.276498
        AR{1}       0.463859      0.157813         2.9393
     Variance        1.23081      0.472745        2.60354

    Note:  

    • estimate numerically maximizes the loglikelihood function potentially using equality, inequality, and lower and upper bound constraints. If you set Algorithm to anything other than sqp, then check that the algorithm supports similar constraints, such as interior-point. For example, fmincon sets Algorithm to trust-region-reflective by default. trust-region-reflective does not support inequality constraints. Therefore, if you do not change the default Algorithm property value of fmincon, then estimate displays a warning. During estimation, fmincon temporarily sets Algorithm to active-set by default to satisfy the constraints.

    • estimate sets a constraint level of TolCon so constraints are not violated. Be aware that an estimate with an active constraint has unreliable standard errors since variance-covariance estimation assumes the likelihood function is locally quadratic around the maximum likelihood estimate.

Conditional Mean Model Constraints

The software enforces these constraints while estimating an ARIMA model:

  • Stability of nonseasonal and seasonal AR operator polynomials

  • Invertibility of nonseasonal and seasonal MA operator polynomials

  • Innovation variance strictly greater than zero

  • Degrees of freedom strictly greater than two for a t innovation distribution

See Also

| | |

More About

Was this topic helpful?