⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phillips_d.m

📁 计量工具箱
💻 M
字号:
% PURPOSE: demonstrate the use of phillips()
%          function to test for cointegration
%          among I(1) time-series
% ---------------------------------------------
% usage: phillips_d
% ----------------------------------------------

clear all;

nobs = 50;

   dx =   randn(nobs,2);
   y = cumsum(dx); % non-cointegrated system
                   % with 2 I(1) variables
   nlags = 1;
   
info.cnames = strvcat('Phillips stat','signif');
disp('****************************************');
disp('Case of no cointegration');
disp('****************************************');

  for i=0:nlags;
   result = phillips(y(:,1),y(:,2),i);
   prt(result);
  end;

  
  % generate a co-integrated system
  
  z = y(:,1) + dx(:,2);
disp('****************************************');
disp('Case of cointegration');  
disp('****************************************');

  % z and y are co-integrated
  for i=0:nlags;  
   result = phillips(z,y(:,1),i);
    prt(result);
  end;
 

⌨️ 快捷键说明

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