Higher order/NLMA package for dynare 4.5

When in Dynare 4.5 using NLMA package, it came out some error messages:

Error in dyntable (line 31)
if options_.noprint
Error in nlma_th_moments (line 181)
dyntable( title, headers, labels, disp_mean , lh, 11, 4 );
Error in QMPolicy (line 455)
nlma_theoretical_moments = nlma_th_moments(M_,oo_,options_,var_list_);
Error in dynare (line 235)
evalin(‘base’,fname) ;

Due to have changed the interface of the dyntable routine between 4.4 and 4.5.

In 4.5.x the header of the function is:

function dyntable(options_,title,headers,labels,values,label_width,val_width,val_precis,optional_header)
% function dyntable(title,headers,labels,values,label_width,val_width,val_precis)
% Inputs:
%   options_    [structure]         Dynare options structure
%   title       [string]            Table title
%   headers     [n by nchar]        character array of labels for header row
%   labels      [n by nchar]        character array of labels for label column
%   values      [matrix]            matrix of values to display
%   label_width [scalar]            Width of the label
%   val_width   [scalar]            Width of value column
%   val_precis  [integer]           precision of displayed values

while in 4.4.x, the header is:

function dyntable(title,headers,labels,values,label_width,val_width, val_precis)

nlma_th_moments.m (15.7 KB)

replaces the original file