) model
%
% _lag_ : lag of the VAR model, i.e. p
%
% _LTM_ : pre-set vector of each variable's long-term mean, optional input
%
% _exo_ : index of exogenous variable(s), optional input
%
% _newMean_ : alternate long-term means, optional input
%
% _s_ : matrix of computed VAR(p) parameters, [c A_1 ... A_p] 


%% 1. Set up
N=length(Y);    %number of months of historical data   
lagStep=[1:lag];    %vector from 1 to number of lags

%Ensure correct dimensionality
nlag=lag;
if length(lag)>1
  lagStep=lag;
  nlag