Error while running MS_Regress_Fit

16 views (last 30 days)
Stefano Grillini
Stefano Grillini on 21 Aug 2018
Commented: dpb on 21 Aug 2018
Dear all,
I very new to Matlab and I'm facing an issue while running MS_regress_fit.
In particular, I need to add an independent variable to one of the equations, but I get the error message:
Error using MS_VAR_Fit
Too many input arguments.
Without independent variables the programme runs. My code is:
lnavilliq = data.lnavilliq;
milliq1 = data.milliq1;
% Remove NaN
lnavilliq(isnan(lnavilliq))=[];
milliq1(isnan(milliq1))=[];
% Matrix of dependent vars
c = [lnavilliq milliq1];
dep= c; % Defines the dependent variables in system
%indep{1}=lnavilliq;
indep{2}=lnavilliq;
S{2}=[1 1];
nLag=0; % Number of vector autoregressive lags in 2x1 system
k=2; % Number of states/regimes (?)
doIntercept=1; % Add intercept to equations (1= Yes; 0= No)
advOpt.distrib='Normal'; % The Distribution assumption
advOpt.std_method = 1; % Defining the method for calculation of standard errors.
advOpt.diagCovMat = 0; % Whether we will estimate by MLE also MS covariances
advOpt.doPlots = 0; % Does not produce automatic plots (you are in charge of that!)
advOpt.printIter = 0; % When set to 0, does not print iterations to the screeen
[Spec_Out_1]=MS_VAR_Fit(dep,nLag,k,doIntercept,advOpt);
Any help would be much appreciated!
Thanks
Stefano
  1 Comment
dpb
dpb on 21 Aug 2018
That isn't really a Matlab Q?; that is an external package and what support there is for it should come from the author and/or community that uses it.
I wasn't aware of it but in a very quick look I didn't see anything in the user interface for such a usage; maybe there's something else in the package for more general/custom models??

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!