Summary
Keywords
Full Transcript
This video explains the difference between levels and first differences regression, and discusses how the level regression motivates the concept of cointegration. I also provide a simulation in Matlab\Octave to demonstrate the difference. clear; clc; close all; n=100; dx=zeros(n,1); dy=zeros(n,1); y=zeros(n+1,1); x=zeros(n+1,1); x(1)=0; y(1)=0; b=2; e=1; a=10; for i = 1:n dx(i)=randn(); dy(i)=b*dx(i) + e*randn(); x(i+1)=x(i)+dx(i); y(i+1)=y(i)+dy(i); end i =1:n+1; i=i'; j=i(1:end-1); zoom=1.0; FigHandle = figure('Position', [750, 300, 1049*zoom, 895*zoom]); subplot(2,1,1),plot(j,x(1:end-1),'g',j,y(1:end-1),'b','LineWidth',1.4) title('Levels', 'FontSize', 20); legend('X','Y') subplot(2,1,2),plot(j,dx,'m',j,dy,'r','LineWidth',1.4) title('Differences', 'FontSize', 20); legend('DX','DY') Check out https://ben-lambert.com/econometrics-course-problem-sets-and-data/ for course materials, and information regarding updates on each of the courses. Quite excitingly (for me at least), I am about to publish a whole series of new videos on Bayesian statistics on youtube. See here for information: https://ben-lambert.com/bayesian/ Accompanying this series, there will be a book: https://www.amazon.co.uk/gp/product/1473916364/ref=pe_3140701_247401851_em_1p_0_ti
