Deterministic vs stochastic trends
Автор: Ben Lambert
Загружено: 2013-09-16
Просмотров: 127918
This video explains the difference between stochastic and deterministic trends. A simulation is provided at the end of the video, demonstrating the graphical difference between these two types of stochastic process.
I also provide code below in Matlab/Octave for anyone wanting to run these simulations.
clear; close all; clc;
n=10000; % Number of time periods
b=1;
rho=1; %The parameter on the lagged value of x
alpha=0.05; % The slope parameter
% Initialise x and y
x=zeros(n,1);
x(1)=0;
y=zeros(n,1);
y(1)=0;
% Generate the x and y series
for i = 2:n
x(i)=alpha+rho*x(i-1)+b*randn();
y(i)=alpha*i+b*randn();
end
% Plot the x and y series
zoom=1.0;
FigHandle = figure('Position', [750, 300, 1049*zoom, 895*zoom]);
plot(x, 'LineWidth', 1.4)
hold on
plot(y, 'm','LineWidth', 1.4) Check out https://ben-lambert.com/econometrics-... 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/1...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: