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

📄 cadf_d.m

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

clear all;
nobs = 100;

   dx =   randn(nobs,2);
   y = cumsum(dx); % non-cointegrated system
                   % with 2 I(1) variables
   nlags = 3;
   
  for i=1:nlags;
   res = cadf(y(:,1),y(:,2),-1,i);
   prt(res);
  end;
  
  % generate a co-integrated system
  
  z = y(:,1) + dx(:,2);
  
  % z and y are co-integrated
  for i=1:nlags;  
   res = cadf(z,y(:,1),-1,i);
    prt(res);
  end;
 

⌨️ 快捷键说明

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