Maximum Likelihood MT

Maximum Likelihood MT 2.0

MaxlikMT 2.0 contains a set of procedures for the solution of the maximum likelihood problem with bounds on parameters.

Major Features of MaxLikMT

  • Structures
  • Simple bounds
  • Hypothesis testing for models with bounded parameters
  • Log-likelihood function
  • AlgorithmSecant algorithms
  • Line search methods
  • Weighted maximum likelihood
  • Active and inactive parameters
  • Bounds

In MaxlikMT, the same procedure computing the log-likelihood or objective function will be used to compute analytical derivatives as well if they are being provided. Its return argument is a maxlikmtResults structure with three members, a scalar, or Nx1 vector containing the log-likelihood (or objective), a 1xK vector, or NxK matrix of first derivatives, and a KxK matrix or NxKxK array of second derivatives (it needs to be an array if the log-likelihood is weighted).

Of course the derivatives are optional, or even partially optional, i.e., you can compute a subset of the derivatives if you like and the remaining will be computed numerically. This procedure will have an additional argument which tells the function which to compute, the log-likelihood or objective, the first derivatives, or the second derivatives, or all three. This means that calculations in common will not have to be redone.

Platform: Windows, Mac, and Linux.

Requirements: GAUSS/GAUSS Light version 10 or higher; Linux requires version 10.0.4 or higher.

Threading in MaxlikMT

If you have a multi-core processor you may take advantage of MaxlikMT’s internally threaded functions. An important advantage of threading occurs in computing numerical derivatives. If the derivatives are computed numerically, threading will significantly decrease the time of computation.

Example

We ran a very small problem on a quad-core machine. As is the case for most real world problems, not all sections of the code are able to be run in parallel. Therefore, the theoretical limit for speed increase is much less than (single-threaded execution time)/(number of cores). Also, in a problem with very short execution time, threading overhead becomes a larger percentage of overall computing time.

Even so, the execution time of our program was cut dramatically:

Single-threaded execution time: 0.095750000 minutes
Multi-threaded execution time: 0.0382667 minutes

That is a greater than 250% speed increase! Larger speed increases can be seen with larger problems.

MaxlikMT uses structures for input, control, and output. Structures add flexibility and help organize information. MaxlikMT uses the DS and PV structures that are available in the GAUSS Run-Time Library.

The DS Structure

The DS structure is completely flexible, allowing you to pass anything you can think of into your procedure. There is a member of the structure for every GAUSS data type.

struct DS {
scalar type;
matrix dataMatrix;
array dataArray;
string dname;
string array vnames;
};



The PV Structure

The PV structure revolutionizes how you pass the parameters into the procedure. No longer do you have to struggle to get the parameter vector into matrices for calculating the function and its derivatives, trying to remember, or figure out, which parameter is where in the vector.

If your log-likelihood uses matrices or arrays,you can store them directly into the PV structure and remove them as matrices or arrays with the parameters already plugged into them. The PV structure can handle matrices and arrays in which some of their elements are fixed and some free. It remembers the fixed parameters and knows where to plug in the current values of the free parameters. It can also handle symmetric matrices in which parameters below the diagonal are repeated above the diagonal.

b0 – Mean paramters.
garch – GARCH parameters.
arch – ARCH parameters.
omega – Constant in variance equation.



There is no longer any need to use global variables. Anything the procedure needs can be passed into it through the DS structure. And these new applications uses control structures rather than global variables. This means, in addition to thread safety, that it is straightforward to nest calls to MaxlikMT inside of a call to MaxlikMT ,QNewtonmt, QProgmt, or EQsolvemt.

Functions

MaxlikMT: Computes estimates of parameters of a maximum likelihood function with bounds on parameters.

MaxlikMTBayes: Bayesian Inference using weighted maximum likelihood bootstrap.

MaxlikMTBoot: Computes bootsrap estimates.

MaxlikMTProfile: Computes profile t plots and likelihood profile traces for maximum likelihood models.

MaxlikMTProfileLimits: Computes confidence limits by inversion of the likelihood ratio statistic.

MaxlikMTInverseWaldLimits: Computes confidence limits by inversion of the Wald statistic.

MaxlikMTControlCreate: Creates a default instance of type MaxlikMTControl.

MaxlikMTResultsCreate: Creates a default instance of type MaxlikMTResults.

ModelResultsCreate: Creates a default instance of type ModelResults.

MaxlikMTPrt: Formats and prints the output form a call to MaxlikMT.