Error while running MS_Regress_Fit

16 次查看(过去 30 天)
Stefano Grillini
Stefano Grillini 2018-8-21
评论: dpb 2018-8-21
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 个评论
dpb
dpb 2018-8-21
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??

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Markov Chain Models 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by