<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>G13DCF : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/G13/g13dcf.pdf">G13DCF (PDF version)</a></div><div><a class="chap" href="g13conts.xml">G13 Chapter Contents</a></div><div><a class="chapint" href="g13intro.xml">G13 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>G13DCF</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> 
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocfcomments');"><span class="htmltocplus" id="tocfcommentsplus">+</span><span class="htmltocminus" id="tocfcommentsminus">&#8722;</span></span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
<div class="htmltocitem" id="tocfcomments">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments0">8.1&#160;&#160;<b>Memory Usage</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments1">8.2&#160;&#160;<b>Timing</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments2">8.3&#160;&#160;<b>Constraining for Stationarity and Invertibility</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments3">8.4&#160;&#160;<b>Over-parameterisation</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments4">8.5&#160;&#160;<b>Standardizing the Residual Series</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments5">8.6&#160;&#160;<b>Assessing the Fit of the Model</b></a>
</div>
</div>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">G13DCF fits a vector autoregressive moving average (VARMA) model to an observed vector of time series using the method of Maximum Likelihood (ML). Standard errors of parameter estimates are computed along with their appropriate correlation matrix. The routine also calculates estimates of the residual series.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;G13DCF&#160;(</td><td class="tdfspec2"><a class="arg" href="#K">K</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#IP">IP</a>, <a class="arg" href="#IQ">IQ</a>, <a class="arg" href="#MEAN">MEAN</a>, <a class="arg" href="#PAR">PAR</a>, <a class="arg" href="#NPAR">NPAR</a>, <a class="arg" href="#QQ">QQ</a>, <a class="arg" href="#KMAX">KMAX</a>, <a class="arg" href="#W">W</a>, <a class="arg" href="#PARHLD">PARHLD</a>, <a class="arg" href="#EXACT">EXACT</a>, <a class="arg" href="#IPRINT">IPRINT</a>, <a class="arg" href="#CGETOL">CGETOL</a>, <a class="arg" href="#MAXCAL">MAXCAL</a>, <a class="arg" href="#ISHOW">ISHOW</a>, <a class="arg" href="#NITER">NITER</a>, <a class="arg" href="#RLOGL">RLOGL</a>, <a class="arg" href="#V">V</a>, <a class="arg" href="#G">G</a>, <a class="arg" href="#CM">CM</a>, <a class="arg" href="#LDCM">LDCM</a>, <a class="arg" href="#WORK">WORK</a>, <a class="arg" href="#LWORK">LWORK</a>, <a class="arg" href="#IW">IW</a>, <a class="arg" href="#LIW">LIW</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">K, N, IP, IQ, NPAR, KMAX, IPRINT, MAXCAL, ISHOW, NITER, LDCM, LWORK, IW(1), LIW, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">PAR(NPAR), QQ(KMAX,K), W(KMAX,N), CGETOL, RLOGL, V(KMAX,N), G(NPAR), CM(LDCM,NPAR), WORK(1)</td></tr><tr><td class="tdfspec1">LOGICAL</td><td class="tdfspec2">MEAN, PARHLD(NPAR), EXACT</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">Let <m:math>
 <m:msub><m:mi>W</m:mi><m:mi>t</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mfenced separators=""><m:msub><m:mi>w</m:mi><m:mrow><m:mn>1</m:mn><m:mi>t</m:mi></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:mi>w</m:mi><m:mrow><m:mn>2</m:mn><m:mi>t</m:mi></m:mrow></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>w</m:mi><m:mrow><m:mi>k</m:mi><m:mi>t</m:mi></m:mrow></m:msub></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
</m:math>, for <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, denote a vector of <m:math><m:mi>k</m:mi></m:math>&#160;time series which is assumed to follow a multivariate ARMA model of the form

<div class="formula-eqn"><a name="eqn1" id="eqn1"/><table class="formula-eqn"><tr><td class="formula-eqn"><m:math display="block">
<m:mtable columnalign="left">
 <m:mtr>
  <m:mtd><m:msub><m:mi>W</m:mi><m:mi>t</m:mi></m:msub><m:mo>-</m:mo><m:mi>&#956;</m:mi><m:mo>=</m:mo></m:mtd>
  <m:mtd><m:msub><m:mi>&#981;</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:msub><m:mi>W</m:mi><m:mrow><m:mi>t</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>-</m:mo><m:mi>&#956;</m:mi></m:mfenced><m:mo>+</m:mo><m:msub><m:mi>&#981;</m:mi><m:mn>2</m:mn></m:msub><m:mfenced separators=""><m:msub><m:mi>W</m:mi><m:mrow><m:mi>t</m:mi><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:msub><m:mo>-</m:mo><m:mi>&#956;</m:mi></m:mfenced><m:mo>+</m:mo><m:mo>&#8943;</m:mo><m:mo>+</m:mo><m:msub><m:mi>&#981;</m:mi><m:mi>p</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>W</m:mi><m:mrow><m:mi>t</m:mi><m:mo>-</m:mo><m:mi>p</m:mi></m:mrow></m:msub><m:mo>-</m:mo><m:mi>&#956;</m:mi></m:mfenced></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd><m:mo>+</m:mo><m:msub><m:mi>&#949;</m:mi><m:mi>t</m:mi></m:msub><m:mo>-</m:mo><m:msub><m:mi>&#952;</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mi>t</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>-</m:mo><m:msub><m:mi>&#952;</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mi>t</m:mi><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:msub><m:mo>-</m:mo><m:mo>&#8943;</m:mo><m:mo>-</m:mo><m:msub><m:mi>&#952;</m:mi><m:mi>q</m:mi></m:msub><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mi>t</m:mi><m:mo>-</m:mo><m:mi>q</m:mi></m:mrow></m:msub></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula-eqn2">
      (1)
     </td></tr></table></div>

where <m:math>
 <m:msub><m:mi>&#949;</m:mi><m:mi>t</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msup><m:mfenced separators=""><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mn>1</m:mn><m:mi>t</m:mi></m:mrow></m:msub><m:mo>,</m:mo><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mn>2</m:mn><m:mi>t</m:mi></m:mrow></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mi>k</m:mi><m:mi>t</m:mi></m:mrow></m:msub></m:mfenced><m:mi mathvariant="normal">T</m:mi></m:msup>
</m:math>, for <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, is a vector of <m:math><m:mi>k</m:mi></m:math>&#160;residual series assumed to be Normally distributed with zero mean and positive-definite covariance matrix <m:math><m:mi>&#931;</m:mi></m:math>.  The components of <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>t</m:mi></m:msub></m:math>&#160;are assumed to be uncorrelated at non-simultaneous lags.  The <m:math><m:msub><m:mi>&#981;</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>&#952;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;are <m:math><m:mi>k</m:mi></m:math>&#160;by <m:math><m:mi>k</m:mi></m:math>&#160;matrices of parameters.  <m:math><m:mfenced open="{" close="}" separators=""><m:msub><m:mi>&#981;</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>p</m:mi></m:math>, are called the autoregressive (AR) parameter matrices, and <m:math><m:mfenced open="{" close="}" separators=""><m:msub><m:mi>&#952;</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>q</m:mi></m:math>, the moving average (MA) parameter matrices.  The parameters in the model are thus the <m:math><m:mi>p</m:mi></m:math>&#160;(<m:math><m:mi>k</m:mi></m:math>&#160;by <m:math><m:mi>k</m:mi></m:math>) <m:math><m:mi>&#981;</m:mi></m:math>-matrices, the <m:math><m:mi>q</m:mi></m:math>&#160;(<m:math><m:mi>k</m:mi></m:math>&#160;by <m:math><m:mi>k</m:mi></m:math>) <m:math><m:mi>&#952;</m:mi></m:math>-matrices, the mean vector, <m:math><m:mi>&#956;</m:mi></m:math>, and the residual error covariance matrix <m:math><m:mi>&#931;</m:mi></m:math>.  Let

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>A</m:mi><m:mfenced separators=""><m:mi>&#981;</m:mi></m:mfenced><m:mo>=</m:mo><m:msub>
<m:mfenced open="[" close="]" separators="">
 <m:mtable columnalign="left">
  <m:mtr>
   <m:mtd><m:msub><m:mi>&#981;</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
   <m:mtd><m:mi>I</m:mi></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>&#981;</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mi>I</m:mi></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>&#981;</m:mi><m:mrow><m:mi>p</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mi>I</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>&#981;</m:mi><m:mi>p</m:mi></m:msub></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr>
 </m:mtable>
</m:mfenced>
<m:mrow><m:mi>p</m:mi><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>p</m:mi><m:mi>k</m:mi></m:mrow>
</m:msub>
<m:mtext>&#8195; and&#8195;</m:mtext><m:mi>B</m:mi><m:mfenced separators=""><m:mi>&#952;</m:mi></m:mfenced><m:mo>=</m:mo><m:msub>
<m:mfenced open="[" close="]" separators="">
 <m:mtable columnalign="left">
  <m:mtr>
   <m:mtd><m:msub><m:mi>&#952;</m:mi><m:mn>1</m:mn></m:msub></m:mtd>
   <m:mtd><m:mi>I</m:mi></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>&#952;</m:mi><m:mn>2</m:mn></m:msub></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mi>I</m:mi></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd/>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd/>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>&#952;</m:mi><m:mrow><m:mi>q</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mi>I</m:mi></m:mtd>
  </m:mtr><m:mtr>
   <m:mtd><m:msub><m:mi>&#952;</m:mi><m:mi>q</m:mi></m:msub></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mo>.</m:mo></m:mtd>
   <m:mtd><m:mn>0</m:mn></m:mtd>
  </m:mtr>
 </m:mtable>
</m:mfenced>
<m:mrow><m:mi>q</m:mi><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>q</m:mi><m:mi>k</m:mi></m:mrow>
</m:msub>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mi>I</m:mi></m:math>&#160;denotes the <m:math><m:mi>k</m:mi></m:math>&#160;by <m:math><m:mi>k</m:mi></m:math>&#160;identity matrix.</div><div class="paramtext">The ARMA model <a class="eqn" href="#eqn1">(1)</a> is said to be stationary if the eigenvalues of <m:math><m:mi>A</m:mi><m:mfenced separators=""><m:mi>&#981;</m:mi></m:mfenced></m:math>&#160;lie inside the unit circle.  Similarly, the ARMA model <a class="eqn" href="#eqn1">(1)</a> is said to be invertible if the eigenvalues of <m:math><m:mi>B</m:mi><m:mfenced separators=""><m:mi>&#952;</m:mi></m:mfenced></m:math>&#160;lie inside the unit circle.</div><div class="paramtext">The method of computing the exact likelihood function (using a Kalman filter algorithm) is discussed in <a class="ref" href="#ref430">Shea (1987)</a>.  A quasi-Newton algorithm (see <a class="ref" href="#ref336">Gill and Murray (1972)</a>) is then used to search for the maximum of the log-likelihood function.  Stationarity and invertibility are enforced on the model using the reparameterisation discussed in <a class="ref" href="#ref431">Ansley and Kohn (1986)</a>.  Conditional on the maximum likelihood estimates being equal to their true values the estimates of the residual series are uncorrelated with zero mean and constant variance <m:math><m:mi>&#931;</m:mi></m:math>.</div><div class="paramtext">You have the option of setting a parameter (<a class="arg" href="#EXACT">EXACT</a> to .FALSE.) so that G13DCF calculates conditional maximum likelihood estimates (conditional on <m:math><m:msub><m:mi>W</m:mi><m:mn>0</m:mn></m:msub><m:mo>=</m:mo><m:msub><m:mi>W</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>=</m:mo><m:mo>&#8943;</m:mo><m:mo>=</m:mo><m:msub><m:mi>W</m:mi><m:mrow><m:mn>1</m:mn><m:mo>-</m:mo><m:mi>p</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:msub><m:mi>&#949;</m:mi><m:mn>0</m:mn></m:msub><m:mo>=</m:mo><m:msub><m:mi>&#949;</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mo>=</m:mo><m:mo>&#8943;</m:mo><m:mo>=</m:mo><m:mspace linebreak="newline"/>
<m:msub><m:mi>&#949;</m:mi><m:mrow><m:mn>1</m:mn><m:mo>-</m:mo><m:mi>q</m:mi></m:mrow></m:msub><m:mo>=</m:mo><m:mn>0</m:mn></m:math>).  This may be useful if the exact maximum likelihood estimates are close to the boundary of the invertibility region.</div><div class="paramtext">You also have the option (see <a class="sec" href="#parameters">Section 5</a>) of requesting G13DCF to constrain elements of the <m:math><m:mi>&#981;</m:mi></m:math>&#160;and <m:math><m:mi>&#952;</m:mi></m:math>&#160;matrices and <m:math><m:mi>&#956;</m:mi></m:math>&#160;vector to have pre-specified values.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref431" id="ref431"/>Ansley C F and Kohn R (1986)  A note on reparameterising a vector autoregressive moving average model to enforce stationarity <i>J. Statist. Comput. Simulation</i> <b>24</b> 99&#8211;106 </div>
<div class="paramtext"><a name="ref336" id="ref336"/>Gill P E and Murray W (1972)  Quasi-Newton methods for unconstrained optimization <i>J. Inst. Math. Appl.</i> <b>9</b> 91&#8211;108 </div>
<div class="paramtext"><a name="ref430" id="ref430"/>Shea B L (1987)  Estimation of multivariate time series <i>J. Time Ser. Anal.</i> <b>8</b> 95&#8211;110 </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="K" id="K"/>1: &#160;&#160;&#8194; K &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 


<m:math><m:mi>k</m:mi></m:math>, the number of observed time series.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="N" id="N"/>2: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:mi>n</m:mi></m:math>, the number of observations in each time series.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>3</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="IP" id="IP"/>3: &#160;&#160;&#8194; IP &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <m:math><m:mi>p</m:mi></m:math>, the number of AR parameter matrices.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="IQ" id="IQ"/>4: &#160;&#160;&#8194; IQ &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mi>q</m:mi></m:math>, the number of MA parameter matrices.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>.
<div class="paramtext"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;is <b>not</b> <b>permitted</b>.</div></div></dd><dt class="paramhead"><a name="MEAN" id="MEAN"/>5: &#160;&#160;&#8194; MEAN &#8211; LOGICAL<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'M'</m:mtext></m:math>,
if components of <m:math><m:mi>&#956;</m:mi></m:math>&#160;have been estimated and  
<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'Z'</m:mtext></m:math>, if all elements of <m:math><m:mi>&#956;</m:mi></m:math>&#160;are to be taken as zero.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'M'</m:mtext></m:math>&#160;or <m:math><m:mtext>'Z'</m:mtext></m:math>.
</div></dd><dt class="paramhead"><a name="PAR" id="PAR"/>6: &#160;&#160;&#8194; PAR(<a class="arg" href="#NPAR">NPAR</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: initial parameter estimates read in row by row in the order <m:math><m:msub><m:mi>&#981;</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>&#981;</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>&#981;</m:mi><m:mi>p</m:mi></m:msub></m:math>, <m:math><m:msub><m:mi>&#952;</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>&#952;</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>&#952;</m:mi><m:mi>q</m:mi></m:msub><m:mo>,</m:mo><m:mi>&#956;</m:mi></m:math>. 
<div class="paramtext">Thus, 
<ul class="listind"><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mfenced separators=""><m:mi>l</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mfenced separators=""><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;must be set equal to an initial estimate of the <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>th element of <m:math><m:msub><m:mi>&#981;</m:mi><m:mi>l</m:mi></m:msub></m:math>, for <m:math><m:mi>l</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>p</m:mi></m:math>&#160;and <m:math><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>p</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mfenced separators=""><m:mi>l</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mfenced separators=""><m:mi>i</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mi>j</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;must be set equal to an initial estimate of the <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>th element of <m:math><m:msub><m:mi>&#952;</m:mi><m:mi>l</m:mi></m:msub></m:math>, <m:math><m:mi>l</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>q</m:mi></m:math>&#160;and <m:math><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mfenced separators=""><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>q</m:mi></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mi>i</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;should be set equal to an initial estimate of the <m:math><m:mi>i</m:mi></m:math>th component of <m:math><m:mi>&#956;</m:mi></m:math>&#160;(<m:math><m:mi>&#956;</m:mi><m:mfenced separators=""><m:mi>i</m:mi></m:mfenced></m:math>). (If you set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mfenced separators=""><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>q</m:mi></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mi>i</m:mi></m:mrow></m:mfenced></m:mrow></m:math>&#160;to <m:math><m:mn>0.0</m:mn></m:math>&#160;then G13DCF will calculate the mean of the <m:math><m:mi>i</m:mi></m:math>th series and use this as an initial estimate of <m:math><m:mi>&#956;</m:mi><m:mfenced separators=""><m:mi>i</m:mi></m:mfenced></m:math>.)</li></ul>
</div>
<div class="paramtext">The first <m:math><m:mi>p</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi></m:math>&#160;elements of <a class="arg" href="#PAR">PAR</a> must satisfy the stationarity condition and the next <m:math><m:mi>q</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi></m:math>&#160;elements of <a class="arg" href="#PAR">PAR</a> must satisfy the invertibility condition.</div>
<div class="paramtext">If in doubt set all elements of <a class="arg" href="#PAR">PAR</a> to <m:math><m:mn>0.0</m:mn></m:math>.</div>
</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then all the elements of <a class="arg" href="#PAR">PAR</a> will be overwritten by the latest estimates of the corresponding ARMA parameters.</div></dd><dt class="paramhead"><a name="NPAR" id="NPAR"/>7: &#160;&#160;&#8194; NPAR &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 
the dimension of the arrays  <a class="arg" href="#PAR">PAR</a>, <a class="arg" href="#PARHLD">PARHLD</a> and <a class="arg" href="#G">G</a> and 

the second dimension of the array <a class="arg" href="#CM">CM</a> as declared in the (sub)program from which G13DCF is called.
<div class="paramtext"><a class="arg" href="#NPAR">NPAR</a> is the number of initial parameter estimates.  The total number of observations <m:math><m:mfenced separators=""><m:mi>n</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi></m:mfenced></m:math>&#160;must exceed the total number of parameters in the model (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction><m:mo>+</m:mo><m:mi>k</m:mi><m:mfenced separators=""><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>/</m:mo><m:mn>2</m:mn></m:math>).</div>
</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <a class="arg" href="#NPAR">NPAR</a> must be set equal to <m:math><m:msub><m:mi>k</m:mi><m:mn>6</m:mn></m:msub><m:mo>=</m:mo><m:mfenced separators=""><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>q</m:mi></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, <a class="arg" href="#NPAR">NPAR</a> must be set equal to <m:math><m:msub><m:mi>k</m:mi><m:mn>6</m:mn></m:msub><m:mo>=</m:mo><m:mfenced separators=""><m:mi>p</m:mi><m:mo>+</m:mo><m:mi>q</m:mi></m:mfenced><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>&#215;</m:mo><m:mi>k</m:mi><m:mo>+</m:mo><m:mi>k</m:mi></m:math>.</li>
</ul></div>
</dd><dt class="paramhead"><a name="QQ" id="QQ"/>8: &#160;&#160;&#8194; QQ(<a class="arg" href="#KMAX">KMAX</a>,<a class="arg" href="#K">K</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#QQ"><m:mi mathcolor="#EE0000" mathvariant="bold">QQ</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set equal to an initial estimate of the <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>th element of <m:math><m:mi>&#931;</m:mi></m:math>. The lower triangle only is needed. <a class="arg" href="#QQ">QQ</a> must be positive-definite. It is strongly recommended that on entry the elements of <a class="arg" href="#QQ">QQ</a> are of the same order of magnitude as at the solution point. If you set <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#QQ"><m:mi mathcolor="#EE0000" mathvariant="bold">QQ</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>&#160;and <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>i</m:mi></m:math>, then G13DCF will calculate the covariance matrix between the <m:math><m:mi>k</m:mi></m:math>&#160;time series and use this as an initial estimate of <m:math><m:mi>&#931;</m:mi></m:math>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#QQ"><m:mi mathcolor="#EE0000" mathvariant="bold">QQ</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;will contain the latest estimate of the <m:math><m:mfenced separators=""><m:mi>i</m:mi><m:mo>,</m:mo><m:mi>j</m:mi></m:mfenced></m:math>th element of <m:math><m:mi>&#931;</m:mi></m:math>. The lower triangle only is returned.</div></dd><dt class="paramhead"><a name="KMAX" id="KMAX"/>9: &#160;&#160;&#8194; KMAX &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 
the first dimension of the arrays  <a class="arg" href="#QQ">QQ</a>, <a class="arg" href="#W">W</a> and <a class="arg" href="#V">V</a> as declared in the (sub)program from which G13DCF is called.
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KMAX"><m:mi mathcolor="#EE0000" mathvariant="bold">KMAX</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="W" id="W"/>10: &#8194; W(<a class="arg" href="#KMAX">KMAX</a>,<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#W"><m:mi mathcolor="#EE0000" mathvariant="bold">W</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>t</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set equal to the <m:math><m:mi>i</m:mi></m:math>th component of <m:math><m:msub><m:mi>W</m:mi><m:mi>t</m:mi></m:msub></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>&#160;and <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="PARHLD" id="PARHLD"/>11: &#8194; PARHLD(<a class="arg" href="#NPAR">NPAR</a>) &#8211; LOGICAL array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PARHLD"><m:mi mathcolor="#EE0000" mathvariant="bold">PARHLD</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to .TRUE., if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;is to be held constant at its input value and .FALSE., if <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;is a free parameter, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction></m:math>.
<div class="paramtext">If in doubt try setting all elements of <a class="arg" href="#PARHLD">PARHLD</a> to .FALSE..</div>
</div></dd><dt class="paramhead"><a name="EXACT" id="EXACT"/>12: &#8194; EXACT &#8211; LOGICAL<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: must be set equal to .TRUE. if you wish G13DCF to compute exact maximum likelihood estimates. <a class="arg" href="#EXACT">EXACT</a> must be set equal to .FALSE. if only conditional likelihood estimates are required.</div></dd><dt class="paramhead"><a name="IPRINT" id="IPRINT"/>13: &#8194; IPRINT &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the frequency with which the automatic monitoring routine is to be called.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPRINT"><m:mi mathcolor="#EE0000" mathvariant="bold">IPRINT</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>The ML search procedure is monitored once every <a class="arg" href="#IPRINT">IPRINT</a> iterations and just before exit from the search routine.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPRINT"><m:mi mathcolor="#EE0000" mathvariant="bold">IPRINT</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>The search routine is monitored once at the final point.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPRINT"><m:mi mathcolor="#EE0000" mathvariant="bold">IPRINT</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>The search routine is not monitored at all.</dd></dl>
</div></dd><dt class="paramhead"><a name="CGETOL" id="CGETOL"/>14: &#8194; CGETOL &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the accuracy to which the solution in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a> is required. 
<div class="paramtext">If <a class="arg" href="#CGETOL">CGETOL</a> is set to <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mi>l</m:mi></m:mrow></m:msup></m:math>&#160;and on exit <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>, then all the elements in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a> should be accurate to approximately <m:math><m:mi>l</m:mi></m:math>&#160;decimal places. For most practical purposes the value <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mn>4</m:mn></m:mrow></m:msup></m:math>&#160;should suffice. You should be wary of setting <a class="arg" href="#CGETOL">CGETOL</a> too small since the convergence criteria may then have become too strict for the machine to handle.</div>
<div class="paramtext">If <a class="arg" href="#CGETOL">CGETOL</a> has been set to a value which is less than the <span class="bitalic">machine precision</span>, <m:math><m:mi>&#949;</m:mi></m:math>, then G13DCF will use the value <m:math><m:mn>10.0</m:mn><m:mo>&#215;</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>&#160;instead.</div>
</div></dd><dt class="paramhead"><a name="MAXCAL" id="MAXCAL"/>15: &#8194; MAXCAL &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the maximum number of likelihood evaluations to be permitted by the search procedure.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCAL"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCAL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div>
<div class="paramtext"><i>Suggested value</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCAL"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCAL</m:mi></m:maction><m:mo>=</m:mo><m:mn>40</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction><m:mo>&#215;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction><m:mo>+</m:mo><m:mn>5</m:mn></m:mfenced></m:math>.

</div></dd><dt class="paramhead"><a name="ISHOW" id="ISHOW"/>16: &#8194; ISHOW &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: specifies which of the following two quantities are to be printed.
<table class="standard-90"><tr>
<td style="width:2.1em;" valign="baseline"><a name="itemi" id="itemi"/>(i)</td>
<td valign="top">table of maximum likelihood estimates and their standard errors (as returned in the output arrays <a class="arg" href="#PAR">PAR</a>, <a class="arg" href="#QQ">QQ</a> and <a class="arg" href="#CM">CM</a>);</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline"><a name="itemii" id="itemii"/>(ii)</td>
<td valign="top">table of residual series (as returned in the output array <a class="arg" href="#V">V</a>).</td>
</tr></table><dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISHOW"><m:mi mathcolor="#EE0000" mathvariant="bold">ISHOW</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>None of the above are printed.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISHOW"><m:mi mathcolor="#EE0000" mathvariant="bold">ISHOW</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd><a class="item" href="#itemi">(i)</a> only is printed.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISHOW"><m:mi mathcolor="#EE0000" mathvariant="bold">ISHOW</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd><a class="item" href="#itemi">(i)</a> and <a class="item" href="#itemii">(ii)</a> are printed.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISHOW"><m:mi mathcolor="#EE0000" mathvariant="bold">ISHOW</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NITER" id="NITER"/>17: &#8194; NITER &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then <a class="arg" href="#NITER">NITER</a> contains the number of iterations performed by the search routine.</div></dd><dt class="paramhead"><a name="RLOGL" id="RLOGL"/>18: &#8194; RLOGL &#8211; <span class="bitalic">double precision</span><span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then <a class="arg" href="#RLOGL">RLOGL</a> contains the value of the log-likelihood function corresponding to the final point held in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a>.</div></dd><dt class="paramhead"><a name="V" id="V"/>19: &#8194; V(<a class="arg" href="#KMAX">KMAX</a>,<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#V"><m:mi mathcolor="#EE0000" mathvariant="bold">V</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>t</m:mi></m:mfenced></m:mrow></m:math>&#160;will contain an estimate of the <m:math><m:mi>i</m:mi></m:math>th component of <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>t</m:mi></m:msub></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>k</m:mi></m:math>&#160;and <m:math><m:mi>t</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, corresponding to the final point held in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a>.</div></dd><dt class="paramhead"><a name="G" id="G"/>20: &#8194; G(<a class="arg" href="#NPAR">NPAR</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#G"><m:mi mathcolor="#EE0000" mathvariant="bold">G</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;will contain the estimated first derivative of the log-likelihood function with respect to the <m:math><m:mi>i</m:mi></m:math>th element in the array <a class="arg" href="#PAR">PAR</a>. If the gradient cannot be computed then all the elements of <a class="arg" href="#G">G</a> are returned as zero.</div></dd><dt class="paramhead"><a name="CM" id="CM"/>21: &#8194; CM(<a class="arg" href="#LDCM">LDCM</a>,<a class="arg" href="#NPAR">NPAR</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CM"><m:mi mathcolor="#EE0000" mathvariant="bold">CM</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;will contain an estimate of the correlation coefficient between the <m:math><m:mi>i</m:mi></m:math>th and <m:math><m:mi>j</m:mi></m:math>th elements in the <a class="arg" href="#PAR">PAR</a> array for <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>i</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction></m:math>, <m:math><m:mn>1</m:mn><m:mo>&#8804;</m:mo><m:mi>j</m:mi><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction></m:math>. If <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mi>j</m:mi></m:math>, then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#CM"><m:mi mathcolor="#EE0000" mathvariant="bold">CM</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;will contain the estimated standard error of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PAR"><m:mi mathcolor="#EE0000" mathvariant="bold">PAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>. If the <m:math><m:mi>l</m:mi></m:math>th component of <a class="arg" href="#PAR">PAR</a> has been held constant, i.e., <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#PARHLD"><m:mi mathcolor="#EE0000" mathvariant="bold">PARHLD</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>l</m:mi></m:mfenced></m:mrow></m:math>&#160;was set to .TRUE., then the <m:math><m:mi>l</m:mi></m:math>th row and column of <a class="arg" href="#CM">CM</a> will be set to zero. If the second derivative matrix cannot be computed then all the elements of <a class="arg" href="#CM">CM</a> are returned as zero.</div></dd><dt class="paramhead"><a name="LDCM" id="LDCM"/>22: &#8194; LDCM &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 
the first dimension of the array <a class="arg" href="#CM">CM</a> as declared in the (sub)program from which G13DCF is called.
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDCM"><m:mi mathcolor="#EE0000" mathvariant="bold">LDCM</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction></m:math>.
</div></dd><dt class="paramhead"><a name="WORK" id="WORK"/>23: &#8194; WORK(<m:math><m:mn>1</m:mn></m:math>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="LWORK" id="LWORK"/>24: &#8194; LWORK &#8211; INTEGER<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="IW" id="IW"/>25: &#8194; IW(<m:math><m:mn>1</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="LIW" id="LIW"/>26: &#8194; LIW &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext">These parameters are no longer accessed by G13DCF. Workspace is provided internally by dynamic allocation instead.</div>
</dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>27: &#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>).
<div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, because for this routine the values of the output parameters may be useful even if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8800;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;on exit, the recommended value is <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div>
</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext"><b>Note:</b> G13DCF may return useful information for one or more of the following detected errors or warnings.</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction></m:mfenced><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>+</m:mo><m:mi>&#916;</m:mi><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction></m:math>, where  <m:math><m:mi>&#916;</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>&#160;or <m:math><m:mi>&#916;</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MEAN"><m:mi mathcolor="#EE0000" mathvariant="bold">MEAN</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#215;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced><m:mo>/</m:mo><m:mn>2</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#KMAX"><m:mi mathcolor="#EE0000" mathvariant="bold">KMAX</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCAL"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCAL</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISHOW"><m:mi mathcolor="#EE0000" mathvariant="bold">ISHOW</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ISHOW"><m:mi mathcolor="#EE0000" mathvariant="bold">ISHOW</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>2</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDCM"><m:mi mathcolor="#EE0000" mathvariant="bold">LDCM</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction></m:math>.</td></tr></table>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<div class="paramtext">On entry, either the initial estimate of <m:math><m:mi>&#931;</m:mi></m:math>&#160;is not positive-definite, or the initial estimates of the AR parameters are such that the model is non-stationary, or the initial estimates of the MA parameters are such that the model is non-invertible.  To proceed, you must try a different starting point.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>
<div class="paramtext">The routine cannot compute a sufficiently accurate estimate of the gradient vector at the user-supplied starting point.  This usually occurs if either the initial parameter estimates are very close to the ML parameter estimates, or you have supplied a very poor estimate of <m:math><m:mi>&#931;</m:mi></m:math>&#160;or the starting point is very close to the boundary of the stationarity or invertibility region.  To proceed,  you must try a different starting point.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>
<div class="paramtext">There have been <a class="arg" href="#MAXCAL">MAXCAL</a> log-likelihood evaluations made in the routine.  If steady increases in the log-likelihood function were monitored up to the point where this exit occurred, then the exit probably simply occurred because <a class="arg" href="#MAXCAL">MAXCAL</a> was set too small, so the calculations should be restarted from the final point held in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a>.  This type of exit may also indicate that there is no maximum to the likelihood surface.  Output quantities (as described in <a class="sec" href="#parameters">Section 5</a>) are computed at the final point held in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a>, except that if <a class="arg" href="#G">G</a> or <a class="arg" href="#CM">CM</a> cannot be computed, in which case they are set to zero.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq5" id="IFeq5"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>
<div class="paramtext">The conditions for a solution have not all been met, but a point at which the log-likelihood took a larger value could not be found.</div>
<div class="paramtext">Provided that the estimated first derivatives are sufficiently small, and that the estimated condition number of the second derivative (Hessian) matrix, as printed when <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IPRINT"><m:mi mathcolor="#EE0000" mathvariant="bold">IPRINT</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>, is not too large, this error exit may simply mean that, although it has not been possible to satisfy the specified requirements, the algorithm has in fact found the solution as far as the accuracy of the machine permits.</div>
<div class="paramtext">Such a condition can arise, for instance, if <a class="arg" href="#CGETOL">CGETOL</a> has been set so small that rounding error in evaluating the likelihood function makes attainment of the convergence conditions impossible.</div>
<div class="paramtext">If the estimated condition number at the final point is large, it could be that the final point is a solution but that the smallest eigenvalue of the Hessian matrix is so close to zero at the solution that it is not possible to recognize it as a solution.  Output quantities (as described in <a class="sec" href="#parameters">Section 5</a>) are computed at the final point held in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a>, except that if <a class="arg" href="#G">G</a> or <a class="arg" href="#CM">CM</a> cannot be computed, in which case they are set to zero.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq6" id="IFeq6"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>6</m:mn></m:math></dt>
<dd>
<div class="paramtext">The ML solution is so close to the boundary of either the stationarity region or the invertibility region that G13DCF cannot evaluate the Hessian matrix.  The elements of <a class="arg" href="#CM">CM</a> will then be set to zero on exit.  The elements of <a class="arg" href="#G">G</a> will also be set to zero.  All other output quantities will be correct.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq7" id="IFeq7"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>7</m:mn></m:math></dt>
<dd>
<div class="paramtext">This is an unlikely exit, which could occur in <a class="rout" href="../E04/e04xaf.xml">E04XAF/E04XAA</a>,  which computes an estimate of the second derivative matrix and the gradient vector at the solution point.  Either the Hessian matrix was found to be too ill-conditioned to be evaluated accurately or the gradient vector could not be computed to an acceptable degree of accuracy.  In this case the elements of <a class="arg" href="#CM">CM</a> will be set to zero on exit as will the elements of <a class="arg" href="#G">G</a>.  All other output quantities will be correct.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq8" id="IFeq8"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>8</m:mn></m:math></dt>
<dd>
<div class="paramtext">The second derivative matrix at the solution point is not positive-definite.  In this case the elements of <a class="arg" href="#CM">CM</a> will be set to zero on exit.  All other output quantities will be correct.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq-999" id="IFeq-999"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>-999</m:mn></m:math></dt>
<dd>
<div class="paramtext">Internal memory allocation failed.</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">On exit from G13DCF, if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>&#160;and <a class="arg" href="#CGETOL">CGETOL</a> has been set to <m:math><m:msup><m:mn>10</m:mn><m:mrow><m:mo>-</m:mo><m:mi>l</m:mi></m:mrow></m:msup></m:math>, then all the parameters should be accurate to approximately <m:math><m:mi>l</m:mi></m:math>&#160;decimal places.  If <a class="arg" href="#CGETOL">CGETOL</a> was set equal to a value less than the <span class="bitalic">machine precision</span>, <m:math><m:mi>&#949;</m:mi></m:math>, then all the parameters should be accurate to approximately <m:math><m:mn>10.0</m:mn><m:mo>&#215;</m:mo><m:msqrt><m:mi>&#949;</m:mi></m:msqrt></m:math>.</div><div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq4"><m:mn mathcolor="#003399" mathvariant="bold">4</m:mn></m:maction></m:math>&#160;on exit (i.e., <a class="arg" href="#MAXCAL">MAXCAL</a> likelihood evaluations have been made but the convergence conditions of the search routine have not been satisfied), then the elements in <a class="arg" href="#PAR">PAR</a> and <a class="arg" href="#QQ">QQ</a> may still be good approximations to the ML estimates.  You are advised to inspect the elements of <a class="arg" href="#G">G</a> to see whether this is likely to be so.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2><h3 class="standard"><a class="sec" name="fcomments0" id="fcomments0"/>8.1&#160;&#160;Memory Usage</h3>
<div class="paramtext">Let <m:math>
 <m:mi>r</m:mi>
 <m:mo>=</m:mo>
 <m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction></m:mfenced></m:mrow>
</m:math>&#160;and <m:math>
 <m:mi>s</m:mi>
 <m:mo>=</m:mo>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#NPAR"><m:mi mathcolor="#EE0000" mathvariant="bold">NPAR</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#215;</m:mo>
 <m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced>
 <m:mo>/</m:mo>
 <m:mn>2</m:mn>
</m:math>. Local workspace arrays of fixed lengths are allocated internally by G13DCF. The total size of these arrays amounts to <m:math>
 <m:mi>s</m:mi><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#215;</m:mo><m:mi>r</m:mi><m:mo>+</m:mo><m:mn>52</m:mn>
</m:math>&#160;INTEGER elements and <m:math>
 <m:mn>2</m:mn>
 <m:mo>&#215;</m:mo>
 <m:msup><m:mi>s</m:mi><m:mn>2</m:mn></m:msup>
 <m:mo>+</m:mo><m:mi>s</m:mi><m:mo>&#215;</m:mo>
 <m:mfenced separators=""><m:mi>s</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mfenced>
 <m:mo>/</m:mo><m:mn>2</m:mn><m:mo>+</m:mo><m:mn>15</m:mn><m:mo>&#215;</m:mo>
 <m:mi>s</m:mi><m:mo>+</m:mo>
 <m:msup><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mn>2</m:mn></m:msup>
 <m:mo>&#215;</m:mo>
 <m:mfenced separators="">
  <m:mn>2</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IP"><m:mi mathcolor="#EE0000" mathvariant="bold">IP</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IQ"><m:mi mathcolor="#EE0000" mathvariant="bold">IQ</m:mi></m:maction><m:mo>+</m:mo>
  <m:msup>
   <m:mfenced separators=""><m:mi>r</m:mi><m:mo>+</m:mo><m:mn>3</m:mn></m:mfenced>
   <m:mn>2</m:mn>
  </m:msup>
 </m:mfenced>
 <m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#K"><m:mi mathcolor="#EE0000" mathvariant="bold">K</m:mi></m:maction><m:mo>&#215;</m:mo>
 <m:mfenced separators="">
  <m:mn>2</m:mn><m:mo>&#215;</m:mo>
  <m:msup><m:mi>r</m:mi><m:mn>2</m:mn></m:msup>
  <m:mo>+</m:mo><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:mspace linebreak="newline"/>
  <m:mi>r</m:mi><m:mo>+</m:mo><m:mn>3</m:mn><m:mo>&#215;</m:mo>
  <m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>4</m:mn>
 </m:mfenced>
 <m:mo>+</m:mo><m:mn>10</m:mn>
</m:math>&#160;<span class="bitalic">double precision</span> elements.
</div><h3 class="standard"><a class="sec" name="fcomments1" id="fcomments1"/>8.2&#160;&#160;Timing</h3>
<div class="paramtext">The number of iterations required depends upon the number of parameters in the model and the distance of the user-supplied starting point from the solution.</div><h3 class="standard"><a class="sec" name="fcomments2" id="fcomments2"/>8.3&#160;&#160;Constraining for Stationarity and Invertibility</h3>
<div class="paramtext">If the solution lies on the boundary of the admissibility region (stationarity and invertibility region) then G13DCF may get into difficulty and exit with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFeq5"><m:mn mathcolor="#003399" mathvariant="bold">5</m:mn></m:maction></m:math>.  If this exit occurs you are advised to either try a different starting point or a different setting for <a class="arg" href="#EXACT">EXACT</a>.  If this still continues to occur then you are urged to try fitting a more parsimonious model.</div><h3 class="standard"><a class="sec" name="fcomments3" id="fcomments3"/>8.4&#160;&#160;Over-parameterisation</h3>
<div class="paramtext">You are advised to try and avoid fitting models with an excessive number of parameters since over-parameterisation can cause the maximization problem to become ill-conditioned.</div><h3 class="standard"><a class="sec" name="fcomments4" id="fcomments4"/>8.5&#160;&#160;Standardizing the Residual Series</h3>
<div class="paramtext">The standardized estimates of the residual series  <m:math><m:msub><m:mi>&#949;</m:mi><m:mi>t</m:mi></m:msub></m:math>&#160;(denoted by <m:math><m:msub><m:mover><m:mi>e</m:mi><m:mo>^</m:mo></m:mover><m:mi>t</m:mi></m:msub></m:math>) can easily be calculated by forming the Cholesky decomposition of  <m:math><m:mi>&#931;</m:mi></m:math>, e.g., <m:math><m:mi>G</m:mi><m:msup><m:mi>G</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:math>&#160;and setting <m:math><m:msub><m:mover><m:mi>e</m:mi><m:mo>^</m:mo></m:mover><m:mi>t</m:mi></m:msub><m:mo>=</m:mo><m:msup><m:mi>G</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup><m:msub><m:mover><m:mi>&#949;</m:mi><m:mo>^</m:mo></m:mover><m:mi>t</m:mi></m:msub></m:math>.  <a class="rout" href="../F07/f07fdf.xml">F07FDF (DPOTRF)</a>  may be used to calculate the array <a class="arg" href="#G">G</a>.  The components of <m:math><m:msub><m:mover><m:mi>e</m:mi><m:mo>^</m:mo></m:mover><m:mi>t</m:mi></m:msub></m:math>&#160;which are now uncorrelated at <b>all</b> lags can sometimes be more easily interpreted.</div><h3 class="standard"><a class="sec" name="fcomments5" id="fcomments5"/>8.6&#160;&#160;Assessing the Fit of the Model</h3>
<div class="paramtext">If your time series model provides a good fit to the data then the residual series should be approximately white noise, i.e., exhibit no serial cross-correlation.  An examination of the residual cross-correlation matrices should confirm whether this is likely to be so.  You are advised to call <a class="rout" href="../G13/g13dsf.xml">G13DSF</a> to provide information for diagnostic checking.  <a class="rout" href="../G13/g13dsf.xml">G13DSF</a> returns the residual cross-correlation matrices along with their asymptotic standard errors.  <a class="rout" href="../G13/g13dsf.xml">G13DSF</a> also computes a portmanteau statistic and its asymptotic significance level for testing model adequacy.  If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or 
<m:math><m:mn>5</m:mn><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>8</m:mn></m:math>&#160;on exit from G13DCF then the quantities <a class="arg" href="#K">K</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#V">V</a>, <a class="arg" href="#KMAX">KMAX</a>, <a class="arg" href="#IP">IP</a>, <a class="arg" href="#IQ">IQ</a>, <a class="arg" href="#PAR">PAR</a>, <a class="arg" href="#PARHLD">PARHLD</a>, and <a class="arg" href="#QQ">QQ</a> will be suitable for input to <a class="rout" href="../G13/g13dsf.xml">G13DSF</a>.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example shows how to fit a bivariate AR(1) model to two series each of length <m:math><m:mn>48</m:mn></m:math>.  <m:math><m:mi>&#956;</m:mi></m:math>&#160;will be estimated and <m:math><m:msub><m:mi>&#981;</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:mn>2</m:mn><m:mo>,</m:mo><m:mn>1</m:mn></m:mfenced></m:math>&#160;will be constrained to be zero.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/g13dcfe.f">Program Text (g13dcfe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/g13dcfe.d">Program&#160;Data (g13dcfe.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/g13dcfe.r">Program Results (g13dcfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/G13/g13dcf.pdf">G13DCF (PDF version)</a></div><div><a class="chap" href="g13conts.xml">G13 Chapter Contents</a></div><div><a class="chapint" href="g13intro.xml">G13 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>
