  

resid = (Y-X*s.B'); %matrix of residuals 
s.Omega=(Y-X*s.B')'*(Y-X*s.B')/(N-k*nlag-1);     %correlation matrix of error terms
s.Q=(X'*X)/(N-k*nlag-1);
s.h=sqrt(diag(kron(s.Omega,inv(s.Q)))/(N-k*nlag-1));
vecB=reshape(s.B',length(s.h),1);
s.LTM=LTM;
s.simLTM=simLTM;
##### SOURCE END #####
--></body></html>