stvar_d.m

来自「计量工具箱」· M 代码 · 共 53 行

M
53
字号
% PURPOSE: An example of using stvar to run a
%          smooth transition vector autoregression.
%           
%---------------------------------------------------
% USAGE: stvar_d
%---------------------------------------------------

clear all;

load peru.data; % a test data set containing
                % data from the Peruvian Economy:
                % Discount Rate (level), Real Exchange Rate (Log Annual Dif.)
                % GDP (Log Annual Dif.), Price Index (Log Annual Dif.) 
               
% monthly data covers 1994,1 to 2003,6

%Arranging Parameters for simulation
param=[2 1 1 0 1 1.5 100 24 1 1];

% estimate the model
results = stvar(peru,param);

vnames =  ['Discount Rate      ',
           'Real Exchange Rate ',    
           'GDP                ',    
           'Price Index        '];

subplot(4,1,1);
    xlabel('Periods');
    ylabel('Disc. Rate');

subplot(4,1,2);
    xlabel('Periods');
    ylabel('Ex. Rate');

subplot(4,1,3);
    xlabel('Periods');
    ylabel('GDP');

subplot(4,1,4);
    xlabel('Periods');
    ylabel('Prices');

       
%prt(results,vnames);
%cutoff = 0.1;
%pgranger(results,vnames,cutoff);
%plt(results,vnames);




⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?