源代码+附件链接
1、马尔科夫向量自回归源代码
源代码,但是还要附件里面的数据。
- % Example Script MS_Regress_Fit.m
- clear;
- load('MS_regress') % load some Data.
- % addpath('m_Files'); % add 'm_Files' folder to the search path
- % addpath('data_Files');
- indep1=rb+pait;
- indep2=y;
- indep3=pait-paix;
- indep4=rt1;
- dep=rt; % Defining dependent variable from .mat file
- indep=[indep1 indep2 indep3 indep4]; % Defining some explanatory variables
- k=2; % Number of States
- S=[1 1 1 1 1]; % Defining which parts of the equation will switch states (column 1 and variance only)
- advOpt.distrib='Normal'; % The Distribution assumption ('Normal', 't' or 'GED')
- advOpt.std_method=1; % Defining the method for calculation of standard errors. See pdf file for more details
- [Spec_Out]=MS_Regress_Fit(dep,indep,k,S,advOpt); % Estimating the model
2、自回归matlab程序附件链接
马尔可夫(多元)一阶向量自回归matlab程序 |